PluginProbe
Product Labels, Quick View, Buy Now, Pre-Orders, Frequently Bought Together & More for WooCommerce – Merchant / 1.10.4
Product Labels, Quick View, Buy Now, Pre-Orders, Frequently Bought Together & More for WooCommerce – Merchant v1.10.4
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 1.10.4, at inc/modules/wishlist/admin/options.php

420 lines 11.9 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 /**
4 * Wishlist Options.
5 *
6 * @package Merchant
7 */
8
9 if ( ! defined( 'ABSPATH' ) ) {
10 exit; // Exit if accessed directly
11 }
12
13 // General Settings.
14 Merchant_Admin_Options::create( array(
15 'title' => esc_html__( 'General Settings', 'merchant' ),
16 'module' => 'wishlist',
17 'fields' => array(
18
19 // Display on single product pages.
20 array(
21 'id' => 'display_on_shop_archive',
22 'type' => 'switcher',
23 'title' => esc_html__( 'Display on shop archive', 'merchant' ),
24 'desc' => esc_html__( 'Display the wishlist button in the products grid from shop catalog pages.', 'merchant' ),
25 'default' => 1,
26 ),
27
28 // Display on single product pages.
29 array(
30 'id' => 'display_on_single_product',
31 'type' => 'switcher',
32 'title' => esc_html__( 'Display on single product', 'merchant' ),
33 'desc' => esc_html__( 'Display the wishlist button in the single product pages.', 'merchant' ),
34 'default' => 1,
35 ),
36
37 array(
38 'id' => 'display_on_cart_page',
39 'type' => 'switcher',
40 'title' => esc_html__( 'Display on cart page', 'merchant' ),
41 'desc' => esc_html__( 'Display the wishlist products in the cart pages.', 'merchant' ),
42 'default' => 0,
43 ),
44
45 array(
46 'id' => 'posts_per_page',
47 'type' => 'range',
48 'title' => esc_html__( 'Products', 'merchant' ),
49 'desc' => esc_html__( 'Controls the number of products to display in the wishlist grid.', 'merchant' ),
50 'min' => 1,
51 'max' => 30,
52 'step' => 1,
53 'unit' => '',
54 'default' => 6,
55 'condition' => array( 'display_on_cart_page', '==', '1' ),
56 ),
57
58 array(
59 'id' => 'cart_page_title',
60 'type' => 'text',
61 'title' => esc_html__( 'Title', 'merchant' ),
62 'default' => esc_html__( 'Saved for later', 'merchant' ),
63 'condition' => array( 'display_on_cart_page', '==', '1' ),
64 ),
65
66 array(
67 'id' => 'cart_page_title_tag',
68 'type' => 'select',
69 'title' => esc_html__( 'Title HTML tag', 'merchant' ),
70 'options' => array(
71 'h1' => esc_html__( 'H1', 'merchant' ),
72 'h2' => esc_html__( 'H2', 'merchant' ),
73 'h3' => esc_html__( 'H3', 'merchant' ),
74 'h4' => esc_html__( 'H4', 'merchant' ),
75 'h5' => esc_html__( 'H5', 'merchant' ),
76 'h6' => esc_html__( 'H6', 'merchant' ),
77 'div' => esc_html__( 'div', 'merchant' ),
78 ),
79 'default' => 'h2',
80 'condition' => array( 'display_on_cart_page', '==', '1' ),
81 ),
82 ),
83 ) );
84
85 // Add To Wishlist Button Settings
86 Merchant_Admin_Options::create( array(
87 'title' => esc_html__( 'Add To Wishlist Button Settings', 'merchant' ),
88 'module' => 'wishlist',
89 'fields' => array(
90
91 // Button icon.
92 array(
93 'id' => 'button_icon',
94 'type' => 'choices',
95 'title' => esc_html__( 'Select an icon', 'merchant' ),
96 'options' => array(
97 'heart1' => MERCHANT_URI . 'inc/modules/wishlist/admin/icons/heart1.svg',
98 'heart2' => MERCHANT_URI . 'inc/modules/wishlist/admin/icons/heart2.svg',
99 ),
100 'default' => 'heart1',
101 ),
102
103 // Button position top.
104 array(
105 'id' => 'button_position_top',
106 'type' => 'range',
107 'title' => esc_html__( 'Button vertical position', 'merchant' ),
108 'min' => 1,
109 'max' => 80,
110 'step' => 1,
111 'default' => 20,
112 'unit' => 'px',
113 ),
114
115 // Button position left.
116 array(
117 'id' => 'button_position_left',
118 'type' => 'range',
119 'title' => esc_html__( 'Button horizontal position', 'merchant' ),
120 'min' => 1,
121 'max' => 80,
122 'step' => 1,
123 'default' => 20,
124 'unit' => 'px',
125 ),
126
127 // Tooltip.
128 array(
129 'id' => 'tooltip',
130 'type' => 'switcher',
131 'title' => esc_html__( 'Display tooltip', 'merchant' ),
132 'default' => 1,
133 ),
134
135 // Tooltip text.
136 array(
137 'id' => 'tooltip_text',
138 'type' => 'text',
139 'title' => esc_html__( 'Tooltip text', 'merchant' ),
140 'default' => esc_html__( 'Add to wishlist', 'merchant' ),
141 'condition' => array( 'tooltip', '==', '1' ),
142 ),
143 array(
144 'id' => 'tooltip_text_after',
145 'type' => 'text',
146 'title' => esc_html__( 'Tooltip text after adding to wishlist', 'merchant' ),
147 'default' => esc_html__( 'Added to wishlist', 'merchant' ),
148 'condition' => array( 'tooltip', '==', '1' ),
149 ),
150
151 // Tooltip border radius.
152 array(
153 'id' => 'tooltip_border_radius',
154 'type' => 'range',
155 'title' => esc_html__( 'Tooltip border radius', 'merchant' ),
156 'min' => 0,
157 'max' => 35,
158 'step' => 1,
159 'default' => 4,
160 'unit' => 'px',
161 'condition' => array( 'tooltip', '==', '1' ),
162 ),
163
164 // Colors.
165
166 // Icon stroke color.
167 array(
168 'id' => 'icon_stroke_color',
169 'type' => 'color',
170 'title' => esc_html__( 'Icon stroke color', 'merchant' ),
171 'default' => '#212121',
172 ),
173
174 // Icon stroke color (hover).
175 array(
176 'id' => 'icon_stroke_color_hover',
177 'type' => 'color',
178 'title' => esc_html__( 'Icon stroke color (hover)', 'merchant' ),
179 'default' => '#212121',
180 ),
181
182 // Icon fill color.
183 array(
184 'id' => 'icon_fill_color',
185 'type' => 'color',
186 'title' => esc_html__( 'Icon fill color', 'merchant' ),
187 'default' => 'transparent',
188 ),
189
190 // Icon fill color (hover).
191 array(
192 'id' => 'icon_fill_color_hover',
193 'type' => 'color',
194 'title' => esc_html__( 'Icon fill color (hover)', 'merchant' ),
195 'default' => '#f04c4c',
196 ),
197
198 // Tooltip text color.
199 array(
200 'id' => 'tooltip_text_color',
201 'type' => 'color',
202 'title' => esc_html__( 'Tooltip text color', 'merchant' ),
203 'default' => '#FFF',
204 ),
205
206 // Tooltip background color.
207 array(
208 'id' => 'tooltip_background_color',
209 'type' => 'color',
210 'title' => esc_html__( 'Tooltip background color', 'merchant' ),
211 'default' => '#212121',
212 ),
213
214 ),
215 ) );
216
217 // Wishlist Page Settings
218 Merchant_Admin_Options::create( array(
219 'module' => 'wishlist',
220 'title' => esc_html__( 'Wishlist Page Settings', 'merchant' ),
221 'fields' => array(
222
223 // Create Wishlist Page.
224 array(
225 'id' => 'create_page',
226 'type' => 'create_page',
227 'title' => esc_html__( 'Wishlist page', 'merchant' ),
228 'page_title' => esc_html__( 'My Wishlist', 'merchant' ),
229 'page_meta_key' => '_wp_page_template',
230 'page_meta_value' => 'modules/wishlist/page-template-wishlist.php',
231 'option_name' => 'merchant_wishlist_page_id',
232 ),
233
234 // Hide page title.
235 array(
236 'id' => 'hide_page_title',
237 'type' => 'switcher',
238 'title' => esc_html__( 'Hide page title', 'merchant' ),
239 'default' => 0,
240 ),
241
242 // Table heading background color.
243 array(
244 'id' => 'table_heading_background_color',
245 'type' => 'color',
246 'title' => esc_html__( 'Table heading background color', 'merchant' ),
247 'default' => '#FFF',
248 ),
249
250 // Table body background color.
251 array(
252 'id' => 'table_body_background_color',
253 'type' => 'color',
254 'title' => esc_html__( 'Table body background color', 'merchant' ),
255 'default' => '#fdfdfd',
256 ),
257
258 // Table text color.
259 array(
260 'id' => 'table_text_color',
261 'type' => 'color',
262 'title' => esc_html__( 'Table text color', 'merchant' ),
263 'default' => '#777',
264 ),
265
266 // Table links color.
267 array(
268 'id' => 'table_links_color',
269 'type' => 'color',
270 'title' => esc_html__( 'Table links color', 'merchant' ),
271 'default' => '#212121',
272 ),
273
274 // Table links color (hover).
275 array(
276 'id' => 'table_links_color_hover',
277 'type' => 'color',
278 'title' => esc_html__( 'Table links color (hover)', 'merchant' ),
279 'default' => '#757575',
280 ),
281
282 // Buttons color.
283 array(
284 'id' => 'buttons_color',
285 'type' => 'color',
286 'title' => esc_html__( 'Buttons color', 'merchant' ),
287 'default' => '#FFF',
288 ),
289
290 // Buttons color (hover).
291 array(
292 'id' => 'buttons_color_hover',
293 'type' => 'color',
294 'title' => esc_html__( 'Buttons color (hover)', 'merchant' ),
295 'default' => '#FFF',
296 ),
297
298 // Buttons background color.
299 array(
300 'id' => 'buttons_background_color',
301 'type' => 'color',
302 'title' => esc_html__( 'Buttons background color', 'merchant' ),
303 'default' => '#212121',
304 ),
305
306 // Buttons color (hover).
307 array(
308 'id' => 'buttons_background_color_hover',
309 'type' => 'color',
310 'title' => esc_html__( 'Buttons background color (hover)', 'merchant' ),
311 'default' => '#757575',
312 ),
313
314 ),
315 ) );
316
317 // Wishlist Sharing Settings
318 Merchant_Admin_Options::create( array(
319 'module' => Merchant_Wishlist::MODULE_ID,
320 'title' => esc_html__( 'Wishlist Sharing Settings', 'merchant' ),
321 'fields' => array(
322
323 // Enable.
324 array(
325 'id' => 'enable_sharing',
326 'type' => 'switcher',
327 'title' => esc_html__( 'Enable', 'merchant' ),
328 'desc' => esc_html__( 'Allow users to share the wishlist.', 'merchant' ),
329 'default' => 1,
330 ),
331
332 // Sharing Links.
333 array(
334 'id' => 'sharing_links',
335 'type' => 'flexible_content',
336 'sorting' => true,
337 'title' => esc_html__( 'Social links', 'merchant' ),
338 'desc' => esc_html__( 'Add the available social links to share the wishlist.', 'merchant' ),
339 'button_label' => esc_html__( 'Add new', 'merchant' ),
340 'layouts' => array(
341 'social' => array(
342 'title' => esc_html__( 'Social link', 'merchant' ),
343 'fields' => array(
344 array(
345 'id' => 'social_network',
346 'title' => esc_html__( 'Social Network', 'merchant' ),
347 'type' => 'select',
348 'options' => array(
349 'facebook' => esc_html__( 'Facebook', 'merchant' ),
350 'twitter' => esc_html__( 'Twitter', 'merchant' ),
351 'linkedin' => esc_html__( 'Linkedin', 'merchant' ),
352 'pinterest' => esc_html__( 'Pinterest', 'merchant' ),
353 'whatsapp' => esc_html__( 'Whatsapp', 'merchant' ),
354 'telegram' => esc_html__( 'Telegram', 'merchant' ),
355 'vk' => esc_html__( 'VK', 'merchant' ),
356 'weibo' => esc_html__( 'Weibo', 'merchant' ),
357 'reddit' => esc_html__( 'Reddit', 'merchant' ),
358 'ok' => esc_html__( 'Ok', 'merchant' ),
359 'xing' => esc_html__( 'Xing', 'merchant' ),
360 'mail' => esc_html__( 'Mail', 'merchant' ),
361 ),
362 'default' => 'facebook',
363 ),
364 ),
365 ),
366 ),
367 'default' => array(
368 array(
369 'layout' => 'social',
370 'social_network' => 'facebook',
371 ),
372 array(
373 'layout' => 'social',
374 'social_network' => 'twitter',
375 ),
376 array(
377 'layout' => 'social',
378 'social_network' => 'linkedin',
379 ),
380 ),
381 ),
382
383 // Dislay Copy To Clipboard.
384 array(
385 'id' => 'display_copy_to_clipboard',
386 'type' => 'switcher',
387 'title' => esc_html__( 'Display copy to clipboard', 'merchant' ),
388 'desc' => esc_html__( 'Displays a copy to clipboard field after the social links.', 'merchant' ),
389 'default' => 1,
390 ),
391 ),
392 ) );
393
394 // Shortcode
395 $merchant_module_id = Merchant_Wishlist::MODULE_ID;
396 Merchant_Admin_Options::create( array(
397 'module' => $merchant_module_id,
398 'title' => esc_html__( 'Use shortcode', 'merchant' ),
399 'fields' => array(
400 array(
401 'id' => 'use_shortcode',
402 'type' => 'switcher',
403 'title' => esc_html__( 'Use shortcode', 'merchant' ),
404 'default' => 0,
405 ),
406 array(
407 'type' => 'info',
408 'id' => 'shortcode_info',
409 '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' ),
410 ),
411 array(
412 'id' => 'shortcode_text',
413 'type' => 'text_readonly',
414 'title' => esc_html__( 'Shortcode text', 'merchant' ),
415 'default' => '[merchant_module_' . str_replace( '-', '_', $merchant_module_id ) . ']',
416 'condition' => array( 'use_shortcode', '==', '1' ),
417 ),
418 ),
419 ) );
420