PluginProbe
ShopBuilder – WooCommerce Builder For Elementor / 2.0.0
ShopBuilder – WooCommerce Builder For Elementor v2.0.0
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 / Controllers / ThemesSupport / Helloelementor / WidgetsSupport.php

WidgetsSupport.php in ShopBuilder – WooCommerce Builder For Elementor 2.0.0, at app/Controllers/ThemesSupport/Helloelementor/WidgetsSupport.php

81 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 /**
4 * Main ProductDescription class.
5 *
6 * @package RadiusTheme\SB
7 */
8
9 namespace RadiusTheme\SB\Controllers\ThemesSupport\Helloelementor;
10
11 // Do not allow directly accessing this file.
12 if ( ! defined( 'ABSPATH' ) ) {
13 exit( 'This script cannot be accessed directly.' );
14 }
15
16 /**
17 * Product Description class
18 */
19 class WidgetsSupport {
20
21 /**
22 * The single instance of the class.
23 *
24 * @var object
25 */
26 protected static $instance = null;
27
28 /**
29 * The single instance of the class.
30 *
31 * @var object
32 */
33 private $widgets;
34
35 /**
36 * Construct function
37 */
38 private function __construct() {}
39 /**
40 * Get class instance.
41 *
42 * @return object Instance.
43 */
44 public static function instance( $widgets ) {
45 if ( ! self::$instance ) {
46 self::$instance = new self();
47 }
48 self::$instance->widgets = $widgets;
49 return self::$instance;
50 }
51
52 /**
53 * The function name comes from the widget base name "rtsb-products-archive". This is for theme support prefix with "widget_controls".
54 *
55 * @return void
56 */
57 public function widget_controls_rtsb_products_archive() {
58 add_filter( 'rtsb/elements/elementor/widgets/controls/rtsb-products-archive', [ $this, 'product_loop_widget_controls_support' ], 11 );
59 }
60 /**
61 * Widget Field.
62 *
63 * @return array
64 */
65 public function product_loop_widget_controls_support( $fields ) {
66 if ( $this->widgets->has_pagination ) {
67 $fields['prev_icon']['default'] = [
68 'value' => 'fas fa-long-arrow-alt-left',
69 'library' => 'fa-solid',
70 ];
71 $fields['next_icon']['default'] = [
72 'value' => 'fas fa-long-arrow-alt-right',
73 'library' => 'fa-solid',
74 ];
75 }
76 return $fields;
77 }
78
79
80 }
81