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 / smart-post-parent / Smart_Post_Parent.php

Smart_Post_Parent.php in Smart Post – Post Grid, Post Carousel, Post Slider Gutenberg Blocks for Blog & News 4.0.8, at blocks/includes/smart-post-parent/Smart_Post_Parent.php

50 lines 984 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Smart parent block class for Smart Post Show Blocks.
4 *
5 * @package Smart_Post_Show
6 * @subpackage Smart_Post_Show/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 * Pagination block for Smart Post Show.
21 *
22 * Handles the pagination logic for Smart Post Show blocks.
23 */
24 class Smart_Post_Parent extends Block_Base {
25 /**
26 * Set_block_properties
27 *
28 * @return void
29 */
30 protected function set_block_properties() {
31 $this->block_name = 'smart-post-parent';
32 }
33
34 /**
35 * Block render function.
36 *
37 * @param array $attributes attributes.
38 * @param string $content Content to be rendered.
39 * @param array $blocks blocks.
40 * @return string Rendered HTML content.
41 */
42 public function render_block( $attributes, $content = '', $blocks = array() ) {
43 if ( Helper::is_editor_page() ) {
44 return $content;
45 }
46
47 return $content;
48 }
49 }
50