PluginProbe
Product Labels, Quick View, Buy Now, Pre-Orders, Frequently Bought Together & More for WooCommerce – Merchant / 2.3.0
Product Labels, Quick View, Buy Now, Pre-Orders, Frequently Bought Together & More for WooCommerce – Merchant v2.3.0
2.3.2 2.3.1 2.3.0 2.2.8 2.2.7 trunk 1.10.0 1.10.1 1.10.2 1.10.3 1.10.4 1.10.5 1.11.0 1.11.1 1.11.2 1.6 1.7 1.8 1.8.1 1.8.2 1.8.3 1.9.0 1.9.1 1.9.10 1.9.11 All 60 releases
merchant / inc / modules / wishlist / admin / options.php

options.php in Product Labels, Quick View, Buy Now, Pre-Orders, Frequently Bought Together & More for WooCommerce – Merchant 2.3.0, at inc/modules/wishlist/admin/options.php

555 lines 16.3 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 /**
4 * Wishlist — Option group definitions.
5 *
6 * Pure data file. Returns the option groups array
7 * consumed by init_option_groups().
8 *
9 * @package Merchant
10 */
11
12 if ( ! defined( 'ABSPATH' ) ) {
13 exit; // Exit if accessed directly
14 }
15
16 // General Settings.
17
18 return array(
19 array(
20 'title' => esc_html__( 'General Settings', 'merchant' ),
21 'module' => 'wishlist',
22 'fields' => array(
23
24 // Display on single product pages.
25 array(
26 'id' => 'display_on_shop_archive',
27 'type' => 'switcher',
28 'title' => esc_html__( 'Display on shop archive', 'merchant' ),
29 'desc' => esc_html__( 'Display the wishlist button in the products grid from shop catalog pages.', 'merchant' ),
30 'default' => 1,
31 ),
32
33 // Display on single product pages.
34 array(
35 'id' => 'display_on_single_product',
36 'type' => 'switcher',
37 'title' => esc_html__( 'Display on single product', 'merchant' ),
38 'desc' => esc_html__( 'Display the wishlist button in the single product pages.', 'merchant' ),
39 'default' => 1,
40 ),
41
42 array(
43 'id' => 'display_on_cart_page',
44 'type' => 'switcher',
45 'title' => esc_html__( 'Display on cart page', 'merchant' ),
46 'desc' => esc_html__( 'Display the wishlist products on the cart page.', 'merchant' ),
47 'default' => 0,
48 ),
49
50 array(
51 'id' => 'posts_per_page',
52 'type' => 'range',
53 'title' => esc_html__( 'Products', 'merchant' ),
54 'desc' => esc_html__( 'Controls the number of products to display in the wishlist grid.', 'merchant' ),
55 'min' => 1,
56 'max' => 30,
57 'step' => 1,
58 'unit' => '',
59 'default' => 6,
60 'condition' => array( 'display_on_cart_page', '==', '1' ),
61 ),
62
63 array(
64 'id' => 'cart_page_title',
65 'type' => 'text',
66 'title' => esc_html__( 'Title', 'merchant' ),
67 'default' => esc_html__( 'Your wishlist items', 'merchant' ),
68 'condition' => array( 'display_on_cart_page', '==', '1' ),
69 ),
70
71 array(
72 'id' => 'cart_page_title_tag',
73 'type' => 'select',
74 'title' => esc_html__( 'Title HTML tag', 'merchant' ),
75 'options' => array(
76 'h1' => esc_html__( 'H1', 'merchant' ),
77 'h2' => esc_html__( 'H2', 'merchant' ),
78 'h3' => esc_html__( 'H3', 'merchant' ),
79 'h4' => esc_html__( 'H4', 'merchant' ),
80 'h5' => esc_html__( 'H5', 'merchant' ),
81 'h6' => esc_html__( 'H6', 'merchant' ),
82 'div' => esc_html__( 'div', 'merchant' ),
83 ),
84 'default' => 'h2',
85 'condition' => array( 'display_on_cart_page', '==', '1' ),
86 ),
87
88 array(
89 'id' => 'inclusion',
90 'type' => 'switcher',
91 'title' => esc_html__( 'Product Inclusion', 'merchant' ),
92 'desc' => esc_html__( 'Include only certain products or categories', 'merchant' ),
93 'default' => 0,
94 'ai_meta' => array(
95 'toggle_for' => 'included_products',
96 'semantic_group' => 'product_targeting',
97 'usage_hint' => 'Enable to restrict the wishlist button to specific products or categories. Set this BEFORE setting included_products or included_categories.',
98 ),
99 ),
100
101 array(
102 'id' => 'included_products',
103 'type' => 'products_selector',
104 'title' => esc_html__( 'Include Products', 'merchant' ),
105 'multiple' => true,
106 'conditions' => array(
107 'relation' => 'AND',
108 'terms' => array(
109 array(
110 'field' => 'inclusion',
111 'operator' => '===',
112 'value' => true,
113 ),
114 ),
115 ),
116 'ai_meta' => array(
117 'entity' => 'product',
118 'reference_type' => 'static',
119 'value_format' => 'product_id',
120 'semantic_group' => 'product_targeting',
121 'abstraction_level' => 1,
122 'toggled_by' => 'inclusion',
123 'usage_hint' => 'Only these specific products will display the wishlist button. Requires inclusion=true.',
124 ),
125 ),
126
127 array(
128 'id' => 'included_categories',
129 'type' => 'select_ajax',
130 'title' => esc_html__( 'Include Categories', 'merchant' ),
131 'source' => 'options',
132 'multiple' => true,
133 'options' => Merchant_Admin_Options::get_category_select2_choices(),
134 'placeholder' => esc_html__( 'Select categories', 'merchant' ),
135 'conditions' => array(
136 'relation' => 'AND',
137 'terms' => array(
138 array(
139 'field' => 'inclusion',
140 'operator' => '===',
141 'value' => true,
142 ),
143 ),
144 ),
145 'ai_meta' => array(
146 'entity' => 'category',
147 'reference_type' => 'dynamic',
148 'taxonomy' => 'product_cat',
149 'value_format' => 'slug',
150 'semantic_group' => 'product_targeting',
151 'abstraction_level' => 3,
152 'toggled_by' => 'inclusion',
153 'usage_hint' => 'Only products from these categories will display the wishlist button. Dynamic: future products in the category are included. Requires inclusion=true.',
154 ),
155 ),
156
157 array(
158 'id' => 'exclusion',
159 'type' => 'switcher',
160 'title' => esc_html__( 'Product Exclusion', 'merchant' ),
161 'desc' => esc_html__( 'Exclude certain products or categories', 'merchant' ),
162 'default' => 0,
163 'ai_meta' => array(
164 'toggle_for' => 'excluded_products',
165 'semantic_group' => 'product_exclusion',
166 'usage_hint' => 'Enable to hide the wishlist button from specific products or categories. Set this BEFORE setting excluded_products or excluded_categories.',
167 ),
168 ),
169
170 array(
171 'id' => 'excluded_products',
172 'type' => 'products_selector',
173 'title' => esc_html__( 'Exclude Products', 'merchant' ),
174 'multiple' => true,
175 'conditions' => array(
176 'relation' => 'AND',
177 'terms' => array(
178 array(
179 'field' => 'exclusion',
180 'operator' => '===',
181 'value' => true,
182 ),
183 ),
184 ),
185 'ai_meta' => array(
186 'entity' => 'product',
187 'reference_type' => 'static',
188 'value_format' => 'product_id',
189 'semantic_group' => 'product_exclusion',
190 'abstraction_level' => 1,
191 'toggled_by' => 'exclusion',
192 'usage_hint' => 'These specific products will NOT display the wishlist button. Requires exclusion=true.',
193 ),
194 ),
195
196 array(
197 'id' => 'excluded_categories',
198 'type' => 'select_ajax',
199 'title' => esc_html__( 'Exclude Categories', 'merchant' ),
200 'source' => 'options',
201 'multiple' => true,
202 'options' => Merchant_Admin_Options::get_category_select2_choices(),
203 'placeholder' => esc_html__( 'Select categories', 'merchant' ),
204 'conditions' => array(
205 'relation' => 'AND',
206 'terms' => array(
207 array(
208 'field' => 'exclusion',
209 'operator' => '===',
210 'value' => true,
211 ),
212 ),
213 ),
214 'ai_meta' => array(
215 'entity' => 'category',
216 'reference_type' => 'dynamic',
217 'taxonomy' => 'product_cat',
218 'value_format' => 'slug',
219 'semantic_group' => 'product_exclusion',
220 'abstraction_level' => 3,
221 'toggled_by' => 'exclusion',
222 'usage_hint' => 'Products from these categories will NOT display the wishlist button. Dynamic: future products in the category are automatically excluded. Requires exclusion=true.',
223 ),
224 ),
225 ),
226 ),
227 array(
228 'title' => esc_html__( 'Add To Wishlist Button Settings', 'merchant' ),
229 'module' => 'wishlist',
230 'fields' => array(
231
232 // Button icon.
233 array(
234 'id' => 'button_icon',
235 'type' => 'choices',
236 'title' => esc_html__( 'Select an icon', 'merchant' ),
237 'options' => array(
238 'heart1' => MERCHANT_URI . 'inc/modules/wishlist/admin/icons/heart1.svg',
239 'heart2' => MERCHANT_URI . 'inc/modules/wishlist/admin/icons/heart2.svg',
240 ),
241 'default' => 'heart1',
242 ),
243
244 // Button position top.
245 array(
246 'id' => 'button_position_top',
247 'type' => 'range',
248 'title' => esc_html__( 'Button vertical position', 'merchant' ),
249 'min' => 1,
250 'max' => 80,
251 'step' => 1,
252 'default' => 20,
253 'unit' => 'px',
254 ),
255
256 // Button position left.
257 array(
258 'id' => 'button_position_left',
259 'type' => 'range',
260 'title' => esc_html__( 'Button horizontal position', 'merchant' ),
261 'min' => 1,
262 'max' => 80,
263 'step' => 1,
264 'default' => 20,
265 'unit' => 'px',
266 ),
267
268 // Tooltip.
269 array(
270 'id' => 'tooltip',
271 'type' => 'switcher',
272 'title' => esc_html__( 'Display tooltip', 'merchant' ),
273 'default' => 1,
274 ),
275
276 // Tooltip text.
277 array(
278 'id' => 'tooltip_text',
279 'type' => 'text',
280 'title' => esc_html__( 'Tooltip text', 'merchant' ),
281 'default' => esc_html__( 'Add to wishlist', 'merchant' ),
282 'condition' => array( 'tooltip', '==', '1' ),
283 ),
284 array(
285 'id' => 'tooltip_text_after',
286 'type' => 'text',
287 'title' => esc_html__( 'Tooltip text after adding to wishlist', 'merchant' ),
288 'default' => esc_html__( 'Added to wishlist', 'merchant' ),
289 'condition' => array( 'tooltip', '==', '1' ),
290 ),
291
292 // Tooltip border radius.
293 array(
294 'id' => 'tooltip_border_radius',
295 'type' => 'range',
296 'title' => esc_html__( 'Tooltip border radius', 'merchant' ),
297 'min' => 0,
298 'max' => 35,
299 'step' => 1,
300 'default' => 4,
301 'unit' => 'px',
302 'condition' => array( 'tooltip', '==', '1' ),
303 ),
304
305 // Colors.
306
307 // Icon stroke color.
308 array(
309 'id' => 'icon_stroke_color',
310 'type' => 'color',
311 'title' => esc_html__( 'Icon stroke color', 'merchant' ),
312 'default' => '#212121',
313 ),
314
315 // Icon stroke color (hover).
316 array(
317 'id' => 'icon_stroke_color_hover',
318 'type' => 'color',
319 'title' => esc_html__( 'Icon stroke color (hover)', 'merchant' ),
320 'default' => '#212121',
321 ),
322
323 // Icon fill color.
324 array(
325 'id' => 'icon_fill_color',
326 'type' => 'color',
327 'title' => esc_html__( 'Icon fill color', 'merchant' ),
328 'default' => 'transparent',
329 ),
330
331 // Icon fill color (hover).
332 array(
333 'id' => 'icon_fill_color_hover',
334 'type' => 'color',
335 'title' => esc_html__( 'Icon fill color (hover)', 'merchant' ),
336 'default' => '#f04c4c',
337 ),
338
339 // Tooltip text color.
340 array(
341 'id' => 'tooltip_text_color',
342 'type' => 'color',
343 'title' => esc_html__( 'Tooltip text color', 'merchant' ),
344 'default' => '#FFF',
345 ),
346
347 // Tooltip background color.
348 array(
349 'id' => 'tooltip_background_color',
350 'type' => 'color',
351 'title' => esc_html__( 'Tooltip background color', 'merchant' ),
352 'default' => '#212121',
353 ),
354
355 ),
356 ),
357 array(
358 'module' => 'wishlist',
359 'title' => esc_html__( 'Wishlist Page Settings', 'merchant' ),
360 'fields' => array(
361
362 // Create Wishlist Page.
363 array(
364 'id' => 'create_page',
365 'type' => 'create_page',
366 'title' => esc_html__( 'Wishlist page', 'merchant' ),
367 'page_title' => esc_html__( 'My Wishlist', 'merchant' ),
368 'page_meta_key' => '_wp_page_template',
369 'page_meta_value' => 'modules/wishlist/page-template-wishlist.php',
370 'option_name' => 'merchant_wishlist_page_id',
371 ),
372
373 // Hide page title.
374 array(
375 'id' => 'hide_page_title',
376 'type' => 'switcher',
377 'title' => esc_html__( 'Hide page title', 'merchant' ),
378 'default' => 0,
379 ),
380
381 // Table heading background color.
382 array(
383 'id' => 'table_heading_background_color',
384 'type' => 'color',
385 'title' => esc_html__( 'Table heading background color', 'merchant' ),
386 'default' => '#FFF',
387 ),
388
389 // Table body background color.
390 array(
391 'id' => 'table_body_background_color',
392 'type' => 'color',
393 'title' => esc_html__( 'Table body background color', 'merchant' ),
394 'default' => '#fdfdfd',
395 ),
396
397 // Table text color.
398 array(
399 'id' => 'table_text_color',
400 'type' => 'color',
401 'title' => esc_html__( 'Table text color', 'merchant' ),
402 'default' => '#777',
403 ),
404
405 // Table links color.
406 array(
407 'id' => 'table_links_color',
408 'type' => 'color',
409 'title' => esc_html__( 'Table links color', 'merchant' ),
410 'default' => '#212121',
411 ),
412
413 // Table links color (hover).
414 array(
415 'id' => 'table_links_color_hover',
416 'type' => 'color',
417 'title' => esc_html__( 'Table links color (hover)', 'merchant' ),
418 'default' => '#757575',
419 ),
420
421 // Buttons color.
422 array(
423 'id' => 'buttons_color',
424 'type' => 'color',
425 'title' => esc_html__( 'Buttons color', 'merchant' ),
426 'default' => '#FFF',
427 ),
428
429 // Buttons color (hover).
430 array(
431 'id' => 'buttons_color_hover',
432 'type' => 'color',
433 'title' => esc_html__( 'Buttons color (hover)', 'merchant' ),
434 'default' => '#FFF',
435 ),
436
437 // Buttons background color.
438 array(
439 'id' => 'buttons_background_color',
440 'type' => 'color',
441 'title' => esc_html__( 'Buttons background color', 'merchant' ),
442 'default' => '#212121',
443 ),
444
445 // Buttons color (hover).
446 array(
447 'id' => 'buttons_background_color_hover',
448 'type' => 'color',
449 'title' => esc_html__( 'Buttons background color (hover)', 'merchant' ),
450 'default' => '#757575',
451 ),
452
453 ),
454 ),
455 array(
456 'module' => Merchant_Wishlist::MODULE_ID,
457 'title' => esc_html__( 'Wishlist Sharing Settings', 'merchant' ),
458 'fields' => array(
459
460 // Enable.
461 array(
462 'id' => 'enable_sharing',
463 'type' => 'switcher',
464 'title' => esc_html__( 'Enable', 'merchant' ),
465 'desc' => esc_html__( 'Allow users to share the wishlist.', 'merchant' ),
466 'default' => 1,
467 ),
468
469 // Sharing Links.
470 array(
471 'id' => 'sharing_links',
472 'type' => 'flexible_content',
473 'sorting' => true,
474 'title' => esc_html__( 'Social links', 'merchant' ),
475 'desc' => esc_html__( 'Add the available social links to share the wishlist.', 'merchant' ),
476 'button_label' => esc_html__( 'Add new', 'merchant' ),
477 'layouts' => array(
478 'social' => array(
479 'title' => esc_html__( 'Social link', 'merchant' ),
480 'fields' => array(
481 array(
482 'id' => 'social_network',
483 'title' => esc_html__( 'Social Network', 'merchant' ),
484 'type' => 'select',
485 'options' => array(
486 'facebook' => esc_html__( 'Facebook', 'merchant' ),
487 'twitter' => esc_html__( 'Twitter', 'merchant' ),
488 'linkedin' => esc_html__( 'Linkedin', 'merchant' ),
489 'pinterest' => esc_html__( 'Pinterest', 'merchant' ),
490 'whatsapp' => esc_html__( 'Whatsapp', 'merchant' ),
491 'telegram' => esc_html__( 'Telegram', 'merchant' ),
492 'vk' => esc_html__( 'VK', 'merchant' ),
493 'weibo' => esc_html__( 'Weibo', 'merchant' ),
494 'reddit' => esc_html__( 'Reddit', 'merchant' ),
495 'ok' => esc_html__( 'Ok', 'merchant' ),
496 'xing' => esc_html__( 'Xing', 'merchant' ),
497 'mail' => esc_html__( 'Mail', 'merchant' ),
498 ),
499 'default' => 'facebook',
500 ),
501 ),
502 ),
503 ),
504 'default' => array(
505 array(
506 'layout' => 'social',
507 'social_network' => 'facebook',
508 ),
509 array(
510 'layout' => 'social',
511 'social_network' => 'twitter',
512 ),
513 array(
514 'layout' => 'social',
515 'social_network' => 'linkedin',
516 ),
517 ),
518 ),
519
520 // Dislay Copy To Clipboard.
521 array(
522 'id' => 'display_copy_to_clipboard',
523 'type' => 'switcher',
524 'title' => esc_html__( 'Display copy to clipboard', 'merchant' ),
525 'desc' => esc_html__( 'Displays a copy to clipboard field after the social links.', 'merchant' ),
526 'default' => 1,
527 ),
528 ),
529 ),
530 array(
531 'module' => Merchant_Wishlist::MODULE_ID,
532 'title' => esc_html__( 'Use shortcode', 'merchant' ),
533 'fields' => array(
534 array(
535 'id' => 'use_shortcode',
536 'type' => 'switcher',
537 'title' => esc_html__( 'Use shortcode', 'merchant' ),
538 'default' => 0,
539 ),
540 array(
541 'type' => 'info',
542 'id' => 'shortcode_info',
543 'content' => esc_html__( 'If you are using a page builder or a theme that supports shortcodes, then you can output the module using the shortcode above. This might be useful if, for example, you find that you want to control the position of the module output more precisely than with the module settings. Note that the shortcodes can only be used on single product pages.', 'merchant' ),
544 ),
545 array(
546 'id' => 'shortcode_text',
547 'type' => 'text_readonly',
548 'title' => esc_html__( 'Shortcode text', 'merchant' ),
549 'default' => '[merchant_module_' . str_replace( '-', '_', Merchant_Wishlist::MODULE_ID ) . ']',
550 'condition' => array( 'use_shortcode', '==', '1' ),
551 ),
552 ),
553 ),
554 );
555