| 1 |
<?php |
| 2 |
|
| 3 |
namespace WPDeveloper\BetterDocs\Editors\BlockEditor\Blocks; |
| 4 |
|
| 5 |
use WPDeveloper\BetterDocs\Editors\BlockEditor\Block; |
| 6 |
|
| 7 |
class DocAuthor extends Block { |
| 8 |
|
| 9 |
public $editor_styles = [ 'betterdocs-author' ]; |
| 10 |
public $frontend_styles = [ 'betterdocs-author' ]; |
| 11 |
|
| 12 |
public function get_name() { |
| 13 |
return 'doc-author'; |
| 14 |
} |
| 15 |
|
| 16 |
public function get_default_attributes() { |
| 17 |
return [ |
| 18 |
'blockId' => '' |
| 19 |
]; |
| 20 |
} |
| 21 |
|
| 22 |
public function render( $attributes, $content ) { |
| 23 |
$blockId = $attributes['blockId']; |
| 24 |
echo '<div class="' . esc_attr( $blockId ) . '">'; |
| 25 |
$this->views( 'widgets/author' ); |
| 26 |
echo '</div>'; |
| 27 |
} |
| 28 |
|
| 29 |
public function view_params() { |
| 30 |
|
| 31 |
return []; |
| 32 |
} |
| 33 |
} |
| 34 |
|