PluginProbe
ShopBuilder – WooCommerce Builder For Elementor / 3.2.1
ShopBuilder – WooCommerce Builder For Elementor v3.2.1
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 3.2.1, at app/Elementor/Widgets/Archive/ArchiveResultCount.php

72 lines 1.6 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 return ArchiveCountSettings::widget_fields( $this );
43 }
44
45 /**
46 * Render Function
47 *
48 * @return void
49 */
50 protected function render() {
51 $controllers = $this->get_settings_for_display();
52
53 $this->theme_support();
54
55 $data = [
56 'template' => 'elementor/archive/result-count',
57 'controllers' => $controllers,
58 ];
59
60 if ( BuilderFns::is_builder_preview() ) { ?>
61 <div class="rtsb-archive-result-count">
62 <p class="woocommerce-result-count"><?php esc_html_e( 'Showing all results', 'shopbuilder' ); ?></p>
63 </div>
64 <?php
65 } else {
66 Fns::load_template( $data['template'], $data );
67 }
68
69 $this->theme_support( 'render_reset' );
70 }
71 }
72