PluginProbe
ShopBuilder – WooCommerce Builder For Elementor / 2.0.2
ShopBuilder – WooCommerce Builder For Elementor v2.0.2
3.4.2 3.4.1 3.4.0 2.0.1 2.0.2 2.0.3 2.1.0 2.1.1 2.1.10 2.1.11 2.1.12 2.1.13 2.1.14 2.1.15 2.1.2 2.1.3 2.1.4 2.1.5 2.1.6 2.1.7 2.1.8 2.1.9 2.2.0 2.2.1 2.2.2 All 63 releases
shopbuilder / app / Elementor / Widgets / Archive / ArchiveDescription.php

ArchiveDescription.php in ShopBuilder – WooCommerce Builder For Elementor 2.0.2, at app/Elementor/Widgets/Archive/ArchiveDescription.php

85 lines 2.1 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Main ProductDescription class.
4 *
5 * @package RadiusTheme\SB
6 */
7
8 namespace RadiusTheme\SB\Elementor\Widgets\Archive;
9
10 use RadiusTheme\SB\Abstracts\ElementorWidgetBase;
11 use RadiusTheme\SB\Elementor\Widgets\Controls\ArchiveDescSettings;
12 use RadiusTheme\SB\Helpers\BuilderFns;
13 use RadiusTheme\SB\Helpers\Fns;
14
15 // Do not allow directly accessing this file.
16 if ( ! defined( 'ABSPATH' ) ) {
17 exit( 'This script cannot be accessed directly.' );
18 }
19
20 /**
21 * Product Description class
22 */
23 class ArchiveDescription extends ElementorWidgetBase {
24 /**
25 * Construct function
26 *
27 * @param array $data default array.
28 * @param mixed $args default arg.
29 */
30 public function __construct( $data = [], $args = null ) {
31 $this->rtsb_name = esc_html__( 'Archive Description', 'shopbuilder' );
32 $this->rtsb_base = 'rtsb-archive-description';
33 parent::__construct( $data, $args );
34 }
35 /**
36 * Widget Field
37 *
38 * @return array
39 */
40 public function widget_fields() {
41 return ArchiveDescSettings::widget_fields( $this );
42 }
43 /**
44 * Set Widget Keyword.
45 *
46 * @return array
47 */
48 public function get_keywords() {
49 return [ 'Archive' ] + parent::get_keywords();
50 }
51 /**
52 * Render Function
53 *
54 * @return void
55 */
56 protected function render() {
57 $controllers = $this->get_settings_for_display();
58 $this->theme_support();
59 ob_start();
60 if ( BuilderFns::is_builder_preview() ) {
61 ?>
62 <p> <?php echo esc_html__( 'The dummy text based paragraph. It only appears on Elementor editor and demo page help you to customize your description', 'shopbuilder' ); ?> </p>
63 <?php
64 } else {
65 /**
66 * Hook: woocommerce_archive_description.
67 *
68 * @hooked woocommerce_taxonomy_archive_description - 10
69 * @hooked woocommerce_product_archive_description - 10
70 */
71 echo get_the_archive_description(); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
72 }
73 $content = ob_get_clean();
74 $data = [
75 'template' => 'elementor/archive/archive-description',
76 'controllers' => $controllers,
77 'content' => $content,
78 ];
79 Fns::load_template( $data['template'], $data );
80 $this->theme_support( 'render_reset' );
81
82 }
83
84 }
85