| 1 |
<?php |
| 2 |
/** |
| 3 |
* Post grid class for Smart Post Show Blocks. |
| 4 |
* |
| 5 |
* @package Smart_Post_Show_Pro |
| 6 |
* @subpackage Smart_Post_Show_Pro/blocks/includes |
| 7 |
*/ |
| 8 |
|
| 9 |
namespace SmartPostShow\Blocks; |
| 10 |
|
| 11 |
use SmartPostShow\Blocks\Helper; |
| 12 |
|
| 13 |
use SmartPostShow\Blocks\Block_Base; |
| 14 |
|
| 15 |
if ( ! defined( 'ABSPATH' ) ) { |
| 16 |
exit; |
| 17 |
} |
| 18 |
|
| 19 |
/** |
| 20 |
* Post Grid Four Block Class. |
| 21 |
*/ |
| 22 |
class Post_Grid_Four extends Block_Base { |
| 23 |
/** |
| 24 |
* Set_block_properties |
| 25 |
* |
| 26 |
* @return void |
| 27 |
*/ |
| 28 |
protected function set_block_properties() { |
| 29 |
$this->block_name = 'post-grid-four'; |
| 30 |
$this->category = 'sp-smart-post-show-pro-blocks'; |
| 31 |
$this->scripts = array( 'sp_smart_post_blocks_script_js' ); |
| 32 |
$this->styles = array( 'sp_smart_post_blocks_css', 'sp_smart_post_blocks_social_icons_style', 'sp_smart_post_blocks_google_fonts' ); |
| 33 |
$this->editor_scripts = array( 'sp_smart_post_blocks_index_js' ); |
| 34 |
$this->editor_styles = array( 'sp_smart_post_blocks_editor_style' ); |
| 35 |
$this->keywords = array( 'Smart post', 'Grid', 'Live Filter', 'Pagination', ' Ajax Live Filter' ); |
| 36 |
} |
| 37 |
/** |
| 38 |
* Render block |
| 39 |
* |
| 40 |
* @param array $attributes attributes. |
| 41 |
* @param mixed $content content. |
| 42 |
* @param array $blocks blocks. |
| 43 |
* @return string |
| 44 |
*/ |
| 45 |
public function render_block( $attributes, $content = '', $blocks = array() ) { |
| 46 |
if ( Helper::is_editor_page() ) { |
| 47 |
return $content; |
| 48 |
} |
| 49 |
|
| 50 |
return ''; |
| 51 |
} |
| 52 |
} |
| 53 |
|