PluginProbe
Smart Post – Post Grid, Post Carousel, Post Slider Gutenberg Blocks for Blog & News / 4.0.7
Smart Post – Post Grid, Post Carousel, Post Slider Gutenberg Blocks for Blog & News v4.0.7
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-search / Smart_Search.php

Smart_Search.php in Smart Post – Post Grid, Post Carousel, Post Slider Gutenberg Blocks for Blog & News 4.0.7, at blocks/includes/smart-search/Smart_Search.php

53 lines 1.2 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Smart Search 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 * Smart Search Block Class
21 */
22 class Smart_Search extends Block_Base {
23
24
25 /**
26 * Set block properties.
27 *
28 * @return void
29 */
30 protected function set_block_properties() {
31 $this->block_name = 'smart-search';
32 $this->category = 'sp-smart-post-show-pro-blocks';
33 $this->editor_scripts = array( 'sp_smart_post_blocks_index_js' );
34 $this->styles = array( 'sp_smart_post_blocks_css', 'sp_smart_post_blocks_style' );
35 $this->scripts = array( 'sp_smart_post_smart_search_script' );
36 }
37
38 /**
39 * Block render function.
40 *
41 * @param array $attributes attributes.
42 * @param string $content Content to be rendered.
43 * @param array $blocks blocks.
44 * @return string Rendered HTML content.
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