PluginProbe
ShopBuilder – WooCommerce Builder For Elementor / 1.1.4
ShopBuilder – WooCommerce Builder For Elementor v1.1.4
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 1.1.4, at app/Elementor/Widgets/Archive/ArchiveDescription.php

86 lines 2.3 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 $fields = ArchiveDescSettings::widget_fields( $this );
42 return apply_filters( 'rtsb/elements/elementor/archive/' . $this->rtsb_base, $fields, $this );
43 }
44 /**
45 * Set Widget Keyword.
46 *
47 * @return array
48 */
49 public function get_keywords() {
50 return [ 'Archive' ] + parent::get_keywords();
51 }
52 /**
53 * Render Function
54 *
55 * @return void
56 */
57 protected function render() {
58 $controllers = $this->get_settings_for_display();
59 $this->theme_support();
60 ob_start();
61 if ( BuilderFns::is_builder_preview() ) {
62 ?>
63 <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>
64 <?php
65 } else {
66 /**
67 * Hook: woocommerce_archive_description.
68 *
69 * @hooked woocommerce_taxonomy_archive_description - 10
70 * @hooked woocommerce_product_archive_description - 10
71 */
72 echo get_the_archive_description(); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
73 }
74 $content = ob_get_clean();
75 $data = [
76 'template' => 'elementor/archive/archive-description',
77 'controllers' => $controllers,
78 'content' => $content,
79 ];
80 Fns::load_template( $data['template'], $data );
81 $this->theme_support( 'render_reset' );
82
83 }
84
85 }
86