PluginProbe
Smart Post – Post Grid, Post Carousel, Post Slider Gutenberg Blocks for Blog & News / 4.0.8
Smart Post – Post Grid, Post Carousel, Post Slider Gutenberg Blocks for Blog & News v4.0.8
4.0.8 4.0.7 4.0.6 4.0.5 4.0.4 4.0.3 4.0.2 4.0.1 2.3.5 2.3.6 2.4.0 2.4.1 2.4.10 2.4.11 2.4.12 2.4.13 2.4.14 2.4.15 2.4.16 2.4.17 2.4.18 2.4.19 2.4.2 2.4.20 2.4.21 All 88 releases
post-carousel / blocks / includes / post-list-two / Post_List_Two.php

Post_List_Two.php in Smart Post – Post Grid, Post Carousel, Post Slider Gutenberg Blocks for Blog & News 4.0.8, at blocks/includes/post-list-two/Post_List_Two.php

53 lines 1.4 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Post list block 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 * Container
21 */
22 class Post_List_Two extends Block_Base {
23 /**
24 * Set_block_properties
25 *
26 * @return void
27 */
28 protected function set_block_properties() {
29 $this->block_name = 'post-list-two';
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', 'List', 'Live Filter', 'Pagination', 'Ajax Live Filter' );
36 }
37
38 /**
39 * Render the block output on the frontend.
40 *
41 * @param array $attributes Block attributes.
42 * @param string $content Block content.
43 * @param array $blocks Inner blocks.
44 * @return string Rendered HTML.
45 */
46 public function render_block( $attributes, $content = '', $blocks = array() ) {
47 if ( Helper::is_editor_page() ) {
48 return $content;
49 }
50 return '';
51 }
52 }
53