| @@ -1,1079 +1,835 @@ | ||
| 1 | -<?php | |
| 2 | -/** | |
| 3 | - * ShopBuilder Module List. | |
| 4 | - * | |
| 5 | - * @package RadiusTheme\SB | |
| 6 | - */ | |
| 7 | - | |
| 8 | -namespace RadiusTheme\SB\Models; | |
| 9 | - | |
| 10 | -use RadiusTheme\SB\Helpers\Fns; | |
| 11 | -use RadiusTheme\SB\Models\Base\ListModel; | |
| 12 | -use RadiusTheme\SB\Traits\SingletonTrait; | |
| 13 | -use RadiusTheme\SB\Modules\Compare\Compare; | |
| 14 | -use RadiusTheme\SB\Modules\WishList\Wishlist; | |
| 15 | -use RadiusTheme\SB\Modules\Compare\CompareFns; | |
| 16 | -use RadiusTheme\SB\Modules\QuickView\QuickView; | |
| 17 | -use RadiusTheme\SB\Modules\WishList\WishlistFns; | |
| 18 | - | |
| 19 | -defined( 'ABSPATH' ) || exit; | |
| 20 | - | |
| 21 | -/** | |
| 22 | - * ShopBuilder Module List. | |
| 23 | - */ | |
| 24 | -class ModuleList extends ListModel { | |
| 25 | - | |
| 26 | - use SingletonTrait; | |
| 27 | - | |
| 28 | - /** | |
| 29 | - * List ID. | |
| 30 | - * | |
| 31 | - * @var string | |
| 32 | - */ | |
| 33 | - protected $list_id = 'modules'; | |
| 34 | - | |
| 35 | - /** | |
| 36 | - * Class constructor. | |
| 37 | - */ | |
| 38 | - public function __construct() { | |
| 39 | - parent::__construct(); | |
| 40 | - $this->title = esc_html__( 'Modules', 'shopbuilder' ); | |
| 41 | - $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 | - } | |
| 43 | - | |
| 44 | - /** | |
| 45 | - * Module list. | |
| 46 | - * | |
| 47 | - * @return mixed|null | |
| 48 | - */ | |
| 49 | - protected function raw_list() { | |
| 50 | - $list = [ | |
| 51 | - 'quick_view' => apply_filters( | |
| 52 | - 'rtsb/module/quick_view/options', | |
| 53 | - [ | |
| 54 | - 'id' => 'quick_view', | |
| 55 | - 'title' => esc_html__( 'Quick View', 'shopbuilder' ), | |
| 56 | - 'base_class' => QuickView::class, | |
| 57 | - 'category' => 'general', | |
| 58 | - 'active' => 'on', | |
| 59 | - 'package' => 'free', | |
| 60 | - 'active_field' => [ | |
| 61 | - 'label' => esc_html__( 'Enable Quick View?', 'shopbuilder' ), | |
| 62 | - 'help' => esc_html__( 'Switch on to enable quick view module.', 'shopbuilder' ), | |
| 63 | - ], | |
| 64 | - 'tabs' => [ | |
| 65 | - 'general' => [ | |
| 66 | - 'title' => esc_html__( 'General', 'shopbuilder' ), | |
| 67 | - ], | |
| 68 | - 'style' => [ | |
| 69 | - 'title' => esc_html__( 'Style', 'shopbuilder' ), | |
| 70 | - ], | |
| 71 | - ], | |
| 72 | - 'fields' => apply_filters( | |
| 73 | - 'rtsb/module/quick_view/fields', | |
| 74 | - [ | |
| 75 | - 'loop_btn_position' => [ | |
| 76 | - 'id' => 'loop_btn_position', | |
| 77 | - 'type' => 'select', | |
| 78 | - 'value' => 'custom', | |
| 79 | - 'label' => esc_html__( 'Shop Page Button Position', 'shopbuilder' ), | |
| 80 | - 'help' => esc_html__( 'You can manage quick view button position in shop page.', 'shopbuilder' ), | |
| 81 | - 'tab' => 'general', | |
| 82 | - 'options' => [ | |
| 83 | - 'before_add_to_cart' => esc_html__( 'Before Add To Cart', 'shopbuilder' ), | |
| 84 | - 'after_add_to_cart' => esc_html__( 'After Add To Cart', 'shopbuilder' ), | |
| 85 | - 'shortcode' => esc_html__( 'Use Shortcode', 'shopbuilder' ), | |
| 86 | - 'custom' => esc_html__( 'Custom Position', 'shopbuilder' ), | |
| 87 | - ], | |
| 88 | - | |
| 89 | - ], | |
| 90 | - 'loop_btn_position_shortcode' => [ | |
| 91 | - 'type' => 'raw', | |
| 92 | - 'label' => ' ', | |
| 93 | - 'html' => sprintf( | |
| 94 | - /* translators: 1: The shortcode.*/ | |
| 95 | - 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 | - '<code>[rtsb_quick_view_button]</code>' | |
| 97 | - ), | |
| 98 | - 'tab' => 'general', | |
| 99 | - 'dependency' => [ | |
| 100 | - 'rules' => [ | |
| 101 | - [ | |
| 102 | - 'item' => 'modules.quick_view.loop_btn_position', | |
| 103 | - 'value' => 'shortcode', | |
| 104 | - 'operator' => '==', | |
| 105 | - ], | |
| 106 | - ], | |
| 107 | - ], | |
| 108 | - ], | |
| 109 | - 'loop_custom_hook_name' => [ | |
| 110 | - 'id' => 'loop_custom_hook_name', | |
| 111 | - 'type' => 'text', | |
| 112 | - 'label' => esc_html__( 'Enter Hook Name', 'shopbuilder' ), | |
| 113 | - 'help' => sprintf( | |
| 114 | - /* translators: 1: The shortcode.*/ | |
| 115 | - 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 | - "<br /><code><?php do_action( 'rtsb/modules/quick_view/frontend/display' ); ?></code><br />" | |
| 117 | - ), | |
| 118 | - 'tab' => 'general', | |
| 119 | - 'dependency' => [ | |
| 120 | - 'rules' => [ | |
| 121 | - [ | |
| 122 | - 'item' => 'modules.quick_view.loop_btn_position', | |
| 123 | - 'value' => 'custom', | |
| 124 | - 'operator' => '==', | |
| 125 | - ], | |
| 126 | - ], | |
| 127 | - ], | |
| 128 | - ], | |
| 129 | - 'loop_custom_hook_priority' => [ | |
| 130 | - 'id' => 'loop_custom_hook_priority', | |
| 131 | - 'type' => 'number', | |
| 132 | - 'value' => 10, | |
| 133 | - 'size' => 'small', | |
| 134 | - 'min' => 0, | |
| 135 | - 'max' => 999, | |
| 136 | - 'label' => esc_html__( 'Hook Priority', 'shopbuilder' ), | |
| 137 | - 'tab' => 'general', | |
| 138 | - 'dependency' => [ | |
| 139 | - 'rules' => [ | |
| 140 | - [ | |
| 141 | - 'item' => 'modules.quick_view.loop_btn_position', | |
| 142 | - 'value' => 'custom', | |
| 143 | - 'operator' => '==', | |
| 144 | - ], | |
| 145 | - ], | |
| 146 | - ], | |
| 147 | - ], | |
| 148 | - 'button_text' => [ | |
| 149 | - 'id' => 'button_text', | |
| 150 | - 'label' => esc_html__( 'Quick View Text', 'shopbuilder' ), | |
| 151 | - 'help' => esc_html__( 'Enter your quick view button text.', 'shopbuilder' ), | |
| 152 | - 'type' => 'text', | |
| 153 | - 'value' => 'Quick View', | |
| 154 | - 'placeholder' => 'Quick View', | |
| 155 | - 'tab' => 'general', | |
| 156 | - ], | |
| 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 | - ] | |
| 212 | - ), | |
| 213 | - ] | |
| 214 | - ), | |
| 215 | - 'wishlist' => apply_filters( | |
| 216 | - 'rtsb/module/wishlist/options', | |
| 217 | - [ | |
| 218 | - 'id' => 'wishlist', | |
| 219 | - 'title' => esc_html__( 'Wishlist', 'shopbuilder' ), | |
| 220 | - 'package' => 'free', | |
| 221 | - 'active' => 'on', | |
| 222 | - 'base_class' => Wishlist::class, | |
| 223 | - 'category' => 'general', | |
| 224 | - 'active_field' => [ | |
| 225 | - 'label' => esc_html__( 'Enable Wishlist?', 'shopbuilder' ), | |
| 226 | - 'help' => esc_html__( 'Switch on to enable wishlist module.', 'shopbuilder' ), | |
| 227 | - ], | |
| 228 | - 'fields' => apply_filters( | |
| 229 | - 'rtsb/module/wishlist/fields', | |
| 230 | - [ | |
| 231 | - 'enable_login_limit' => [ | |
| 232 | - 'id' => 'enable_login_limit', | |
| 233 | - 'type' => 'switch', | |
| 234 | - 'label' => esc_html__( 'Limit Wishlist Use', 'shopbuilder' ), | |
| 235 | - 'help' => esc_html__( 'Enable this option to allow only the logged-in users to use the Wishlist feature.', 'shopbuilder' ), | |
| 236 | - 'tab' => 'general', | |
| 237 | - ], | |
| 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 | - 'wishlist_shop_wrapper_heading' => [ | |
| 255 | - 'id' => 'wishlist_shop_wrapper_heading', | |
| 256 | - 'type' => 'title', | |
| 257 | - 'label' => esc_html__( 'Shop Page Settings', 'shopbuilder' ), | |
| 258 | - 'tab' => 'button', | |
| 259 | - ], | |
| 260 | - 'show_btn_on_loop' => [ | |
| 261 | - 'id' => 'show_btn_on_loop', | |
| 262 | - 'value' => 'on', | |
| 263 | - 'type' => 'switch', | |
| 264 | - 'label' => esc_html__( 'Show in Shop Page', 'shopbuilder' ), | |
| 265 | - 'tab' => 'button', | |
| 266 | - ], | |
| 267 | - 'loop_btn_position' => [ | |
| 268 | - 'id' => 'loop_btn_position', | |
| 269 | - 'type' => 'select', | |
| 270 | - 'value' => 'custom', | |
| 271 | - 'label' => esc_html__( 'Shop Page Button Position', 'shopbuilder' ), | |
| 272 | - 'help' => esc_html__( 'You can manage wishlist button position in shop page.', 'shopbuilder' ), | |
| 273 | - 'options' => [ | |
| 274 | - 'before_add_to_cart' => esc_html__( 'Before Add To Cart', 'shopbuilder' ), | |
| 275 | - 'after_add_to_cart' => esc_html__( 'After Add To Cart', 'shopbuilder' ), | |
| 276 | - 'shortcode' => esc_html__( 'Use Shortcode', 'shopbuilder' ), | |
| 277 | - 'custom' => esc_html__( 'Custom Position', 'shopbuilder' ), | |
| 278 | - ], | |
| 279 | - 'dependency' => [ | |
| 280 | - 'rules' => [ | |
| 281 | - [ | |
| 282 | - 'item' => 'modules.wishlist.show_btn_on_loop', | |
| 283 | - 'value' => 'on', | |
| 284 | - 'operator' => '==', | |
| 285 | - ], | |
| 286 | - ], | |
| 287 | - ], | |
| 288 | - 'tab' => 'button', | |
| 289 | - ], | |
| 290 | - 'loop_btn_position_shortcode' => [ | |
| 291 | - 'type' => 'raw', | |
| 292 | - 'label' => ' ', | |
| 293 | - 'html' => sprintf( | |
| 294 | - /* translators: 1: The shortcode.*/ | |
| 295 | - 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' ), | |
| 296 | - '<code>[rtsb_wishlist_button]</code>' | |
| 297 | - ), | |
| 298 | - 'dependency' => [ | |
| 299 | - 'rules' => [ | |
| 300 | - [ | |
| 301 | - 'item' => 'modules.wishlist.show_btn_on_loop', | |
| 302 | - 'value' => 'on', | |
| 303 | - 'operator' => '==', | |
| 304 | - ], | |
| 305 | - [ | |
| 306 | - 'item' => 'modules.wishlist.loop_btn_position', | |
| 307 | - 'value' => 'shortcode', | |
| 308 | - 'operator' => '==', | |
| 309 | - ], | |
| 310 | - ], | |
| 311 | - ], | |
| 312 | - 'tab' => 'button', | |
| 313 | - ], | |
| 314 | - 'loop_custom_hook_name' => [ | |
| 315 | - 'id' => 'loop_custom_hook_name', | |
| 316 | - 'type' => 'text', | |
| 317 | - 'label' => esc_html__( 'Enter Hook Name', 'shopbuilder' ), | |
| 318 | - 'tab' => 'button', | |
| 319 | - 'help' => sprintf( | |
| 320 | - /* translators: 1: The shortcode.*/ | |
| 321 | - esc_html__( 'Or Copy the php code %1$s and paste it in your product query where you want to show the button.', 'shopbuilder' ), | |
| 322 | - "<br /><code><?php do_action('rtsb/modules/wishlist/frontend/display' ); ?></code><br />" | |
| 323 | - ), | |
| 324 | - 'dependency' => [ | |
| 325 | - 'rules' => [ | |
| 326 | - [ | |
| 327 | - 'item' => 'modules.wishlist.show_btn_on_loop', | |
| 328 | - 'value' => 'on', | |
| 329 | - 'operator' => '==', | |
| 330 | - ], | |
| 331 | - [ | |
| 332 | - 'item' => 'modules.wishlist.loop_btn_position', | |
| 333 | - 'value' => 'custom', | |
| 334 | - 'operator' => '==', | |
| 335 | - ], | |
| 336 | - ], | |
| 337 | - ], | |
| 338 | - ], | |
| 339 | - 'loop_custom_hook_priority' => [ | |
| 340 | - 'id' => 'loop_custom_hook_priority', | |
| 341 | - 'type' => 'number', | |
| 342 | - 'value' => 10, | |
| 343 | - 'size' => 'small', | |
| 344 | - 'min' => 0, | |
| 345 | - 'max' => 999, | |
| 346 | - 'label' => esc_html__( 'Hook Priority', 'shopbuilder' ), | |
| 347 | - 'tab' => 'button', | |
| 348 | - 'dependency' => [ | |
| 349 | - 'rules' => [ | |
| 350 | - [ | |
| 351 | - 'item' => 'modules.wishlist.show_btn_on_loop', | |
| 352 | - 'value' => 'on', | |
| 353 | - 'operator' => '==', | |
| 354 | - ], | |
| 355 | - [ | |
| 356 | - 'item' => 'modules.wishlist.loop_btn_position', | |
| 357 | - 'value' => 'custom', | |
| 358 | - 'operator' => '==', | |
| 359 | - ], | |
| 360 | - ], | |
| 361 | - 'relation' => 'and', | |
| 362 | - ], | |
| 363 | - ], | |
| 364 | - 'wishlist_single_wrapper_heading' => [ | |
| 365 | - 'id' => 'wishlist_single_wrapper_heading', | |
| 366 | - 'type' => 'title', | |
| 367 | - 'label' => esc_html__( 'Product Page Settings', 'shopbuilder' ), | |
| 368 | - 'tab' => 'button', | |
| 369 | - ], | |
| 370 | - 'show_btn_product_page' => [ | |
| 371 | - 'id' => 'show_btn_product_page', | |
| 372 | - 'value' => 'on', | |
| 373 | - 'type' => 'switch', | |
| 374 | - 'label' => esc_html__( 'Show in Product Page', 'shopbuilder' ), | |
| 375 | - 'tab' => 'button', | |
| 376 | - ], | |
| 377 | - 'product_btn_position' => [ | |
| 378 | - 'id' => 'product_btn_position', | |
| 379 | - 'label' => esc_html__( 'Product Page Button Position', 'shopbuilder' ), | |
| 380 | - 'help' => esc_html__( 'You can manage compare button position in single product page.', 'shopbuilder' ), | |
| 381 | - 'type' => 'select', | |
| 382 | - 'value' => 'custom', | |
| 383 | - 'options' => [ | |
| 384 | - 'before_add_to_cart' => esc_html__( 'Before Add To Cart', 'shopbuilder' ), | |
| 385 | - 'after_add_to_cart' => esc_html__( 'After Add To Cart', 'shopbuilder' ), | |
| 386 | - 'after_thumbnail' => esc_html__( 'After Image', 'shopbuilder' ), | |
| 387 | - 'after_summary' => esc_html__( 'After Summary', 'shopbuilder' ), | |
| 388 | - 'shortcode' => esc_html__( 'Use Shortcode', 'shopbuilder' ), | |
| 389 | - 'custom' => esc_html__( 'Custom Position', 'shopbuilder' ), | |
| 390 | - ], | |
| 391 | - 'dependency' => [ | |
| 392 | - 'rules' => [ | |
| 393 | - [ | |
| 394 | - 'item' => 'modules.wishlist.show_btn_product_page', | |
| 395 | - 'value' => 'on', | |
| 396 | - 'operator' => '==', | |
| 397 | - ], | |
| 398 | - ], | |
| 399 | - ], | |
| 400 | - 'tab' => 'button', | |
| 401 | - ], | |
| 402 | - 'product_btn_position_shortcode' => [ | |
| 403 | - 'type' => 'raw', | |
| 404 | - 'label' => ' ', | |
| 405 | - 'html' => sprintf( | |
| 406 | - /* translators: 1: The shortcode.*/ | |
| 407 | - esc_html__( 'Choose where to show button on the product page. Copy this shortcode %1$s and paste it where you want to show the button.', 'shopbuilder' ), | |
| 408 | - '<code>[rtsb_wishlist_button]</code>' | |
| 409 | - ), | |
| 410 | - 'dependency' => [ | |
| 411 | - 'rules' => [ | |
| 412 | - [ | |
| 413 | - 'item' => 'modules.wishlist.show_btn_product_page', | |
| 414 | - 'value' => 'on', | |
| 415 | - 'operator' => '==', | |
| 416 | - ], | |
| 417 | - [ | |
| 418 | - 'item' => 'modules.wishlist.product_btn_position', | |
| 419 | - 'value' => 'shortcode', | |
| 420 | - 'operator' => '==', | |
| 421 | - ], | |
| 422 | - ], | |
| 423 | - ], | |
| 424 | - 'tab' => 'button', | |
| 425 | - ], | |
| 426 | - 'product_custom_hook_name' => [ | |
| 427 | - 'id' => 'product_custom_hook_name', | |
| 428 | - 'type' => 'text', | |
| 429 | - 'label' => esc_html__( 'Product Hook Name', 'shopbuilder' ), | |
| 430 | - 'tab' => 'button', | |
| 431 | - 'help' => sprintf( | |
| 432 | - /* translators: 1: The shortcode.*/ | |
| 433 | - esc_html__( 'Or Copy the php code %1$s and paste it in your product query where you want to show the button.', 'shopbuilder' ), | |
| 434 | - "<br /><code><?php do_action('rtsb/modules/wishlist/frontend/display' ); ?></code><br />" | |
| 435 | - ), | |
| 436 | - 'dependency' => [ | |
| 437 | - 'rules' => [ | |
| 438 | - [ | |
| 439 | - 'item' => 'modules.wishlist.show_btn_product_page', | |
| 440 | - 'value' => 'on', | |
| 441 | - 'operator' => '==', | |
| 442 | - ], | |
| 443 | - [ | |
| 444 | - 'item' => 'modules.wishlist.product_btn_position', | |
| 445 | - 'value' => 'custom', | |
| 446 | - 'operator' => '==', | |
| 447 | - ], | |
| 448 | - ], | |
| 449 | - ], | |
| 450 | - ], | |
| 451 | - 'product_custom_hook_priority' => [ | |
| 452 | - 'id' => 'product_custom_hook_priority', | |
| 453 | - 'type' => 'number', | |
| 454 | - 'value' => 10, | |
| 455 | - 'size' => 'small', | |
| 456 | - 'min' => 0, | |
| 457 | - 'max' => 999, | |
| 458 | - 'label' => esc_html__( 'Product Hook Priority', 'shopbuilder' ), | |
| 459 | - 'tab' => 'button', | |
| 460 | - 'dependency' => [ | |
| 461 | - 'rules' => [ | |
| 462 | - [ | |
| 463 | - 'item' => 'modules.wishlist.show_btn_product_page', | |
| 464 | - 'value' => 'on', | |
| 465 | - 'operator' => '==', | |
| 466 | - ], | |
| 467 | - [ | |
| 468 | - 'item' => 'modules.wishlist.product_btn_position', | |
| 469 | - 'value' => 'custom', | |
| 470 | - 'operator' => '==', | |
| 471 | - ], | |
| 472 | - ], | |
| 473 | - 'relation' => 'and', | |
| 474 | - ], | |
| 475 | - ], | |
| 476 | - 'button_text' => [ | |
| 477 | - 'id' => 'button_text', | |
| 478 | - 'label' => esc_html__( 'Wishlist Text', 'shopbuilder' ), | |
| 479 | - 'help' => esc_html__( 'Enter your wishlist button text.', 'shopbuilder' ), | |
| 480 | - 'type' => 'text', | |
| 481 | - 'value' => 'Add to Wishlist', | |
| 482 | - 'placeholder' => 'Add to Wishlist', | |
| 483 | - 'tab' => 'button', | |
| 484 | - ], | |
| 485 | - 'notice_added_text' => [ | |
| 486 | - 'id' => 'notice_added_text', | |
| 487 | - 'label' => esc_html__( 'Product Added Text', 'shopbuilder' ), | |
| 488 | - 'help' => esc_html__( 'Enter the product added text.', 'shopbuilder' ), | |
| 489 | - 'type' => 'text', | |
| 490 | - 'value' => esc_html__( 'Product added!', 'shopbuilder' ), | |
| 491 | - 'placeholder' => esc_html__( 'Product added!', 'shopbuilder' ), | |
| 492 | - 'tab' => 'general', | |
| 493 | - ], | |
| 494 | - 'notice_removed_text' => [ | |
| 495 | - 'id' => 'notice_removed_text', | |
| 496 | - 'label' => esc_html__( 'Product Removed Text', 'shopbuilder' ), | |
| 497 | - 'help' => esc_html__( 'Enter the product removed text.', 'shopbuilder' ), | |
| 498 | - 'type' => 'text', | |
| 499 | - 'value' => esc_html__( 'Product removed!', 'shopbuilder' ), | |
| 500 | - 'placeholder' => esc_html__( 'Product removed!', 'shopbuilder' ), | |
| 501 | - 'tab' => 'general', | |
| 502 | - ], | |
| 503 | - 'browse_list_text' => [ | |
| 504 | - 'id' => 'browse_list_text', | |
| 505 | - 'label' => esc_html__( 'Browse Wishlist Text', 'shopbuilder' ), | |
| 506 | - 'help' => esc_html__( 'Enter a text for the "Browse wishlist" link on the product page', 'shopbuilder' ), | |
| 507 | - 'type' => 'text', | |
| 508 | - 'value' => esc_html__( 'Browse Wishlist', 'shopbuilder' ), | |
| 509 | - 'placeholder' => esc_html__( 'Browse Wishlist', 'shopbuilder' ), | |
| 510 | - 'tab' => 'general', | |
| 511 | - ], | |
| 512 | - /* | |
| 513 | - * TODO:: Will Implement Later. | |
| 514 | - 'redirect_cart' => array( | |
| 515 | - 'id' => 'redirect_cart', | |
| 516 | - 'type' => 'switch', | |
| 517 | - 'help' => esc_html__( 'Redirect users to the cart page when they add a product to the cart from the wishlist page', 'shopbuilder' ), | |
| 518 | - 'label' => esc_html__( 'Redirect to Cart', 'shopbuilder' ), | |
| 519 | - 'tab' => 'page', | |
| 520 | - ), | |
| 521 | - 'remove_after_add_to_cart' => array( | |
| 522 | - 'value' => 'on', | |
| 523 | - 'id' => 'remove_after_add_to_cart', | |
| 524 | - 'type' => 'switch', | |
| 525 | - 'help' => esc_html__( 'Remove the product from the wishlist after it has been added to the cart', 'shopbuilder' ), | |
| 526 | - 'label' => esc_html__( 'Remove if Added to Cart', 'shopbuilder' ), | |
| 527 | - 'tab' => 'page', | |
| 528 | - ), | |
| 529 | - */ | |
| 530 | - 'page' => [ | |
| 531 | - 'id' => 'page', | |
| 532 | - 'type' => 'select', | |
| 533 | - 'label' => esc_html__( 'Select Wishlist Page', 'shopbuilder' ), | |
| 534 | - 'help' => sprintf( | |
| 535 | - /* translators: 1: The shortcode.*/ | |
| 536 | - esc_html__( 'Select a page for wishlist page and make sure you add the shortcode %1$s into the page content', 'shopbuilder' ), | |
| 537 | - '<code>[rtsb_wishlist]</code>' | |
| 538 | - ), | |
| 539 | - 'options' => Fns::get_pages(), | |
| 540 | - 'tab' => 'page', | |
| 541 | - ], | |
| 542 | - 'page_show_fields' => [ | |
| 543 | - 'value' => WishlistFns::instance()->get_field_ids(), | |
| 544 | - 'id' => 'page_show_fields', | |
| 545 | - 'multiple' => true, | |
| 546 | - 'checkbox' => true, | |
| 547 | - 'sanitize_fn' => 'sanitize_text_field', | |
| 548 | - 'type' => 'sortable', | |
| 549 | - 'options' => WishlistFns::instance()->get_default_fields(), | |
| 550 | - 'label' => esc_html__( 'Wishlist Table Fields Visibility', 'shopbuilder' ), | |
| 551 | - 'tab' => 'page', | |
| 552 | - ], | |
| 553 | - | |
| 554 | - ] | |
| 555 | - ), | |
| 556 | - 'tabs' => [ | |
| 557 | - 'general' => [ | |
| 558 | - 'title' => esc_html__( 'General', 'shopbuilder' ), | |
| 559 | - ], | |
| 560 | - 'button' => [ | |
| 561 | - 'title' => esc_html__( 'Button', 'shopbuilder' ), | |
| 562 | - ], | |
| 563 | - 'page' => [ | |
| 564 | - 'title' => esc_html__( 'Page', 'shopbuilder' ), | |
| 565 | - ], | |
| 566 | - ], | |
| 567 | - ] | |
| 568 | - ), | |
| 569 | - 'compare' => apply_filters( | |
| 570 | - 'rtsb/module/compare/options', | |
| 571 | - [ | |
| 572 | - 'id' => 'compare', | |
| 573 | - 'base_class' => Compare::class, | |
| 574 | - 'category' => 'general', | |
| 575 | - 'title' => esc_html__( 'Product Compare', 'shopbuilder' ), | |
| 576 | - 'package' => 'free', | |
| 577 | - 'active' => 'on', | |
| 578 | - 'active_field' => [ | |
| 579 | - 'label' => esc_html__( 'Enable Product Comparison?', 'shopbuilder' ), | |
| 580 | - 'help' => esc_html__( 'Switch on to enable product comparison module.', 'shopbuilder' ), | |
| 581 | - ], | |
| 582 | - 'fields' => apply_filters( | |
| 583 | - 'rtsb/module/compare/fields', | |
| 584 | - [ | |
| 585 | - 'compare_shop_wrapper_heading' => [ | |
| 586 | - 'id' => 'compare_shop_wrapper_heading', | |
| 587 | - 'type' => 'title', | |
| 588 | - 'label' => esc_html__( 'Shop Page Settings', 'shopbuilder' ), | |
| 589 | - 'tab' => 'button', | |
| 590 | - ], | |
| 591 | - 'show_btn_on_loop' => [ | |
| 592 | - 'id' => 'show_btn_on_loop', | |
| 593 | - 'value' => 'on', | |
| 594 | - 'type' => 'switch', | |
| 595 | - 'label' => esc_html__( 'Show in Shop Page', 'shopbuilder' ), | |
| 596 | - 'tab' => 'button', | |
| 597 | - ], | |
| 598 | - 'loop_btn_position' => [ | |
| 599 | - 'id' => 'loop_btn_position', | |
| 600 | - 'type' => 'select', | |
| 601 | - 'value' => 'custom', | |
| 602 | - 'label' => esc_html__( 'Shop Page Button Position', 'shopbuilder' ), | |
| 603 | - 'help' => esc_html__( 'You can manage wishlist button position in shop page.', 'shopbuilder' ), | |
| 604 | - 'options' => [ | |
| 605 | - 'before_add_to_cart' => esc_html__( 'Before Add To Cart', 'shopbuilder' ), | |
| 606 | - 'after_add_to_cart' => esc_html__( 'After Add To Cart', 'shopbuilder' ), | |
| 607 | - 'shortcode' => esc_html__( 'Use Shortcode', 'shopbuilder' ), | |
| 608 | - 'custom' => esc_html__( 'Custom Position', 'shopbuilder' ), | |
| 609 | - ], | |
| 610 | - 'dependency' => [ | |
| 611 | - 'rules' => [ | |
| 612 | - [ | |
| 613 | - 'item' => 'modules.compare.show_btn_on_loop', | |
| 614 | - 'value' => 'on', | |
| 615 | - 'operator' => '==', | |
| 616 | - ], | |
| 617 | - ], | |
| 618 | - ], | |
| 619 | - 'tab' => 'button', | |
| 620 | - ], | |
| 621 | - 'loop_btn_position_shortcode' => [ | |
| 622 | - 'type' => 'raw', | |
| 623 | - 'label' => ' ', | |
| 624 | - 'html' => sprintf( | |
| 625 | - /* translators: 1: The shortcode.*/ | |
| 626 | - 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' ), | |
| 627 | - '<code>[rtsb_compare_button]</code>' | |
| 628 | - ), | |
| 629 | - 'dependency' => [ | |
| 630 | - 'rules' => [ | |
| 631 | - [ | |
| 632 | - 'item' => 'modules.compare.show_btn_on_loop', | |
| 633 | - 'value' => 'on', | |
| 634 | - 'operator' => '==', | |
| 635 | - ], | |
| 636 | - [ | |
| 637 | - 'item' => 'modules.compare.loop_btn_position', | |
| 638 | - 'value' => 'shortcode', | |
| 639 | - 'operator' => '==', | |
| 640 | - ], | |
| 641 | - ], | |
| 642 | - ], | |
| 643 | - 'tab' => 'button', | |
| 644 | - ], | |
| 645 | - 'loop_custom_hook_name' => [ | |
| 646 | - 'id' => 'product_custom_hook_name', | |
| 647 | - 'type' => 'text', | |
| 648 | - 'label' => esc_html__( 'Enter Hook Name', 'shopbuilder' ), | |
| 649 | - 'tab' => 'button', | |
| 650 | - 'help' => sprintf( | |
| 651 | - /* translators: 1: The shortcode.*/ | |
| 652 | - esc_html__( 'Or Copy the php code %1$s and paste it in your product query where you want to show the button.', 'shopbuilder' ), | |
| 653 | - "<br /><code><?php do_action('rtsb/modules/compare/frontend/display' ); ?></code><br />" | |
| 654 | - ), | |
| 655 | - 'dependency' => [ | |
| 656 | - 'rules' => [ | |
| 657 | - [ | |
| 658 | - 'item' => 'modules.compare.show_btn_on_loop', | |
| 659 | - 'value' => 'on', | |
| 660 | - 'operator' => '==', | |
| 661 | - ], | |
| 662 | - [ | |
| 663 | - 'item' => 'modules.compare.loop_btn_position', | |
| 664 | - 'value' => 'custom', | |
| 665 | - 'operator' => '==', | |
| 666 | - ], | |
| 667 | - ], | |
| 668 | - ], | |
| 669 | - ], | |
| 670 | - 'loop_custom_hook_priority' => [ | |
| 671 | - 'id' => 'product_custom_hook_priority', | |
| 672 | - 'type' => 'number', | |
| 673 | - 'value' => 10, | |
| 674 | - 'size' => 'small', | |
| 675 | - 'min' => 0, | |
| 676 | - 'max' => 999, | |
| 677 | - 'label' => esc_html__( 'Hook Priority', 'shopbuilder' ), | |
| 678 | - 'tab' => 'button', | |
| 679 | - 'dependency' => [ | |
| 680 | - 'rules' => [ | |
| 681 | - [ | |
| 682 | - 'item' => 'modules.compare.show_btn_on_loop', | |
| 683 | - 'value' => 'on', | |
| 684 | - 'operator' => '==', | |
| 685 | - ], | |
| 686 | - [ | |
| 687 | - 'item' => 'modules.compare.loop_btn_position', | |
| 688 | - 'value' => 'custom', | |
| 689 | - 'operator' => '==', | |
| 690 | - ], | |
| 691 | - ], | |
| 692 | - 'relation' => 'and', | |
| 693 | - ], | |
| 694 | - ], | |
| 695 | - 'compare_single_wrapper_heading' => [ | |
| 696 | - 'id' => 'compare_single_wrapper_heading', | |
| 697 | - 'type' => 'title', | |
| 698 | - 'label' => esc_html__( 'Product Page Settings', 'shopbuilder' ), | |
| 699 | - 'tab' => 'button', | |
| 700 | - ], | |
| 701 | - 'show_btn_product_page' => [ | |
| 702 | - 'id' => 'show_btn_product_page', | |
| 703 | - 'type' => 'switch', | |
| 704 | - 'value' => 'on', | |
| 705 | - 'label' => esc_html__( 'Show Button in Product Page', 'shopbuilder' ), | |
| 706 | - 'tab' => 'button', | |
| 707 | - ], | |
| 708 | - 'product_btn_position' => [ | |
| 709 | - 'id' => 'product_btn_position', | |
| 710 | - 'label' => esc_html__( 'Product Page Button Position', 'shopbuilder' ), | |
| 711 | - 'help' => esc_html__( 'You can manage compare button position in single product page.', 'shopbuilder' ), | |
| 712 | - 'type' => 'select', | |
| 713 | - 'value' => 'custom', | |
| 714 | - 'options' => [ | |
| 715 | - 'before_add_to_cart' => esc_html__( 'Before Add To Cart', 'shopbuilder' ), | |
| 716 | - 'after_add_to_cart' => esc_html__( 'After Add To Cart', 'shopbuilder' ), | |
| 717 | - 'after_thumbnail' => esc_html__( 'After Image', 'shopbuilder' ), | |
| 718 | - 'after_summary' => esc_html__( 'After Summary', 'shopbuilder' ), | |
| 719 | - 'shortcode' => esc_html__( 'Use Shortcode', 'shopbuilder' ), | |
| 720 | - 'custom' => esc_html__( 'Custom Position', 'shopbuilder' ), | |
| 721 | - ], | |
| 722 | - 'dependency' => [ | |
| 723 | - 'rules' => [ | |
| 724 | - [ | |
| 725 | - 'item' => 'modules.compare.show_btn_product_page', | |
| 726 | - 'value' => 'on', | |
| 727 | - 'operator' => '==', | |
| 728 | - ], | |
| 729 | - ], | |
| 730 | - ], | |
| 731 | - 'tab' => 'button', | |
| 732 | - ], | |
| 733 | - 'product_btn_position_shortcode' => [ | |
| 734 | - 'type' => 'raw', | |
| 735 | - 'label' => ' ', | |
| 736 | - 'html' => sprintf( | |
| 737 | - /* translators: 1: The shortcode.*/ | |
| 738 | - esc_html__( 'Choose where to show button on the product page. Copy this shortcode %1$s and paste it where you want to show the button.', 'shopbuilder' ), | |
| 739 | - '<code>[rtsb_wishlist_button]</code> ' | |
| 740 | - ), | |
| 741 | - 'dependency' => [ | |
| 742 | - 'rules' => [ | |
| 743 | - [ | |
| 744 | - 'item' => 'modules.wishlist.show_btn_product_page', | |
| 745 | - 'value' => 'on', | |
| 746 | - 'operator' => '==', | |
| 747 | - ], | |
| 748 | - [ | |
| 749 | - 'item' => 'modules.wishlist.product_btn_position', | |
| 750 | - 'value' => 'shortcode', | |
| 751 | - 'operator' => '==', | |
| 752 | - ], | |
| 753 | - ], | |
| 754 | - ], | |
| 755 | - 'tab' => 'button', | |
| 756 | - ], | |
| 757 | - 'product_custom_hook_name' => [ | |
| 758 | - 'id' => 'product_custom_hook_name', | |
| 759 | - 'type' => 'text', | |
| 760 | - 'label' => esc_html__( 'Product Hook Name', 'shopbuilder' ), | |
| 761 | - 'tab' => 'button', | |
| 762 | - 'help' => sprintf( | |
| 763 | - /* translators: 1: The shortcode.*/ | |
| 764 | - esc_html__( 'Or Copy the php code %1$s and paste it in your product query where you want to show the button.', 'shopbuilder' ), | |
| 765 | - "<br /><code><?php do_action('rtsb/modules/compare/frontend/display' ); ?></code><br />" | |
| 766 | - ), | |
| 767 | - 'dependency' => [ | |
| 768 | - 'rules' => [ | |
| 769 | - [ | |
| 770 | - 'item' => 'modules.compare.show_btn_product_page', | |
| 771 | - 'value' => 'on', | |
| 772 | - 'operator' => '==', | |
| 773 | - ], | |
| 774 | - [ | |
| 775 | - 'item' => 'modules.compare.product_btn_position', | |
| 776 | - 'value' => 'custom', | |
| 777 | - 'operator' => '==', | |
| 778 | - ], | |
| 779 | - ], | |
| 780 | - ], | |
| 781 | - ], | |
| 782 | - 'product_custom_hook_priority' => [ | |
| 783 | - 'id' => 'product_custom_hook_priority', | |
| 784 | - 'type' => 'number', | |
| 785 | - 'value' => 10, | |
| 786 | - 'size' => 'small', | |
| 787 | - 'min' => 0, | |
| 788 | - 'max' => 999, | |
| 789 | - 'label' => esc_html__( 'Product Hook Priority', 'shopbuilder' ), | |
| 790 | - 'tab' => 'button', | |
| 791 | - 'dependency' => [ | |
| 792 | - 'rules' => [ | |
| 793 | - [ | |
| 794 | - 'item' => 'modules.compare.show_btn_product_page', | |
| 795 | - 'value' => 'on', | |
| 796 | - 'operator' => '==', | |
| 797 | - ], | |
| 798 | - [ | |
| 799 | - 'item' => 'modules.compare.product_btn_position', | |
| 800 | - 'value' => 'custom', | |
| 801 | - 'operator' => '==', | |
| 802 | - ], | |
| 803 | - ], | |
| 804 | - 'relation' => 'and', | |
| 805 | - ], | |
| 806 | - ], | |
| 807 | - 'button_text' => [ | |
| 808 | - 'id' => 'button_text', | |
| 809 | - 'label' => esc_html__( 'Compare Button Text', 'shopbuilder' ), | |
| 810 | - 'help' => esc_html__( 'Enter your compare button text.', 'shopbuilder' ), | |
| 811 | - 'type' => 'text', | |
| 812 | - 'value' => esc_html__( 'Compare', 'shopbuilder' ), | |
| 813 | - 'placeholder' => esc_html__( 'Compare', 'shopbuilder' ), | |
| 814 | - 'tab' => 'button', | |
| 815 | - ], | |
| 816 | - 'notice_added_text' => [ | |
| 817 | - 'id' => 'notice_added_text', | |
| 818 | - 'label' => esc_html__( 'Product Added Text', 'shopbuilder' ), | |
| 819 | - 'help' => esc_html__( 'Enter the product added text.', 'shopbuilder' ), | |
| 820 | - 'type' => 'text', | |
| 821 | - 'value' => esc_html__( 'Product added!', 'shopbuilder' ), | |
| 822 | - 'placeholder' => esc_html__( 'Product added!', 'shopbuilder' ), | |
| 823 | - 'tab' => 'general', | |
| 824 | - ], | |
| 825 | - 'notice_removed_text' => [ | |
| 826 | - 'id' => 'notice_removed_text', | |
| 827 | - 'label' => esc_html__( 'Product Removed Text', 'shopbuilder' ), | |
| 828 | - 'help' => esc_html__( 'Enter the product removed text.', 'shopbuilder' ), | |
| 829 | - 'type' => 'text', | |
| 830 | - 'value' => esc_html__( 'Product removed!', 'shopbuilder' ), | |
| 831 | - 'placeholder' => esc_html__( 'Product removed!', 'shopbuilder' ), | |
| 832 | - 'tab' => 'general', | |
| 833 | - ], | |
| 834 | - 'browse_list_text' => [ | |
| 835 | - 'id' => 'browse_list_text', | |
| 836 | - 'label' => esc_html__( 'Browse Compare Text', 'shopbuilder' ), | |
| 837 | - 'help' => esc_html__( 'Enter a text for the "Browse compare" link on the compare page', 'shopbuilder' ), | |
| 838 | - 'type' => 'text', | |
| 839 | - 'value' => esc_html__( 'Browse Compare', 'shopbuilder' ), | |
| 840 | - 'placeholder' => esc_html__( 'Browse Compare', 'shopbuilder' ), | |
| 841 | - 'tab' => 'general', | |
| 842 | - ], | |
| 843 | - 'page' => [ | |
| 844 | - 'id' => 'page', | |
| 845 | - 'type' => 'select', | |
| 846 | - 'help' => sprintf( | |
| 847 | - /* translators: 1: The shortcode.*/ | |
| 848 | - esc_html__( 'Select a page for compare page and make sure you add the shortcode %1$s into the page content', 'shopbuilder' ), | |
| 849 | - '<code>[rtsb_compare_list]</code>' | |
| 850 | - ), | |
| 851 | - 'label' => esc_html__( 'Select Compare Page', 'shopbuilder' ), | |
| 852 | - 'options' => Fns::get_pages(), | |
| 853 | - 'empty' => esc_html__( 'Select a page', 'shopbuilder' ), | |
| 854 | - 'searchable' => true, | |
| 855 | - 'tab' => 'page', | |
| 856 | - ], | |
| 857 | - 'max_limit' => [ | |
| 858 | - 'id' => 'page', | |
| 859 | - 'type' => 'number', | |
| 860 | - 'sanitize_fn' => 'absint', | |
| 861 | - 'value' => 10, | |
| 862 | - 'help' => esc_html__( 'You can manage your maximum compare quantity from here.', 'shopbuilder' ), | |
| 863 | - 'label' => esc_html__( 'Maximum Compare Limit', 'shopbuilder' ), | |
| 864 | - 'tab' => 'page', | |
| 865 | - ], | |
| 866 | - 'page_show_fields' => [ | |
| 867 | - 'value' => CompareFns::get_list_field_ids(), | |
| 868 | - 'id' => 'page_show_fields', | |
| 869 | - 'multiple' => true, | |
| 870 | - 'checkbox' => true, | |
| 871 | - 'type' => 'sortable', | |
| 872 | - 'options' => CompareFns::get_available_list_fields(), | |
| 873 | - 'label' => esc_html__( 'Compare Table Fields Visibility', 'shopbuilder' ), | |
| 874 | - 'tab' => 'page', | |
| 875 | - ], | |
| 876 | - | |
| 877 | - ] | |
| 878 | - ), | |
| 879 | - 'tabs' => [ | |
| 880 | - 'general' => [ | |
| 881 | - 'title' => esc_html__( 'General', 'shopbuilder' ), | |
| 882 | - ], | |
| 883 | - 'button' => [ | |
| 884 | - 'title' => esc_html__( 'Button', 'shopbuilder' ), | |
| 885 | - ], | |
| 886 | - 'page' => [ | |
| 887 | - 'title' => esc_html__( 'Page', 'shopbuilder' ), | |
| 888 | - ], | |
| 889 | - | |
| 890 | - ], | |
| 891 | - ] | |
| 892 | - ), | |
| 893 | - 'variation_swatches' => apply_filters( | |
| 894 | - 'rtsb/module/variation_swatches/options', | |
| 895 | - [ | |
| 896 | - 'id' => 'variation_swatches', | |
| 897 | - 'external' => true, | |
| 898 | - 'category' => 'general', | |
| 899 | - 'title' => esc_html__( 'Variation Swatches', 'shopbuilder' ), | |
| 900 | - 'pluginSlug' => 'woo-product-variation-swatches', | |
| 901 | - 'pluginIsInstalled' => Fns::check_plugin_installed( 'woo-product-variation-swatches/woo-product-variation-swatches.php' ), | |
| 902 | - 'pluginIsActive' => Fns::check_plugin_active( 'woo-product-variation-swatches/woo-product-variation-swatches.php' ), | |
| 903 | - 'pluginActiveUrl' => add_query_arg( | |
| 904 | - [ | |
| 905 | - '_wpnonce' => wp_create_nonce( 'activate-plugin_woo-product-variation-swatches/woo-product-variation-swatches.php' ), | |
| 906 | - 'action' => 'activate', | |
| 907 | - 'plugin' => 'woo-product-variation-swatches/woo-product-variation-swatches.php', | |
| 908 | - ], | |
| 909 | - admin_url( 'plugins.php' ) | |
| 910 | - ), | |
| 911 | - 'help' => esc_html__( 'This module requires: Variation Swatches for WooCommerce Plugin.', 'shopbuilder' ), | |
| 912 | - 'package' => 'free', | |
| 913 | - 'active_field' => [ | |
| 914 | - 'disable' => false, | |
| 915 | - ], | |
| 916 | - 'fields' => [], | |
| 917 | - ] | |
| 918 | - ), | |
| 919 | - 'variation_gallery' => apply_filters( | |
| 920 | - 'rtsb/module/variation_gallery/options', | |
| 921 | - [ | |
| 922 | - 'id' => 'variation_gallery', | |
| 923 | - 'external' => true, | |
| 924 | - 'category' => 'general', | |
| 925 | - 'title' => esc_html__( 'Variation Gallery', 'shopbuilder' ), | |
| 926 | - 'pluginSlug' => 'woo-product-variation-gallery', | |
| 927 | - 'pluginIsInstalled' => Fns::check_plugin_installed( 'woo-product-variation-gallery/woo-product-variation-gallery.php' ), | |
| 928 | - 'pluginIsActive' => Fns::check_plugin_active( 'woo-product-variation-gallery/woo-product-variation-gallery.php' ), | |
| 929 | - 'pluginActiveUrl' => add_query_arg( | |
| 930 | - [ | |
| 931 | - '_wpnonce' => wp_create_nonce( 'activate-plugin_woo-product-variation-gallery/woo-product-variation-gallery.php' ), | |
| 932 | - 'action' => 'activate', | |
| 933 | - 'plugin' => 'woo-product-variation-gallery/woo-product-variation-gallery.php', | |
| 934 | - ], | |
| 935 | - admin_url( 'plugins.php' ) | |
| 936 | - ), | |
| 937 | - 'help' => esc_html__( 'This module requires: Variation Images Gallery for WooCommerce Plugin', 'shopbuilder' ), | |
| 938 | - 'package' => 'free', | |
| 939 | - 'active_field' => [ | |
| 940 | - 'disable' => false, | |
| 941 | - ], | |
| 942 | - 'fields' => [], | |
| 943 | - ] | |
| 944 | - ), | |
| 945 | - 'mini_cart' => apply_filters( | |
| 946 | - 'rtsb/module/mini_cart/options', | |
| 947 | - [ | |
| 948 | - 'id' => 'mini_cart', | |
| 949 | - 'active' => '', | |
| 950 | - 'title' => esc_html__( 'Mini Cart', 'shopbuilder' ), | |
| 951 | - 'package' => $this->pro_package(), | |
| 952 | - 'active_field' => [ | |
| 953 | - 'label' => esc_html__( 'Enable Mini Cart?', 'shopbuilder' ), | |
| 954 | - 'help' => esc_html__( 'Switch on to enable mini cart module.', 'shopbuilder' ), | |
| 955 | - ], | |
| 956 | - 'is_active' => true, | |
| 957 | - 'fields' => [], | |
| 958 | - ] | |
| 959 | - ), | |
| 960 | - 'product_size_chart' => apply_filters( | |
| 961 | - 'rtsb/module/product_size_chart/options', | |
| 962 | - [ | |
| 963 | - 'id' => 'product_size_chart', | |
| 964 | - 'active' => '', | |
| 965 | - 'title' => esc_html__( 'Product Size Chart', 'shopbuilder' ), | |
| 966 | - 'package' => $this->pro_package(), | |
| 967 | - 'active_field' => [ | |
| 968 | - 'label' => esc_html__( 'Enable Product Size Chart?', 'shopbuilder' ), | |
| 969 | - 'help' => esc_html__( 'Switch on to enable Product Size Chart module.', 'shopbuilder' ), | |
| 970 | - ], | |
| 971 | - 'fields' => [], | |
| 972 | - ] | |
| 973 | - ), | |
| 974 | - 'product_badges' => apply_filters( | |
| 975 | - 'rtsb/module/product_badges/options', | |
| 976 | - [ | |
| 977 | - 'id' => 'product_badges', | |
| 978 | - 'active' => '', | |
| 979 | - 'title' => esc_html__( 'Product Badges', 'shopbuilder' ), | |
| 980 | - 'package' => $this->pro_package(), | |
| 981 | - 'active_field' => [ | |
| 982 | - 'label' => esc_html__( 'Enable Product Badges?', 'shopbuilder' ), | |
| 983 | - 'help' => esc_html__( 'Switch on to enable product badges module.', 'shopbuilder' ), | |
| 984 | - ], | |
| 985 | - 'fields' => [], | |
| 986 | - ] | |
| 987 | - ), | |
| 988 | - 'customize_my_account' => apply_filters( | |
| 989 | - 'rtsb/module/customize_my_account/options', | |
| 990 | - [ | |
| 991 | - 'id' => 'customize_my_account', | |
| 992 | - 'active' => '', | |
| 993 | - 'title' => esc_html__( 'Customize My Account', 'shopbuilder' ), | |
| 994 | - 'package' => $this->pro_package(), | |
| 995 | - 'active_field' => [ | |
| 996 | - 'label' => esc_html__( 'Enable Customize My Account?', 'shopbuilder' ), | |
| 997 | - 'help' => esc_html__( 'Switch on to enable customize my account module.', 'shopbuilder' ), | |
| 998 | - ], | |
| 999 | - 'fields' => [], | |
| 1000 | - ] | |
| 1001 | - ), | |
| 1002 | - // Pre-Order. | |
| 1003 | - // Currency Switcher. | |
| 1004 | - // Product Addons. | |
| 1005 | - // Checkout Fields Manager. | |
| 1006 | - 'sales_notification' => apply_filters( | |
| 1007 | - 'rtsb/module/sales_notification/options', | |
| 1008 | - [ | |
| 1009 | - 'id' => 'sales_notification', | |
| 1010 | - 'active' => '', | |
| 1011 | - 'title' => esc_html__( 'Sales Notification', 'shopbuilder' ), | |
| 1012 | - 'package' => $this->pro_package(), | |
| 1013 | - 'active_field' => [ | |
| 1014 | - 'label' => esc_html__( 'Enable Sales Notification?', 'shopbuilder' ), | |
| 1015 | - 'help' => esc_html__( 'Switch on to enable Sales Notification module.', 'shopbuilder' ), | |
| 1016 | - ], | |
| 1017 | - 'fields' => [], | |
| 1018 | - ] | |
| 1019 | - ), | |
| 1020 | - 'flash_sale_countdown' => apply_filters( | |
| 1021 | - 'rtsb/module/flash_sale_countdown/options', | |
| 1022 | - [ | |
| 1023 | - 'id' => 'flash_sale_countdown', | |
| 1024 | - 'active' => '', | |
| 1025 | - 'title' => esc_html__( 'Flash Sale Countdown', 'shopbuilder' ), | |
| 1026 | - 'package' => $this->pro_package(), | |
| 1027 | - 'active_field' => [ | |
| 1028 | - 'label' => esc_html__( 'Enable Flash Sale Countdown?', 'shopbuilder' ), | |
| 1029 | - 'help' => esc_html__( 'Switch on to enable Flash Sale Countdown module.', 'shopbuilder' ), | |
| 1030 | - ], | |
| 1031 | - 'fields' => [], | |
| 1032 | - ] | |
| 1033 | - ), | |
| 1034 | - 'quick_checkout' => apply_filters( | |
| 1035 | - 'rtsb/module/quick_checkout/options', | |
| 1036 | - [ | |
| 1037 | - 'id' => 'quick_checkout', | |
| 1038 | - 'active' => '', | |
| 1039 | - 'title' => esc_html__( 'Quick Checkout', 'shopbuilder' ), | |
| 1040 | - 'package' => $this->pro_package(), | |
| 1041 | - 'active_field' => [ | |
| 1042 | - 'label' => esc_html__( 'Enable Quick Checkout?', 'shopbuilder' ), | |
| 1043 | - 'help' => esc_html__( 'Switch on to enable quick checkout module. Note: Currently, this is not suitable for variable products.', 'shopbuilder' ), | |
| 1044 | - ], | |
| 1045 | - 'fields' => [], | |
| 1046 | - ] | |
| 1047 | - ), | |
| 1048 | - 'multi_step_checkout' => apply_filters( | |
| 1049 | - 'rtsb/module/multi_step_checkout/options', | |
| 1050 | - [ | |
| 1051 | - 'id' => 'multi_step_checkout', | |
| 1052 | - 'active' => '', | |
| 1053 | - 'title' => esc_html__( 'Multi-Step Checkout', 'shopbuilder' ), | |
| 1054 | - 'package' => $this->pro_package(), | |
| 1055 | - 'active_field' => [ | |
| 1056 | - 'label' => esc_html__( 'Enable Multi-Step Checkout?', 'shopbuilder' ), | |
| 1057 | - 'help' => esc_html__( 'Switch on to enable Multi-step Checkout module.', 'shopbuilder' ), | |
| 1058 | - ], | |
| 1059 | - 'fields' => [], | |
| 1060 | - ] | |
| 1061 | - ), | |
| 1062 | - 'back_order' => apply_filters( | |
| 1063 | - 'rtsb/module/back_order/options', | |
| 1064 | - [ | |
| 1065 | - 'id' => 'back_order', | |
| 1066 | - 'active' => '', | |
| 1067 | - 'title' => esc_html__( 'Back-Order', 'shopbuilder' ), | |
| 1068 | - 'package' => $this->pro_package(), | |
| 1069 | - 'active_field' => [ | |
| 1070 | - 'label' => esc_html__( 'Enable Back-Order?', 'shopbuilder' ), | |
| 1071 | - 'help' => esc_html__( 'Switch on to enable back-order module.', 'shopbuilder' ), | |
| 1072 | - ], | |
| 1073 | - 'fields' => [], | |
| 1074 | - ] | |
| 1075 | - ), | |
| 1076 | - ]; | |
| 1077 | - return apply_filters( 'rtsb/core/modules/raw_list', $list ); | |
| 1078 | - } | |
| 1079 | -} | |
| 1 | +<?php | |
| 2 | + | |
| 3 | +namespace RadiusTheme\SB\Models; | |
| 4 | + | |
| 5 | +use RadiusTheme\SB\Helpers\Fns; | |
| 6 | +use RadiusTheme\SB\Models\Base\ListModel; | |
| 7 | +use RadiusTheme\SB\Modules\Compare\Compare; | |
| 8 | +use RadiusTheme\SB\Modules\Compare\CompareFns; | |
| 9 | +use RadiusTheme\SB\Modules\QuickView\QuickView; | |
| 10 | +use RadiusTheme\SB\Modules\WishList\Wishlist; | |
| 11 | +use RadiusTheme\SB\Modules\WishList\WishlistFns; | |
| 12 | +use RadiusTheme\SB\Traits\SingletonTrait; | |
| 13 | + | |
| 14 | +defined( 'ABSPATH' ) || exit; | |
| 15 | + | |
| 16 | +class ModuleList extends ListModel { | |
| 17 | + use SingletonTrait; | |
| 18 | + | |
| 19 | + protected $list_id = 'modules'; | |
| 20 | + | |
| 21 | + public function __construct() { | |
| 22 | + parent::__construct(); | |
| 23 | + $this->title = esc_html__( 'Modules', 'shopbuilder' ); | |
| 24 | + $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' ); | |
| 25 | + $this->categories = [ | |
| 26 | + 'general' => [ | |
| 27 | + 'title' => esc_html__( 'Free', 'shopbuilder' ), | |
| 28 | + ], | |
| 29 | + /* | |
| 30 | + * TODO:: Will add later | |
| 31 | + 'pro' => array( | |
| 32 | + 'title' => esc_html__( 'Pro', 'shopbuilder' ), | |
| 33 | + ), | |
| 34 | + */ | |
| 35 | + ]; | |
| 36 | + } | |
| 37 | + | |
| 38 | + protected function raw_list() { | |
| 39 | + $list = [ | |
| 40 | + 'quick_view' => apply_filters( | |
| 41 | + 'rtsb/module/quick_view/options', | |
| 42 | + [ | |
| 43 | + 'id' => 'quick_view', | |
| 44 | + 'title' => esc_html__( 'Quick View', 'shopbuilder' ), | |
| 45 | + 'base_class' => QuickView::class, | |
| 46 | + 'category' => 'general', | |
| 47 | + 'active' => 'on', | |
| 48 | + 'package' => 'free', | |
| 49 | + 'active_field' => [ | |
| 50 | + 'label' => esc_html__( 'Enable Quick View?', 'shopbuilder' ), | |
| 51 | + 'help' => esc_html__( 'Switch on to enable quick view module.', 'shopbuilder' ), | |
| 52 | + ], | |
| 53 | + 'fields' => apply_filters( | |
| 54 | + 'rtsb/module/quick_view/fields', | |
| 55 | + [ | |
| 56 | + 'loop_btn_position' => [ | |
| 57 | + 'id' => 'loop_btn_position', | |
| 58 | + 'type' => 'select', | |
| 59 | + 'value' => 'custom', | |
| 60 | + 'label' => esc_html__( 'Products Loop Button Position', 'shopbuilder' ), | |
| 61 | + 'help' => esc_html__( 'You can manage quick view button position in product list page.', 'shopbuilder' ), | |
| 62 | + 'options' => [ | |
| 63 | + 'before_add_to_cart' => esc_html__( 'Before Add To Cart', 'shopbuilder' ), | |
| 64 | + 'after_add_to_cart' => esc_html__( 'After Add To Cart', 'shopbuilder' ), | |
| 65 | + 'top_thumbnail' => esc_html__( 'Top On Image', 'shopbuilder' ), | |
| 66 | + 'shortcode' => esc_html__( 'Use Shortcode', 'shopbuilder' ), | |
| 67 | + 'custom' => esc_html__( 'Custom Position', 'shopbuilder' ), | |
| 68 | + ], | |
| 69 | + ], | |
| 70 | + 'loop_btn_position_shortcode' => [ | |
| 71 | + 'type' => 'raw', | |
| 72 | + 'label' => ' ', | |
| 73 | + 'html' => sprintf( | |
| 74 | + /* translators: 1: The shortcode.*/ | |
| 75 | + 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' ), | |
| 76 | + '<code>[rtsb_quick_view_button]</code>' | |
| 77 | + ), | |
| 78 | + 'dependency' => [ | |
| 79 | + 'rules' => [ | |
| 80 | + [ | |
| 81 | + 'item' => 'modules.quick_view.loop_btn_position', | |
| 82 | + 'value' => 'shortcode', | |
| 83 | + 'operator' => '==', | |
| 84 | + ], | |
| 85 | + ], | |
| 86 | + ], | |
| 87 | + ], | |
| 88 | + 'loop_custom_hook_name' => [ | |
| 89 | + 'id' => 'loop_custom_hook_name', | |
| 90 | + 'type' => 'text', | |
| 91 | + 'label' => esc_html__( 'Loop Hook Name', 'shopbuilder' ), | |
| 92 | + 'dependency' => [ | |
| 93 | + 'rules' => [ | |
| 94 | + [ | |
| 95 | + 'item' => 'modules.quick_view.loop_btn_position', | |
| 96 | + 'value' => 'custom', | |
| 97 | + 'operator' => '==', | |
| 98 | + ], | |
| 99 | + ], | |
| 100 | + ], | |
| 101 | + ], | |
| 102 | + 'loop_custom_hook_priority' => [ | |
| 103 | + 'id' => 'loop_custom_hook_priority', | |
| 104 | + 'type' => 'number', | |
| 105 | + 'value' => 10, | |
| 106 | + 'size' => 'small', | |
| 107 | + 'min' => 0, | |
| 108 | + 'max' => 999, | |
| 109 | + 'label' => esc_html__( 'Loop Hook Priority', 'shopbuilder' ), | |
| 110 | + 'dependency' => [ | |
| 111 | + 'rules' => [ | |
| 112 | + [ | |
| 113 | + 'item' => 'modules.quick_view.loop_btn_position', | |
| 114 | + 'value' => 'custom', | |
| 115 | + 'operator' => '==', | |
| 116 | + ], | |
| 117 | + ], | |
| 118 | + ], | |
| 119 | + ], | |
| 120 | + 'button_text' => [ | |
| 121 | + 'id' => 'button_text', | |
| 122 | + 'label' => esc_html__( 'Quick View Text', 'shopbuilder' ), | |
| 123 | + 'help' => esc_html__( 'Enter your quick view button text.', 'shopbuilder' ), | |
| 124 | + 'type' => 'text', | |
| 125 | + 'value' => 'Quick view', | |
| 126 | + 'placeholder' => 'Quick view', | |
| 127 | + ], | |
| 128 | + ] | |
| 129 | + ), | |
| 130 | + ] | |
| 131 | + ), | |
| 132 | + 'wishlist' => apply_filters( | |
| 133 | + 'rtsb/module/wishlist/options', | |
| 134 | + [ | |
| 135 | + 'id' => 'wishlist', | |
| 136 | + 'title' => esc_html__( 'Wishlist', 'shopbuilder' ), | |
| 137 | + 'package' => 'free', | |
| 138 | + 'active' => 'on', | |
| 139 | + 'base_class' => Wishlist::class, | |
| 140 | + 'category' => 'general', | |
| 141 | + 'active_field' => [ | |
| 142 | + 'label' => esc_html__( 'Enable Wishlist?', 'shopbuilder' ), | |
| 143 | + 'help' => esc_html__( 'Switch on to enable wishlist module.', 'shopbuilder' ), | |
| 144 | + ], | |
| 145 | + 'fields' => apply_filters( | |
| 146 | + 'rtsb/module/wishlist/fields', | |
| 147 | + [ | |
| 148 | + 'enable_login_limit' => [ | |
| 149 | + 'id' => 'enable_login_limit', | |
| 150 | + 'type' => 'switch', | |
| 151 | + 'label' => esc_html__( 'Limit Wishlist Use', 'shopbuilder' ), | |
| 152 | + 'help' => esc_html__( 'Enable this option to allow only the logged-in users to use the Wishlist feature.', 'shopbuilder' ), | |
| 153 | + 'tab' => 'general', | |
| 154 | + ], | |
| 155 | + 'show_btn_on_loop' => [ | |
| 156 | + 'id' => 'show_btn_on_loop', | |
| 157 | + 'value' => 'on', | |
| 158 | + 'type' => 'switch', | |
| 159 | + 'label' => esc_html__( 'Show In Archive Page or Any Products Loop', 'shopbuilder' ), | |
| 160 | + 'tab' => 'button', | |
| 161 | + ], | |
| 162 | + 'loop_btn_position' => [ | |
| 163 | + 'id' => 'loop_btn_position', | |
| 164 | + 'type' => 'select', | |
| 165 | + 'value' => 'custom', | |
| 166 | + 'label' => esc_html__( 'Products Loop Button Position', 'shopbuilder' ), | |
| 167 | + 'help' => esc_html__( 'You can manage wishlist button position in product list page.', 'shopbuilder' ), | |
| 168 | + 'options' => [ | |
| 169 | + 'before_add_to_cart' => esc_html__( 'Before Add To Cart', 'shopbuilder' ), | |
| 170 | + 'after_add_to_cart' => esc_html__( 'After Add To Cart', 'shopbuilder' ), | |
| 171 | + 'top_thumbnail' => esc_html__( 'Top On Image', 'shopbuilder' ), | |
| 172 | + 'shortcode' => esc_html__( 'Use Shortcode', 'shopbuilder' ), | |
| 173 | + 'custom' => esc_html__( 'Custom Position', 'shopbuilder' ), | |
| 174 | + ], | |
| 175 | + 'dependency' => [ | |
| 176 | + 'rules' => [ | |
| 177 | + [ | |
| 178 | + 'item' => 'modules.wishlist.show_btn_on_loop', | |
| 179 | + 'value' => 'on', | |
| 180 | + 'operator' => '==', | |
| 181 | + ], | |
| 182 | + ], | |
| 183 | + ], | |
| 184 | + 'tab' => 'button', | |
| 185 | + ], | |
| 186 | + 'loop_btn_position_shortcode' => [ | |
| 187 | + 'type' => 'raw', | |
| 188 | + 'label' => ' ', | |
| 189 | + 'html' => sprintf( | |
| 190 | + /* translators: 1: The shortcode.*/ | |
| 191 | + 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' ), | |
| 192 | + '<code>[rtsb_wishlist_button]</code>' | |
| 193 | + ), | |
| 194 | + 'dependency' => [ | |
| 195 | + 'rules' => [ | |
| 196 | + [ | |
| 197 | + 'item' => 'modules.wishlist.show_btn_on_loop', | |
| 198 | + 'value' => 'on', | |
| 199 | + 'operator' => '==', | |
| 200 | + ], | |
| 201 | + [ | |
| 202 | + 'item' => 'modules.wishlist.loop_btn_position', | |
| 203 | + 'value' => 'shortcode', | |
| 204 | + 'operator' => '==', | |
| 205 | + ], | |
| 206 | + ], | |
| 207 | + ], | |
| 208 | + 'tab' => 'button', | |
| 209 | + ], | |
| 210 | + 'loop_custom_hook_name' => [ | |
| 211 | + 'id' => 'loop_custom_hook_name', | |
| 212 | + 'type' => 'text', | |
| 213 | + 'label' => esc_html__( 'Loop Hook Name', 'shopbuilder' ), | |
| 214 | + 'tab' => 'button', | |
| 215 | + 'dependency' => [ | |
| 216 | + 'rules' => [ | |
| 217 | + [ | |
| 218 | + 'item' => 'modules.wishlist.show_btn_on_loop', | |
| 219 | + 'value' => 'on', | |
| 220 | + 'operator' => '==', | |
| 221 | + ], | |
| 222 | + [ | |
| 223 | + 'item' => 'modules.wishlist.loop_btn_position', | |
| 224 | + 'value' => 'custom', | |
| 225 | + 'operator' => '==', | |
| 226 | + ], | |
| 227 | + ], | |
| 228 | + ], | |
| 229 | + ], | |
| 230 | + 'loop_custom_hook_priority' => [ | |
| 231 | + 'id' => 'loop_custom_hook_priority', | |
| 232 | + 'type' => 'number', | |
| 233 | + 'value' => 10, | |
| 234 | + 'size' => 'small', | |
| 235 | + 'min' => 0, | |
| 236 | + 'max' => 999, | |
| 237 | + 'label' => esc_html__( 'Loop Hook Priority', 'shopbuilder' ), | |
| 238 | + 'tab' => 'button', | |
| 239 | + 'dependency' => [ | |
| 240 | + 'rules' => [ | |
| 241 | + [ | |
| 242 | + 'item' => 'modules.wishlist.show_btn_on_loop', | |
| 243 | + 'value' => 'on', | |
| 244 | + 'operator' => '==', | |
| 245 | + ], | |
| 246 | + [ | |
| 247 | + 'item' => 'modules.wishlist.loop_btn_position', | |
| 248 | + 'value' => 'custom', | |
| 249 | + 'operator' => '==', | |
| 250 | + ], | |
| 251 | + ], | |
| 252 | + 'relation' => 'and', | |
| 253 | + ], | |
| 254 | + ], | |
| 255 | + 'show_btn_product_page' => [ | |
| 256 | + 'id' => 'show_btn_product_page', | |
| 257 | + 'value' => 'on', | |
| 258 | + 'type' => 'switch', | |
| 259 | + 'label' => esc_html__( 'Show Button in Single Product Page', 'shopbuilder' ), | |
| 260 | + 'tab' => 'button', | |
| 261 | + ], | |
| 262 | + 'product_btn_position' => [ | |
| 263 | + 'id' => 'product_btn_position', | |
| 264 | + 'label' => esc_html__( 'Product Page Button Position', 'shopbuilder' ), | |
| 265 | + 'help' => esc_html__( 'You can manage compare button position in single product page.', 'shopbuilder' ), | |
| 266 | + 'type' => 'select', | |
| 267 | + 'value' => 'custom', | |
| 268 | + 'options' => [ | |
| 269 | + 'before_add_to_cart' => esc_html__( 'Before Add To Cart', 'shopbuilder' ), | |
| 270 | + 'after_add_to_cart' => esc_html__( 'After Add To Cart', 'shopbuilder' ), | |
| 271 | + 'after_thumbnail' => esc_html__( 'After Image', 'shopbuilder' ), | |
| 272 | + 'after_summary' => esc_html__( 'After Summary', 'shopbuilder' ), | |
| 273 | + 'shortcode' => esc_html__( 'Use Shortcode', 'shopbuilder' ), | |
| 274 | + 'custom' => esc_html__( 'Custom Position', 'shopbuilder' ), | |
| 275 | + ], | |
| 276 | + 'dependency' => [ | |
| 277 | + 'rules' => [ | |
| 278 | + [ | |
| 279 | + 'item' => 'modules.wishlist.show_btn_product_page', | |
| 280 | + 'value' => 'on', | |
| 281 | + 'operator' => '==', | |
| 282 | + ], | |
| 283 | + ], | |
| 284 | + ], | |
| 285 | + 'tab' => 'button', | |
| 286 | + ], | |
| 287 | + 'product_btn_position_shortcode' => [ | |
| 288 | + 'type' => 'raw', | |
| 289 | + 'label' => ' ', | |
| 290 | + 'html' => sprintf( | |
| 291 | + /* translators: 1: The shortcode.*/ | |
| 292 | + esc_html__( 'Choose where to show button on the product page. Copy this shortcode %1$s and paste it where you want to show the button.', 'shopbuilder' ), | |
| 293 | + '<code>[rtsb_wishlist_button]</code>' | |
| 294 | + ), | |
| 295 | + 'dependency' => [ | |
| 296 | + 'rules' => [ | |
| 297 | + [ | |
| 298 | + 'item' => 'modules.wishlist.show_btn_product_page', | |
| 299 | + 'value' => 'on', | |
| 300 | + 'operator' => '==', | |
| 301 | + ], | |
| 302 | + [ | |
| 303 | + 'item' => 'modules.wishlist.product_btn_position', | |
| 304 | + 'value' => 'shortcode', | |
| 305 | + 'operator' => '==', | |
| 306 | + ], | |
| 307 | + ], | |
| 308 | + ], | |
| 309 | + 'tab' => 'button', | |
| 310 | + ], | |
| 311 | + 'product_custom_hook_name' => [ | |
| 312 | + 'id' => 'product_custom_hook_name', | |
| 313 | + 'type' => 'text', | |
| 314 | + 'label' => esc_html__( 'Product Hook Name', 'shopbuilder' ), | |
| 315 | + 'tab' => 'button', | |
| 316 | + 'dependency' => [ | |
| 317 | + 'rules' => [ | |
| 318 | + [ | |
| 319 | + 'item' => 'modules.wishlist.show_btn_product_page', | |
| 320 | + 'value' => 'on', | |
| 321 | + 'operator' => '==', | |
| 322 | + ], | |
| 323 | + [ | |
| 324 | + 'item' => 'modules.wishlist.product_btn_position', | |
| 325 | + 'value' => 'custom', | |
| 326 | + 'operator' => '==', | |
| 327 | + ], | |
| 328 | + ], | |
| 329 | + ], | |
| 330 | + ], | |
| 331 | + 'product_custom_hook_priority' => [ | |
| 332 | + 'id' => 'product_custom_hook_priority', | |
| 333 | + 'type' => 'number', | |
| 334 | + 'value' => 10, | |
| 335 | + 'size' => 'small', | |
| 336 | + 'min' => 0, | |
| 337 | + 'max' => 999, | |
| 338 | + 'label' => esc_html__( 'Product Hook Priority', 'shopbuilder' ), | |
| 339 | + 'tab' => 'button', | |
| 340 | + 'dependency' => [ | |
| 341 | + 'rules' => [ | |
| 342 | + [ | |
| 343 | + 'item' => 'modules.wishlist.show_btn_product_page', | |
| 344 | + 'value' => 'on', | |
| 345 | + 'operator' => '==', | |
| 346 | + ], | |
| 347 | + [ | |
| 348 | + 'item' => 'modules.wishlist.product_btn_position', | |
| 349 | + 'value' => 'custom', | |
| 350 | + 'operator' => '==', | |
| 351 | + ], | |
| 352 | + ], | |
| 353 | + 'relation' => 'and', | |
| 354 | + ], | |
| 355 | + ], | |
| 356 | + 'button_text' => [ | |
| 357 | + 'id' => 'button_text', | |
| 358 | + 'label' => esc_html__( 'Add to Wishlist Text', 'shopbuilder' ), | |
| 359 | + 'help' => esc_html__( 'Enter your wishlist button text.', 'shopbuilder' ), | |
| 360 | + 'type' => 'text', | |
| 361 | + 'value' => 'Add to wishlist', | |
| 362 | + 'placeholder' => 'Add to wishlist', | |
| 363 | + 'tab' => 'button', | |
| 364 | + ], | |
| 365 | + 'notice_added_text' => [ | |
| 366 | + 'id' => 'notice_added_text', | |
| 367 | + 'label' => esc_html__( 'Product Added Text', 'shopbuilder' ), | |
| 368 | + 'help' => esc_html__( 'Enter the product added text.', 'shopbuilder' ), | |
| 369 | + 'type' => 'text', | |
| 370 | + 'value' => 'Product added!', | |
| 371 | + 'placeholder' => 'Product added!', | |
| 372 | + 'tab' => 'button', | |
| 373 | + ], | |
| 374 | + 'notice_removed_text' => [ | |
| 375 | + 'id' => 'notice_removed_text', | |
| 376 | + 'label' => esc_html__( 'Product Removed Text', 'shopbuilder' ), | |
| 377 | + 'help' => esc_html__( 'Enter the product removed text.', 'shopbuilder' ), | |
| 378 | + 'type' => 'text', | |
| 379 | + 'value' => 'Product removed!', | |
| 380 | + 'placeholder' => 'Product removed!', | |
| 381 | + 'tab' => 'button', | |
| 382 | + ], | |
| 383 | + 'browse_list_text' => [ | |
| 384 | + 'id' => 'browse_list_text', | |
| 385 | + 'label' => esc_html__( 'Browse Wishlist Text', 'shopbuilder' ), | |
| 386 | + 'help' => esc_html__( 'Enter a text for the "Browse wishlist" link on the product page', 'shopbuilder' ), | |
| 387 | + 'type' => 'text', | |
| 388 | + 'value' => 'Browse wishlist', | |
| 389 | + 'placeholder' => 'Browse wishlist', | |
| 390 | + 'tab' => 'button', | |
| 391 | + ], | |
| 392 | + /* | |
| 393 | + 'notice_exist_text' => array( | |
| 394 | + 'id' => 'notice_exist_text', | |
| 395 | + 'label' => esc_html__( 'Product Already Exist in Wishlist Text', 'shopbuilder' ), | |
| 396 | + 'help' => esc_html__( 'Enter the message for "already exists in the wishlist" text.', 'shopbuilder' ), | |
| 397 | + 'type' => 'text', | |
| 398 | + 'value' => 'The product is already in your wishlist!', | |
| 399 | + 'placeholder' => 'The product is already in your wishlist!', | |
| 400 | + 'tab' => 'button', | |
| 401 | + ), | |
| 402 | + */ | |
| 403 | + /* | |
| 404 | + * TODO:: Will Implement Later. | |
| 405 | + 'redirect_cart' => array( | |
| 406 | + 'id' => 'redirect_cart', | |
| 407 | + 'type' => 'switch', | |
| 408 | + 'help' => esc_html__( 'Redirect users to the cart page when they add a product to the cart from the wishlist page', 'shopbuilder' ), | |
| 409 | + 'label' => esc_html__( 'Redirect to Cart', 'shopbuilder' ), | |
| 410 | + 'tab' => 'page', | |
| 411 | + ), | |
| 412 | + 'remove_after_add_to_cart' => array( | |
| 413 | + 'value' => 'on', | |
| 414 | + 'id' => 'remove_after_add_to_cart', | |
| 415 | + 'type' => 'switch', | |
| 416 | + 'help' => esc_html__( 'Remove the product from the wishlist after it has been added to the cart', 'shopbuilder' ), | |
| 417 | + 'label' => esc_html__( 'Remove if Added to Cart', 'shopbuilder' ), | |
| 418 | + 'tab' => 'page', | |
| 419 | + ), | |
| 420 | + */ | |
| 421 | + 'page_show_fields' => [ | |
| 422 | + 'value' => WishlistFns::instance()->get_field_ids(), | |
| 423 | + 'id' => 'page_show_fields', | |
| 424 | + 'multiple' => true, | |
| 425 | + 'checkbox' => true, | |
| 426 | + 'sanitize_fn' => 'sanitize_text_field', | |
| 427 | + 'type' => 'sortable', | |
| 428 | + 'options' => WishlistFns::instance()->get_default_fields(), | |
| 429 | + 'label' => esc_html__( 'Show Fields in Table', 'shopbuilder' ), | |
| 430 | + 'tab' => 'page', | |
| 431 | + ], | |
| 432 | + | |
| 433 | + ] | |
| 434 | + ), | |
| 435 | + 'tabs' => [ | |
| 436 | + 'general' => [ | |
| 437 | + 'title' => esc_html__( 'General', 'shopbuilder' ), | |
| 438 | + ], | |
| 439 | + 'button' => [ | |
| 440 | + 'title' => esc_html__( 'Button', 'shopbuilder' ), | |
| 441 | + ], | |
| 442 | + 'page' => [ | |
| 443 | + 'title' => esc_html__( 'Page', 'shopbuilder' ), | |
| 444 | + ], | |
| 445 | + | |
| 446 | + ], | |
| 447 | + ] | |
| 448 | + ), | |
| 449 | + 'compare' => apply_filters( | |
| 450 | + 'rtsb/module/compare/options', | |
| 451 | + [ | |
| 452 | + 'id' => 'compare', | |
| 453 | + 'base_class' => Compare::class, | |
| 454 | + 'category' => 'general', | |
| 455 | + 'title' => esc_html__( 'Product Compare', 'shopbuilder' ), | |
| 456 | + 'package' => 'free', | |
| 457 | + 'active' => 'on', | |
| 458 | + 'active_field' => [ | |
| 459 | + 'label' => esc_html__( 'Enable Product Comparison?', 'shopbuilder' ), | |
| 460 | + 'help' => esc_html__( 'Switch on to enable product comparison module.', 'shopbuilder' ), | |
| 461 | + ], | |
| 462 | + 'fields' => apply_filters( | |
| 463 | + 'rtsb/module/compare/fields', | |
| 464 | + [ | |
| 465 | + 'show_btn_on_loop' => [ | |
| 466 | + 'id' => 'show_btn_on_loop', | |
| 467 | + 'value' => 'on', | |
| 468 | + 'type' => 'switch', | |
| 469 | + 'label' => esc_html__( 'Show In Archive Page or Any Products Loop', 'shopbuilder' ), | |
| 470 | + 'tab' => 'button', | |
| 471 | + ], | |
| 472 | + 'loop_btn_position' => [ | |
| 473 | + 'id' => 'loop_btn_position', | |
| 474 | + 'type' => 'select', | |
| 475 | + 'value' => 'custom', | |
| 476 | + 'label' => esc_html__( 'Products Loop Button Position', 'shopbuilder' ), | |
| 477 | + 'help' => esc_html__( 'You can manage wishlist button position in product list page.', 'shopbuilder' ), | |
| 478 | + 'options' => [ | |
| 479 | + 'before_add_to_cart' => esc_html__( 'Before Add To Cart', 'shopbuilder' ), | |
| 480 | + 'after_add_to_cart' => esc_html__( 'After Add To Cart', 'shopbuilder' ), | |
| 481 | + 'top_thumbnail' => esc_html__( 'Top On Image', 'shopbuilder' ), | |
| 482 | + 'shortcode' => esc_html__( 'Use Shortcode', 'shopbuilder' ), | |
| 483 | + 'custom' => esc_html__( 'Custom Position', 'shopbuilder' ), | |
| 484 | + ], | |
| 485 | + 'dependency' => [ | |
| 486 | + 'rules' => [ | |
| 487 | + [ | |
| 488 | + 'item' => 'modules.compare.show_btn_on_loop', | |
| 489 | + 'value' => 'on', | |
| 490 | + 'operator' => '==', | |
| 491 | + ], | |
| 492 | + ], | |
| 493 | + ], | |
| 494 | + 'tab' => 'button', | |
| 495 | + ], | |
| 496 | + 'loop_btn_position_shortcode' => [ | |
| 497 | + 'type' => 'raw', | |
| 498 | + 'label' => ' ', | |
| 499 | + 'html' => sprintf( | |
| 500 | + /* translators: 1: The shortcode.*/ | |
| 501 | + 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' ), | |
| 502 | + '<code>[rtsb_compare_button]</code>' | |
| 503 | + ), | |
| 504 | + 'dependency' => [ | |
| 505 | + 'rules' => [ | |
| 506 | + [ | |
| 507 | + 'item' => 'modules.compare.show_btn_on_loop', | |
| 508 | + 'value' => 'on', | |
| 509 | + 'operator' => '==', | |
| 510 | + ], | |
| 511 | + [ | |
| 512 | + 'item' => 'modules.compare.loop_btn_position', | |
| 513 | + 'value' => 'shortcode', | |
| 514 | + 'operator' => '==', | |
| 515 | + ], | |
| 516 | + ], | |
| 517 | + ], | |
| 518 | + 'tab' => 'button', | |
| 519 | + ], | |
| 520 | + 'loop_custom_hook_name' => [ | |
| 521 | + 'id' => 'product_custom_hook_name', | |
| 522 | + 'type' => 'text', | |
| 523 | + 'label' => esc_html__( 'Product Hook Name', 'shopbuilder' ), | |
| 524 | + 'tab' => 'button', | |
| 525 | + 'dependency' => [ | |
| 526 | + 'rules' => [ | |
| 527 | + [ | |
| 528 | + 'item' => 'modules.compare.show_btn_on_loop', | |
| 529 | + 'value' => 'on', | |
| 530 | + 'operator' => '==', | |
| 531 | + ], | |
| 532 | + [ | |
| 533 | + 'item' => 'modules.compare.loop_btn_position', | |
| 534 | + 'value' => 'custom', | |
| 535 | + 'operator' => '==', | |
| 536 | + ], | |
| 537 | + ], | |
| 538 | + ], | |
| 539 | + ], | |
| 540 | + 'loop_custom_hook_priority' => [ | |
| 541 | + 'id' => 'product_custom_hook_priority', | |
| 542 | + 'type' => 'number', | |
| 543 | + 'value' => 10, | |
| 544 | + 'size' => 'small', | |
| 545 | + 'min' => 0, | |
| 546 | + 'max' => 999, | |
| 547 | + 'label' => esc_html__( 'Product Hook Priority', 'shopbuilder' ), | |
| 548 | + 'tab' => 'button', | |
| 549 | + 'dependency' => [ | |
| 550 | + 'rules' => [ | |
| 551 | + [ | |
| 552 | + 'item' => 'modules.compare.show_btn_on_loop', | |
| 553 | + 'value' => 'on', | |
| 554 | + 'operator' => '==', | |
| 555 | + ], | |
| 556 | + [ | |
| 557 | + 'item' => 'modules.compare.loop_btn_position', | |
| 558 | + 'value' => 'custom', | |
| 559 | + 'operator' => '==', | |
| 560 | + ], | |
| 561 | + ], | |
| 562 | + 'relation' => 'and', | |
| 563 | + ], | |
| 564 | + ], | |
| 565 | + 'show_btn_product_page' => [ | |
| 566 | + 'id' => 'show_btn_product_page', | |
| 567 | + 'type' => 'switch', | |
| 568 | + 'value' => 'on', | |
| 569 | + 'label' => esc_html__( 'Show Button in Single Product Page', 'shopbuilder' ), | |
| 570 | + 'tab' => 'button', | |
| 571 | + ], | |
| 572 | + 'product_btn_position' => [ | |
| 573 | + 'id' => 'product_btn_position', | |
| 574 | + 'label' => esc_html__( 'Product Page Button Position', 'shopbuilder' ), | |
| 575 | + 'help' => esc_html__( 'You can manage compare button position in single product page.', 'shopbuilder' ), | |
| 576 | + 'type' => 'select', | |
| 577 | + 'value' => 'custom', | |
| 578 | + 'options' => [ | |
| 579 | + 'before_add_to_cart' => esc_html__( 'Before Add To Cart', 'shopbuilder' ), | |
| 580 | + 'after_add_to_cart' => esc_html__( 'After Add To Cart', 'shopbuilder' ), | |
| 581 | + 'after_thumbnail' => esc_html__( 'After Image', 'shopbuilder' ), | |
| 582 | + 'after_summary' => esc_html__( 'After Summary', 'shopbuilder' ), | |
| 583 | + 'shortcode' => esc_html__( 'Use Shortcode', 'shopbuilder' ), | |
| 584 | + 'custom' => esc_html__( 'Custom Position', 'shopbuilder' ), | |
| 585 | + ], | |
| 586 | + 'dependency' => [ | |
| 587 | + 'rules' => [ | |
| 588 | + [ | |
| 589 | + 'item' => 'modules.compare.show_btn_product_page', | |
| 590 | + 'value' => 'on', | |
| 591 | + 'operator' => '==', | |
| 592 | + ], | |
| 593 | + ], | |
| 594 | + ], | |
| 595 | + 'tab' => 'button', | |
| 596 | + ], | |
| 597 | + 'product_btn_position_shortcode' => [ | |
| 598 | + 'type' => 'raw', | |
| 599 | + 'label' => ' ', | |
| 600 | + 'html' => sprintf( | |
| 601 | + /* translators: 1: The shortcode.*/ | |
| 602 | + esc_html__( 'Choose where to show button on the product page. Copy this shortcode %1$s and paste it where you want to show the button.', 'shopbuilder' ), | |
| 603 | + '<code>[rtsb_wishlist_button]</code> ' | |
| 604 | + ), | |
| 605 | + 'dependency' => [ | |
| 606 | + 'rules' => [ | |
| 607 | + [ | |
| 608 | + 'item' => 'modules.wishlist.show_btn_product_page', | |
| 609 | + 'value' => 'on', | |
| 610 | + 'operator' => '==', | |
| 611 | + ], | |
| 612 | + [ | |
| 613 | + 'item' => 'modules.wishlist.product_btn_position', | |
| 614 | + 'value' => 'shortcode', | |
| 615 | + 'operator' => '==', | |
| 616 | + ], | |
| 617 | + ], | |
| 618 | + ], | |
| 619 | + 'tab' => 'button', | |
| 620 | + ], | |
| 621 | + 'product_custom_hook_name' => [ | |
| 622 | + 'id' => 'product_custom_hook_name', | |
| 623 | + 'type' => 'text', | |
| 624 | + 'label' => esc_html__( 'Product Hook Name', 'shopbuilder' ), | |
| 625 | + 'tab' => 'button', | |
| 626 | + 'dependency' => [ | |
| 627 | + 'rules' => [ | |
| 628 | + [ | |
| 629 | + 'item' => 'modules.compare.show_btn_product_page', | |
| 630 | + 'value' => 'on', | |
| 631 | + 'operator' => '==', | |
| 632 | + ], | |
| 633 | + [ | |
| 634 | + 'item' => 'modules.compare.product_btn_position', | |
| 635 | + 'value' => 'custom', | |
| 636 | + 'operator' => '==', | |
| 637 | + ], | |
| 638 | + ], | |
| 639 | + ], | |
| 640 | + ], | |
| 641 | + 'product_custom_hook_priority' => [ | |
| 642 | + 'id' => 'product_custom_hook_priority', | |
| 643 | + 'type' => 'number', | |
| 644 | + 'value' => 10, | |
| 645 | + 'size' => 'small', | |
| 646 | + 'min' => 0, | |
| 647 | + 'max' => 999, | |
| 648 | + 'label' => esc_html__( 'Product Hook Priority', 'shopbuilder' ), | |
| 649 | + 'tab' => 'button', | |
| 650 | + 'dependency' => [ | |
| 651 | + 'rules' => [ | |
| 652 | + [ | |
| 653 | + 'item' => 'modules.compare.show_btn_product_page', | |
| 654 | + 'value' => 'on', | |
| 655 | + 'operator' => '==', | |
| 656 | + ], | |
| 657 | + [ | |
| 658 | + 'item' => 'modules.compare.product_btn_position', | |
| 659 | + 'value' => 'custom', | |
| 660 | + 'operator' => '==', | |
| 661 | + ], | |
| 662 | + ], | |
| 663 | + 'relation' => 'and', | |
| 664 | + ], | |
| 665 | + ], | |
| 666 | + 'button_text' => [ | |
| 667 | + 'id' => 'button_text', | |
| 668 | + 'label' => esc_html__( 'Button Text', 'shopbuilder' ), | |
| 669 | + 'help' => esc_html__( 'Enter your compare button text.', 'shopbuilder' ), | |
| 670 | + 'type' => 'text', | |
| 671 | + 'value' => 'Compare', | |
| 672 | + 'placeholder' => 'Compare', | |
| 673 | + 'tab' => 'button', | |
| 674 | + ], | |
| 675 | + 'notice_added_text' => [ | |
| 676 | + 'id' => 'notice_added_text', | |
| 677 | + 'label' => esc_html__( 'Product Added Text', 'shopbuilder' ), | |
| 678 | + 'help' => esc_html__( 'Enter the product added text.', 'shopbuilder' ), | |
| 679 | + 'type' => 'text', | |
| 680 | + 'value' => 'Product added!', | |
| 681 | + 'placeholder' => 'Product added!', | |
| 682 | + 'tab' => 'button', | |
| 683 | + ], | |
| 684 | + 'browse_list_text' => [ | |
| 685 | + 'id' => 'browse_list_text', | |
| 686 | + 'label' => esc_html__( 'Browse Compare Text', 'shopbuilder' ), | |
| 687 | + 'help' => esc_html__( 'Enter a text for the "Browse compare" link on the compare page', 'shopbuilder' ), | |
| 688 | + 'type' => 'text', | |
| 689 | + 'value' => 'Browse compare', | |
| 690 | + 'placeholder' => 'Browse compare', | |
| 691 | + 'tab' => 'button', | |
| 692 | + ], | |
| 693 | + 'notice_removed_text' => [ | |
| 694 | + 'id' => 'notice_removed_text', | |
| 695 | + 'label' => esc_html__( 'Product Removed Text', 'shopbuilder' ), | |
| 696 | + 'help' => esc_html__( 'Enter the product removed text.', 'shopbuilder' ), | |
| 697 | + 'type' => 'text', | |
| 698 | + 'value' => 'Product removed!', | |
| 699 | + 'placeholder' => 'Product removed!', | |
| 700 | + 'tab' => 'button', | |
| 701 | + ], | |
| 702 | + 'page' => [ | |
| 703 | + 'id' => 'page', | |
| 704 | + 'type' => 'select', | |
| 705 | + 'help' => sprintf( | |
| 706 | + /* translators: 1: The shortcode.*/ | |
| 707 | + esc_html__( 'Select a page for compare page and make sure you add the shortcode %1$s into the page content', 'shopbuilder' ), | |
| 708 | + '<code>[rtsb_compare_list]</code>' | |
| 709 | + ), | |
| 710 | + 'label' => esc_html__( 'Compare Page', 'shopbuilder' ), | |
| 711 | + 'options' => Fns::get_pages(), | |
| 712 | + 'empty' => esc_html__( 'Select a page', 'shopbuilder' ), | |
| 713 | + 'searchable' => true, | |
| 714 | + 'tab' => 'page', | |
| 715 | + ], | |
| 716 | + 'max_limit' => [ | |
| 717 | + 'id' => 'page', | |
| 718 | + 'type' => 'number', | |
| 719 | + 'sanitize_fn' => 'absint', | |
| 720 | + 'value' => 10, | |
| 721 | + 'help' => esc_html__( 'You can manage your maximum compare quantity from here.', 'shopbuilder' ), | |
| 722 | + 'label' => esc_html__( 'Max Limit', 'shopbuilder' ), | |
| 723 | + 'tab' => 'page', | |
| 724 | + ], | |
| 725 | + 'page_show_fields' => [ | |
| 726 | + 'value' => CompareFns::get_list_field_ids(), | |
| 727 | + 'id' => 'page_show_fields', | |
| 728 | + 'multiple' => true, | |
| 729 | + 'checkbox' => true, | |
| 730 | + 'type' => 'sortable', | |
| 731 | + 'options' => CompareFns::get_available_list_fields(), | |
| 732 | + 'label' => esc_html__( 'Show Fields in List', 'shopbuilder' ), | |
| 733 | + 'tab' => 'page', | |
| 734 | + ], | |
| 735 | + | |
| 736 | + ] | |
| 737 | + ), | |
| 738 | + 'tabs' => [ | |
| 739 | + 'button' => [ | |
| 740 | + 'title' => esc_html__( 'Button', 'shopbuilder' ), | |
| 741 | + ], | |
| 742 | + 'page' => [ | |
| 743 | + 'title' => esc_html__( 'Page', 'shopbuilder' ), | |
| 744 | + ], | |
| 745 | + | |
| 746 | + ], | |
| 747 | + ] | |
| 748 | + ), | |
| 749 | + 'variation_gallery' => apply_filters( | |
| 750 | + 'rtsb/module/variation_gallery/options', | |
| 751 | + [ | |
| 752 | + 'id' => 'variation_gallery', | |
| 753 | + 'external' => true, | |
| 754 | + 'category' => 'general', | |
| 755 | + 'title' => esc_html__( 'Variation Gallery', 'shopbuilder' ), | |
| 756 | + 'pluginSlug' => 'woo-product-variation-gallery', | |
| 757 | + 'pluginIsInstalled' => Fns::check_plugin_installed( 'woo-product-variation-gallery/woo-product-variation-gallery.php' ), | |
| 758 | + 'pluginIsActive' => Fns::check_plugin_active( 'woo-product-variation-gallery/woo-product-variation-gallery.php' ), | |
| 759 | + 'pluginActiveUrl' => add_query_arg( | |
| 760 | + [ | |
| 761 | + '_wpnonce' => wp_create_nonce( 'activate-plugin_woo-product-variation-gallery/woo-product-variation-gallery.php' ), | |
| 762 | + 'action' => 'activate', | |
| 763 | + 'plugin' => 'woo-product-variation-gallery/woo-product-variation-gallery.php', | |
| 764 | + ], | |
| 765 | + admin_url( 'plugins.php' ) | |
| 766 | + ), | |
| 767 | + 'help' => esc_html__( 'This module requires: Variation Images Gallery for WooCommerce Plugin', 'shopbuilder' ), | |
| 768 | + 'package' => 'free', | |
| 769 | + 'active_field' => [ | |
| 770 | + 'disable' => false, | |
| 771 | + ], | |
| 772 | + 'fields' => [], | |
| 773 | + ] | |
| 774 | + ), | |
| 775 | + 'variation_swatches' => apply_filters( | |
| 776 | + 'rtsb/module/variation_swatches/options', | |
| 777 | + [ | |
| 778 | + 'id' => 'variation_swatches', | |
| 779 | + 'external' => true, | |
| 780 | + 'category' => 'general', | |
| 781 | + 'title' => esc_html__( 'Variation Swatches', 'shopbuilder' ), | |
| 782 | + 'pluginSlug' => 'woo-product-variation-swatches', | |
| 783 | + 'pluginIsInstalled' => Fns::check_plugin_installed( 'woo-product-variation-swatches/woo-product-variation-swatches.php' ), | |
| 784 | + 'pluginIsActive' => Fns::check_plugin_active( 'woo-product-variation-swatches/woo-product-variation-swatches.php' ), | |
| 785 | + 'pluginActiveUrl' => add_query_arg( | |
| 786 | + [ | |
| 787 | + '_wpnonce' => wp_create_nonce( 'activate-plugin_woo-product-variation-swatches/woo-product-variation-swatches.php' ), | |
| 788 | + 'action' => 'activate', | |
| 789 | + 'plugin' => 'woo-product-variation-swatches/woo-product-variation-swatches.php', | |
| 790 | + ], | |
| 791 | + admin_url( 'plugins.php' ) | |
| 792 | + ), | |
| 793 | + 'help' => esc_html__( 'This module requires: Variation Swatches for WooCommerce Plugin.', 'shopbuilder' ), | |
| 794 | + 'package' => 'free', | |
| 795 | + 'active_field' => [ | |
| 796 | + 'disable' => false, | |
| 797 | + ], | |
| 798 | + 'fields' => [], | |
| 799 | + ] | |
| 800 | + ), | |
| 801 | + 'quick_checkout' => apply_filters( | |
| 802 | + 'rtsb/module/quick_checkout/options', | |
| 803 | + [ | |
| 804 | + 'id' => 'quick_checkout', | |
| 805 | + 'base_class' => QuickCheckout::class, | |
| 806 | + 'category' => 'pro', | |
| 807 | + 'title' => esc_html__( 'Quick Checkout', 'shopbuilder' ), | |
| 808 | + 'package' => 'pro-disabled', | |
| 809 | + 'active_field' => [ | |
| 810 | + 'label' => esc_html__( 'Enable Quick Checkout?', 'shopbuilder' ), | |
| 811 | + 'help' => esc_html__( 'Switch on to enable quick checkout module.', 'shopbuilder' ), | |
| 812 | + ], | |
| 813 | + 'fields' => [], | |
| 814 | + ] | |
| 815 | + ), | |
| 816 | + 'mini_cart' => apply_filters( | |
| 817 | + 'rtsb/module/mini_cart/options', | |
| 818 | + [ | |
| 819 | + 'id' => 'mini_cart', | |
| 820 | + 'base_class' => MiniCart::class, | |
| 821 | + 'category' => 'pro', | |
| 822 | + 'title' => esc_html__( 'Mini Cart', 'shopbuilder' ), | |
| 823 | + 'package' => 'pro-disabled', | |
| 824 | + 'active_field' => [ | |
| 825 | + 'label' => esc_html__( 'Enable Mini Cart?', 'shopbuilder' ), | |
| 826 | + 'help' => esc_html__( 'Switch on to enable mini cart module.', 'shopbuilder' ), | |
| 827 | + ], | |
| 828 | + 'fields' => [], | |
| 829 | + ] | |
| 830 | + ), | |
| 831 | + ]; | |
| 832 | + | |
| 833 | + return apply_filters( 'rtsb/core/modules/raw_list', $list ); | |
| 834 | + } | |
| 835 | +} | |