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 / Controls / ActionsBtnSettings.php

ActionsBtnSettings.php in ShopBuilder – WooCommerce Builder For Elementor 1.1.4, at app/Elementor/Widgets/Controls/ActionsBtnSettings.php

114 lines 3.0 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\Controls;
9
10 use RadiusTheme\SB\Helpers\Fns;
11
12 // Do not allow directly accessing this file.
13 if ( ! defined( 'ABSPATH' ) ) {
14 exit( 'This script cannot be accessed directly.' );
15 }
16
17 /**
18 * Product Description class
19 */
20 class ActionsBtnSettings {
21 /**
22 * Widget Field
23 *
24 * @return array
25 */
26 public static function widget_fields( $widget ) {
27 return self::general_section() +
28 self::module_icons() +
29 self::module_button( $widget );
30 }
31 /**
32 * Widget Field
33 *
34 * @return array
35 */
36 public static function general_section() {
37 $fields = [
38 'sec_general' => [
39 'mode' => 'section_start',
40 'label' => esc_html__( 'General', 'shopbuilder' ),
41 ],
42 'general_style_end' => [
43 'mode' => 'section_end',
44 ],
45 ];
46 $module_switch = ModuleBtnControls::module_switch();
47 unset( $module_switch['quick_view_button'] );
48 $module_switch['wishlist_button']['separator'] = 'default';
49 $fields = Fns::insert_controls( 'sec_general', $fields, $module_switch, true );
50 return $fields;
51 }
52 /**
53 * Widget Field
54 *
55 * @return array
56 */
57 public static function module_button( $widget ) {
58 $fields = ModuleBtnControls::module_button_style( $widget );
59 if( ! empty( $fields )) {
60 $fields['module_section']['label'] = esc_html__('Wishlist & Compare', 'shopbuilder');
61 $fields['module_section']['conditions']['terms'] = [
62 [
63 'name' => 'wishlist_button',
64 'operator' => '===',
65 'value' => 'yes',
66 ],
67 [
68 'name' => 'comparison_button',
69 'operator' => '===',
70 'value' => 'yes',
71 ],
72 ];
73 }
74 return $fields;
75 }
76 /**
77 * Widget Field
78 *
79 * @return array
80 */
81 public static function module_icons() {
82
83 $fields['module_icon_style_section'] = [
84 'mode' => 'section_start',
85 'label' => esc_html__( 'Icons', 'shopbuilder' ),
86 'conditions' => [
87 'terms' => [
88 [
89 'name' => 'wishlist_button',
90 'operator' => '===',
91 'value' => 'yes',
92 ],
93 [
94 'name' => 'comparison_button',
95 'operator' => '===',
96 'value' => 'yes',
97 ],
98 ],
99 ],
100 ];
101
102 $fields = $fields + ModuleBtnControls::module_icons();
103
104 unset( $fields['quick_view_icon'] );
105
106 $fields['module_icon_style_section_end'] = [
107 'mode' => 'section_end',
108 ];
109
110 return $fields;
111 }
112
113 }
114