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 / ArchiveResultCount.php

ArchiveResultCount.php in ShopBuilder – WooCommerce Builder For Elementor 1.1.4, at app/Elementor/Widgets/Archive/ArchiveResultCount.php

71 lines 1.8 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\ArchiveCountSettings;
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 /**
22 * Product Description class
23 */
24 class ArchiveResultCount extends ElementorWidgetBase {
25 /**
26 * Construct function
27 *
28 * @param array $data default array.
29 * @param mixed $args default arg.
30 */
31 public function __construct( $data = [], $args = null ) {
32 $this->rtsb_name = esc_html__( 'Result Count', 'shopbuilder' );
33 $this->rtsb_base = 'rtsb-archive-result-count';
34 parent::__construct( $data, $args );
35 }
36 /**
37 * Widget Field
38 *
39 * @return array
40 */
41 public function widget_fields() {
42 $fields = ArchiveCountSettings::widget_fields( $this );
43 return apply_filters( 'rtsb/elements/elementor/archive/' . $this->rtsb_base, $fields, $this );
44 }
45
46 /**
47 * Render Function
48 *
49 * @return void
50 */
51 protected function render() {
52 $controllers = $this->get_settings_for_display();
53 $this->theme_support();
54 $data = [
55 'template' => 'elementor/archive/result-count',
56 'controllers' => $controllers,
57 ];
58
59 if ( BuilderFns::is_builder_preview() ) { ?>
60 <div class="rtsb-archive-result-count">
61 <p class="woocommerce-result-count"><?php esc_html_e( 'Showing results', 'shopbuilder' ); ?></p>
62 </div>
63 <?php
64 } else {
65 Fns::load_template( $data['template'], $data );
66 }
67 $this->theme_support( 'render_reset' );
68 }
69
70 }
71