PluginProbe
ShopBuilder – WooCommerce Builder For Elementor / 2.1.3
ShopBuilder – WooCommerce Builder For Elementor v2.1.3
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
← All changes | app/Models/ModuleList.php +35 -154 2.1.92.1.3 View file →
@@ -1,41 +1,25 @@
1 1 <?php
2 -/**
3 - * ShopBuilder Module List.
4 - *
5 - * @package RadiusTheme\SB
6 - */
7 2
8 3 namespace RadiusTheme\SB\Models;
9 4
10 5 use RadiusTheme\SB\Helpers\Fns;
11 6 use RadiusTheme\SB\Models\Base\ListModel;
12 -use RadiusTheme\SB\Traits\SingletonTrait;
13 7 use RadiusTheme\SB\Modules\Compare\Compare;
14 -use RadiusTheme\SB\Modules\WishList\Wishlist;
15 8 use RadiusTheme\SB\Modules\Compare\CompareFns;
16 9 use RadiusTheme\SB\Modules\QuickView\QuickView;
10 +use RadiusTheme\SB\Modules\WishList\Wishlist;
17 11 use RadiusTheme\SB\Modules\WishList\WishlistFns;
12 +use RadiusTheme\SB\Traits\SingletonTrait;
18 13
19 14 defined( 'ABSPATH' ) || exit;
20 15
21 -/**
22 - * ShopBuilder Module List.
23 - */
24 16 class ModuleList extends ListModel {
25 17
26 18 use SingletonTrait;
27 19
28 - /**
29 - * List ID.
30 - *
31 - * @var string
32 - */
33 20 protected $list_id = 'modules';
34 21
35 - /**
36 - * Class constructor.
37 - */
38 22 public function __construct() {
39 23 parent::__construct();
40 24 $this->title = esc_html__( 'Modules', 'shopbuilder' );
41 25 $this->description = esc_html__( 'Here you can find the list of all the modules. You can individually enable or disable the modules. Or you can do that by one click.', 'shopbuilder' );
@@ -40,13 +24,8 @@
40 24 $this->title = esc_html__( 'Modules', 'shopbuilder' );
41 25 $this->description = esc_html__( 'Here you can find the list of all the modules. You can individually enable or disable the modules. Or you can do that by one click.', 'shopbuilder' );
42 26 }
43 27
44 - /**
45 - * Module list.
46 - *
47 - * @return mixed|null
48 - */
49 28 protected function raw_list() {
50 29 $list = [
51 30 'quick_view' => apply_filters(
52 31 'rtsb/module/quick_view/options',
@@ -60,16 +39,8 @@
60 39 'active_field' => [
61 40 'label' => esc_html__( 'Enable Quick View?', 'shopbuilder' ),
62 41 'help' => esc_html__( 'Switch on to enable quick view module.', 'shopbuilder' ),
63 42 ],
64 - 'tabs' => [
65 - 'general' => [
66 - 'title' => esc_html__( 'General', 'shopbuilder' ),
67 - ],
68 - 'style' => [
69 - 'title' => esc_html__( 'Style', 'shopbuilder' ),
70 - ],
71 - ],
72 43 'fields' => apply_filters(
73 44 'rtsb/module/quick_view/fields',
74 45 [
75 46 'loop_btn_position' => [
@@ -77,9 +48,8 @@
77 48 'type' => 'select',
78 49 'value' => 'custom',
79 50 'label' => esc_html__( 'Shop Page Button Position', 'shopbuilder' ),
80 51 'help' => esc_html__( 'You can manage quick view button position in shop page.', 'shopbuilder' ),
81 - 'tab' => 'general',
82 52 'options' => [
83 53 'before_add_to_cart' => esc_html__( 'Before Add To Cart', 'shopbuilder' ),
84 54 'after_add_to_cart' => esc_html__( 'After Add To Cart', 'shopbuilder' ),
85 55 'shortcode' => esc_html__( 'Use Shortcode', 'shopbuilder' ),
@@ -84,9 +54,8 @@
84 54 'after_add_to_cart' => esc_html__( 'After Add To Cart', 'shopbuilder' ),
85 55 'shortcode' => esc_html__( 'Use Shortcode', 'shopbuilder' ),
86 56 'custom' => esc_html__( 'Custom Position', 'shopbuilder' ),
87 57 ],
88 -
89 58 ],
90 59 'loop_btn_position_shortcode' => [
91 60 'type' => 'raw',
92 61 'label' => ' ',
@@ -94,9 +63,8 @@
94 63 /* translators: 1: The shortcode.*/
95 64 esc_html__( 'Choose where to show button in WooCommerce product\'s loop. Copy this shortcode %1$s and paste it where you want to show the button.', 'shopbuilder' ),
96 65 '<code>[rtsb_quick_view_button]</code>'
97 66 ),
98 - 'tab' => 'general',
99 67 'dependency' => [
100 68 'rules' => [
101 69 [
102 70 'item' => 'modules.quick_view.loop_btn_position',
@@ -114,9 +82,8 @@
114 82 /* translators: 1: The shortcode.*/
115 83 esc_html__( 'Or Copy the php code %1$s and paste it in your product query where you want to show the button.', 'shopbuilder' ),
116 84 "<code>&lt;?php do_action( 'rtsb/modules/quick_view/frontend/display' ); ?&gt;</code>"
117 85 ),
118 - 'tab' => 'general',
119 86 'dependency' => [
120 87 'rules' => [
121 88 [
122 89 'item' => 'modules.quick_view.loop_btn_position',
@@ -133,9 +100,8 @@
133 100 'size' => 'small',
134 101 'min' => 0,
135 102 'max' => 999,
136 103 'label' => esc_html__( 'Hook Priority', 'shopbuilder' ),
137 - 'tab' => 'general',
138 104 'dependency' => [
139 105 'rules' => [
140 106 [
141 107 'item' => 'modules.quick_view.loop_btn_position',
@@ -151,64 +117,9 @@
151 117 'help' => esc_html__( 'Enter your quick view button text.', 'shopbuilder' ),
152 118 'type' => 'text',
153 119 'value' => 'Quick View',
154 120 'placeholder' => 'Quick View',
155 - 'tab' => 'general',
156 121 ],
157 -
158 - // Module Style.
159 - 'modal_width' => [
160 - 'id' => 'modal_width',
161 - 'label' => esc_html__( 'Modal Width (in px)', 'shopbuilder' ),
162 - 'help' => esc_html__( 'Quick view button modal width. Example: 950', 'shopbuilder' ),
163 - 'type' => 'number',
164 - 'value' => '',
165 - 'tab' => 'style',
166 - ],
167 -
168 - 'modal_height' => [
169 - 'id' => 'modal_height',
170 - 'label' => esc_html__( 'Modal Height', 'shopbuilder' ),
171 - 'help' => esc_html__( 'Quick view button modal height. Example: 450px', 'shopbuilder' ),
172 - 'type' => 'text',
173 - 'value' => '',
174 - 'tab' => 'style',
175 - ],
176 -
177 - 'modal_wrapper_padding' => [
178 - 'id' => 'modal_wrapper_padding',
179 - 'label' => esc_html__( 'Modal Wrapper Padding', 'shopbuilder' ),
180 - 'help' => esc_html__( 'Quick view modal wrapper padding. Example 1: 20px, Example 2: 20px 20px 20px 20px', 'shopbuilder' ),
181 - 'type' => 'text',
182 - 'value' => '',
183 - 'tab' => 'style',
184 - ],
185 - 'modal_bg_color' => [
186 - 'id' => 'modal_bg_color',
187 - 'label' => esc_html__( 'Modal Backgroud Color', 'shopbuilder' ),
188 - 'help' => esc_html__( 'Quick view modal background color. Example: #fff', 'shopbuilder' ),
189 - 'type' => 'color',
190 - 'value' => '',
191 - 'tab' => 'style',
192 - ],
193 - 'modal_box_shadow_color' => [
194 - 'id' => 'modal_box_shadow_color',
195 - 'label' => esc_html__( 'Modal Box Shadow Color', 'shopbuilder' ),
196 - 'help' => esc_html__( 'Quick view modal box shadow. Example: #000', 'shopbuilder' ),
197 - 'type' => 'color',
198 - 'value' => '',
199 - 'tab' => 'style',
200 - ],
201 -
202 - 'modal_overly_color' => [
203 - 'id' => 'modal_overly_color',
204 - 'label' => esc_html__( 'Modal Overly Color', 'shopbuilder' ),
205 - 'help' => esc_html__( 'Quick view modal overly. Example: #000', 'shopbuilder' ),
206 - 'type' => 'color',
207 - 'value' => '',
208 - 'tab' => 'style',
209 - ],
210 -
211 122 ]
212 123 ),
213 124 ]
214 125 ),
@@ -234,24 +145,8 @@
234 145 'label' => esc_html__( 'Limit Wishlist Use', 'shopbuilder' ),
235 146 'help' => esc_html__( 'Enable this option to allow only the logged-in users to use the Wishlist feature.', 'shopbuilder' ),
236 147 'tab' => 'general',
237 148 ],
238 - 'hide_wishlist_non_logged_in' => [
239 - 'id' => 'hide_wishlist_non_logged_in',
240 - 'type' => 'switch',
241 - 'label' => esc_html__( 'Hide Wishlist Button', 'shopbuilder' ),
242 - 'help' => esc_html__( 'Hide Wishlist Button For non logged-in users (guest users).', 'shopbuilder' ),
243 - 'dependency' => [
244 - 'rules' => [
245 - [
246 - 'item' => 'modules.wishlist.enable_login_limit',
247 - 'value' => 'on',
248 - 'operator' => '==',
249 - ],
250 - ],
251 - ],
252 - 'tab' => 'general',
253 - ],
254 149 'wishlist_shop_wrapper_heading' => [
255 150 'id' => 'wishlist_shop_wrapper_heading',
256 151 'type' => 'title',
257 152 'label' => esc_html__( 'Shop Page Settings', 'shopbuilder' ),
@@ -943,50 +838,22 @@
943 838 ],
944 839 'fields' => [],
945 840 ]
946 841 ),
947 - 'product_badges' => apply_filters(
948 - 'rtsb/module/product_badges/options',
842 + 'sales_notification' => apply_filters(
843 + 'rtsb/module/sales_notification/options',
949 844 [
950 - 'id' => 'product_badges',
845 + 'id' => 'sales_notification',
951 846 'active' => '',
952 - 'title' => esc_html__( 'Product Badges', 'shopbuilder' ),
847 + 'title' => esc_html__( 'Sales Notification', 'shopbuilder' ),
953 848 'package' => $this->pro_package(),
954 849 'active_field' => [
955 - 'label' => esc_html__( 'Enable Product Badges?', 'shopbuilder' ),
956 - 'help' => esc_html__( 'Switch on to enable product badges module.', 'shopbuilder' ),
850 + 'label' => esc_html__( 'Enable Sales Notification?', 'shopbuilder' ),
851 + 'help' => esc_html__( 'Switch on to enable Sales Notification module.', 'shopbuilder' ),
957 852 ],
958 853 'fields' => [],
959 854 ]
960 855 ),
961 - 'product_size_chart' => apply_filters(
962 - 'rtsb/module/product_size_chart/options',
963 - [
964 - 'id' => 'product_size_chart',
965 - 'active' => '',
966 - 'title' => esc_html__( 'Product Size Chart', 'shopbuilder' ),
967 - 'package' => $this->pro_package(),
968 - 'active_field' => [
969 - 'label' => esc_html__( 'Enable Product Size Chart?', 'shopbuilder' ),
970 - 'help' => esc_html__( 'Switch on to enable Product Size Chart module.', 'shopbuilder' ),
971 - ],
972 - 'fields' => [],
973 - ]
974 - ),
975 - 'back_order' => apply_filters(
976 - 'rtsb/module/back_order/options',
977 - [
978 - 'id' => 'back_order',
979 - 'active' => '',
980 - 'title' => esc_html__( 'Back-Order', 'shopbuilder' ),
981 - 'package' => $this->pro_package(),
982 - 'active_field' => [
983 - 'label' => esc_html__( 'Enable Back-Order?', 'shopbuilder' ),
984 - 'help' => esc_html__( 'Switch on to enable back-order module.', 'shopbuilder' ),
985 - ],
986 - 'fields' => [],
987 - ]
988 - ),
989 856 'flash_sale_countdown' => apply_filters(
990 857 'rtsb/module/flash_sale_countdown/options',
991 858 [
992 859 'id' => 'flash_sale_countdown',
@@ -999,19 +866,20 @@
999 866 ],
1000 867 'fields' => [],
1001 868 ]
1002 869 ),
1003 - 'sales_notification' => apply_filters(
1004 - 'rtsb/module/sales_notification/options',
870 + 'mini_cart' => apply_filters(
871 + 'rtsb/module/mini_cart/options',
1005 872 [
1006 - 'id' => 'sales_notification',
873 + 'id' => 'mini_cart',
1007 874 'active' => '',
1008 - 'title' => esc_html__( 'Sales Notification', 'shopbuilder' ),
875 + 'title' => esc_html__( 'Mini Cart', 'shopbuilder' ),
1009 876 'package' => $this->pro_package(),
1010 877 'active_field' => [
1011 - 'label' => esc_html__( 'Enable Sales Notification?', 'shopbuilder' ),
1012 - 'help' => esc_html__( 'Switch on to enable Sales Notification module.', 'shopbuilder' ),
878 + 'label' => esc_html__( 'Enable Mini Cart?', 'shopbuilder' ),
879 + 'help' => esc_html__( 'Switch on to enable mini cart module.', 'shopbuilder' ),
1013 880 ],
881 + 'is_active' => true,
1014 882 'fields' => [],
1015 883 ]
1016 884 ),
1017 885 'quick_checkout' => apply_filters(
@@ -1041,23 +909,36 @@
1041 909 ],
1042 910 'fields' => [],
1043 911 ]
1044 912 ),
1045 - 'mini_cart' => apply_filters(
1046 - 'rtsb/module/mini_cart/options',
913 + 'product_size_chart' => apply_filters(
914 + 'rtsb/module/product_size_chart/options',
1047 915 [
1048 - 'id' => 'mini_cart',
916 + 'id' => 'product_size_chart',
1049 917 'active' => '',
1050 - 'title' => esc_html__( 'Mini Cart', 'shopbuilder' ),
918 + 'title' => esc_html__( 'Product Size Chart', 'shopbuilder' ),
1051 919 'package' => $this->pro_package(),
1052 920 'active_field' => [
1053 - 'label' => esc_html__( 'Enable Mini Cart?', 'shopbuilder' ),
1054 - 'help' => esc_html__( 'Switch on to enable mini cart module.', 'shopbuilder' ),
921 + 'label' => esc_html__( 'Enable Product Size Chart?', 'shopbuilder' ),
922 + 'help' => esc_html__( 'Switch on to enable Product Size Chart module.', 'shopbuilder' ),
1055 923 ],
1056 - 'is_active' => true,
1057 924 'fields' => [],
1058 925 ]
1059 926 ),
927 +// 'product_badges' => apply_filters(
928 +// 'rtsb/module/product_badges/options',
929 +// [
930 +// 'id' => 'product_badges',
931 +// 'active' => '',
932 +// 'title' => esc_html__( 'Product Badges', 'shopbuilder' ),
933 +// 'package' => $this->pro_package(),
934 +// 'active_field' => [
935 +// 'label' => esc_html__( 'Enable Product Badges?', 'shopbuilder' ),
936 +// 'help' => esc_html__( 'Switch on to enable product badges module.', 'shopbuilder' ),
937 +// ],
938 +// 'fields' => [],
939 +// ]
940 +// ),
1060 941 ];
1061 942 return apply_filters( 'rtsb/core/modules/raw_list', $list );
1062 943 }
1063 944 }