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

375 lines 10.2 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' => __( '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' => __( 'Display on shop archive', 'merchant' ),
24 'desc' => __( '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' => __( 'Display on single product', 'merchant' ),
33 'desc' => __( 'Display the wishlist button in the single product pages.', 'merchant' ),
34 'default' => 1,
35 ),
36
37 ),
38 ) );
39
40 // Add To Wishlist Button Settings
41 Merchant_Admin_Options::create( array(
42 'title' => __( 'Add To Wishlist Button Settings', 'merchant' ),
43 'module' => 'wishlist',
44 'fields' => array(
45
46 // Button icon.
47 array(
48 'id' => 'button_icon',
49 'type' => 'choices',
50 'title' => __( 'Select an icon', 'merchant' ),
51 'options' => array(
52 'heart1' => MERCHANT_URI . 'inc/modules/wishlist/admin/icons/heart1.svg',
53 'heart2' => MERCHANT_URI . 'inc/modules/wishlist/admin/icons/heart2.svg',
54 ),
55 'default' => 'heart1',
56 ),
57
58 // Button position top.
59 array(
60 'id' => 'button_position_top',
61 'type' => 'range',
62 'title' => __( 'Button vertical position', 'merchant' ),
63 'min' => 1,
64 'max' => 80,
65 'step' => 1,
66 'default' => 20,
67 'unit' => 'px',
68 ),
69
70 // Button position left.
71 array(
72 'id' => 'button_position_left',
73 'type' => 'range',
74 'title' => __( 'Button horizontal position', 'merchant' ),
75 'min' => 1,
76 'max' => 80,
77 'step' => 1,
78 'default' => 20,
79 'unit' => 'px',
80 ),
81
82 // Tooltip.
83 array(
84 'id' => 'tooltip',
85 'type' => 'switcher',
86 'title' => __( 'Display tooltip', 'merchant' ),
87 'default' => 1,
88 ),
89
90 // Tooltip text.
91 array(
92 'id' => 'tooltip_text',
93 'type' => 'text',
94 'title' => __( 'Tooltip text', 'merchant' ),
95 'default' => __( 'Add to wishlist', 'merchant' ),
96 'condition' => array( 'tooltip', '==', '1' ),
97 ),
98 array(
99 'id' => 'tooltip_text_after',
100 'type' => 'text',
101 'title' => __( 'Tooltip text after adding to wishlist', 'merchant' ),
102 'default' => __( 'Added to wishlist', 'merchant' ),
103 'condition' => array( 'tooltip', '==', '1' ),
104 ),
105
106 // Tooltip border radius.
107 array(
108 'id' => 'tooltip_border_radius',
109 'type' => 'range',
110 'title' => __( 'Tooltip border radius', 'merchant' ),
111 'min' => 0,
112 'max' => 35,
113 'step' => 1,
114 'default' => 4,
115 'unit' => 'px',
116 'condition' => array( 'tooltip', '==', '1' ),
117 ),
118
119 // Colors.
120
121 // Icon stroke color.
122 array(
123 'id' => 'icon_stroke_color',
124 'type' => 'color',
125 'title' => __( 'Icon stroke color', 'merchant' ),
126 'default' => '#212121',
127 ),
128
129 // Icon stroke color (hover).
130 array(
131 'id' => 'icon_stroke_color_hover',
132 'type' => 'color',
133 'title' => __( 'Icon stroke color (hover)', 'merchant' ),
134 'default' => '#212121',
135 ),
136
137 // Icon fill color.
138 array(
139 'id' => 'icon_fill_color',
140 'type' => 'color',
141 'title' => __( 'Icon fill color', 'merchant' ),
142 'default' => 'transparent',
143 ),
144
145 // Icon fill color (hover).
146 array(
147 'id' => 'icon_fill_color_hover',
148 'type' => 'color',
149 'title' => __( 'Icon fill color (hover)', 'merchant' ),
150 'default' => '#f04c4c',
151 ),
152
153 // Tooltip text color.
154 array(
155 'id' => 'tooltip_text_color',
156 'type' => 'color',
157 'title' => __( 'Tooltip text color', 'merchant' ),
158 'default' => '#FFF',
159 ),
160
161 // Tooltip background color.
162 array(
163 'id' => 'tooltip_background_color',
164 'type' => 'color',
165 'title' => __( 'Tooltip background color', 'merchant' ),
166 'default' => '#212121',
167 ),
168
169 ),
170 ) );
171
172 // Wishlist Page Settings
173 Merchant_Admin_Options::create( array(
174 'module' => 'wishlist',
175 'title' => __( 'Wishlist Page Settings', 'merchant' ),
176 'fields' => array(
177
178 // Create Wishlist Page.
179 array(
180 'id' => 'create_page',
181 'type' => 'create_page',
182 'title' => __( 'Wishlist page', 'merchant' ),
183 'page_title' => __( 'My Wishlist', 'merchant' ),
184 'page_meta_key' => '_wp_page_template',
185 'page_meta_value' => 'modules/wishlist/page-template-wishlist.php',
186 'option_name' => 'merchant_wishlist_page_id',
187 ),
188
189 // Hide page title.
190 array(
191 'id' => 'hide_page_title',
192 'type' => 'switcher',
193 'title' => __( 'Hide page title', 'merchant' ),
194 'default' => 0,
195 ),
196
197 // Table heading background color.
198 array(
199 'id' => 'table_heading_background_color',
200 'type' => 'color',
201 'title' => __( 'Table heading background color', 'merchant' ),
202 'default' => '#FFF',
203 ),
204
205 // Table body background color.
206 array(
207 'id' => 'table_body_background_color',
208 'type' => 'color',
209 'title' => __( 'Table body background color', 'merchant' ),
210 'default' => '#fdfdfd',
211 ),
212
213 // Table text color.
214 array(
215 'id' => 'table_text_color',
216 'type' => 'color',
217 'title' => __( 'Table text color', 'merchant' ),
218 'default' => '#777',
219 ),
220
221 // Table links color.
222 array(
223 'id' => 'table_links_color',
224 'type' => 'color',
225 'title' => __( 'Table links color', 'merchant' ),
226 'default' => '#212121',
227 ),
228
229 // Table links color (hover).
230 array(
231 'id' => 'table_links_color_hover',
232 'type' => 'color',
233 'title' => __( 'Table links color (hover)', 'merchant' ),
234 'default' => '#757575',
235 ),
236
237 // Buttons color.
238 array(
239 'id' => 'buttons_color',
240 'type' => 'color',
241 'title' => __( 'Buttons color', 'merchant' ),
242 'default' => '#FFF',
243 ),
244
245 // Buttons color (hover).
246 array(
247 'id' => 'buttons_color_hover',
248 'type' => 'color',
249 'title' => __( 'Buttons color (hover)', 'merchant' ),
250 'default' => '#FFF',
251 ),
252
253 // Buttons background color.
254 array(
255 'id' => 'buttons_background_color',
256 'type' => 'color',
257 'title' => __( 'Buttons background color', 'merchant' ),
258 'default' => '#212121',
259 ),
260
261 // Buttons color (hover).
262 array(
263 'id' => 'buttons_background_color_hover',
264 'type' => 'color',
265 'title' => __( 'Buttons background color (hover)', 'merchant' ),
266 'default' => '#757575',
267 ),
268
269 ),
270 ) );
271
272 // Wishlist Sharing Settings
273 Merchant_Admin_Options::create( array(
274 'module' => Merchant_Wishlist::MODULE_ID,
275 'title' => esc_html__( 'Wishlist Sharing Settings', 'merchant' ),
276 'fields' => array(
277
278 // Enable.
279 array(
280 'id' => 'enable_sharing',
281 'type' => 'switcher',
282 'title' => __( 'Enable', 'merchant' ),
283 'desc' => __( 'Allow users to share the wishlist.', 'merchant' ),
284 'default' => 1,
285 ),
286
287 // Sharing Links.
288 array(
289 'id' => 'sharing_links',
290 'type' => 'flexible_content',
291 'sorting' => true,
292 'title' => __( 'Social links', 'merchant' ),
293 'desc' => esc_html__( 'Add the available social links to share the wishlist.', 'merchant' ),
294 'button_label' => esc_html__( 'Add new', 'merchant' ),
295 'layouts' => array(
296 'social' => array(
297 'title' => esc_html__( 'Social link', 'merchant' ),
298 'fields' => array(
299 array(
300 'id' => 'social_network',
301 'title' => esc_html__( 'Social Network', 'merchant' ),
302 'type' => 'select',
303 'options' => array(
304 'facebook' => esc_html__( 'Facebook', 'merchant' ),
305 'twitter' => esc_html__( 'Twitter', 'merchant' ),
306 'linkedin' => esc_html__( 'Linkedin', 'merchant' ),
307 'pinterest' => esc_html__( 'Pinterest', 'merchant' ),
308 'whatsapp' => esc_html__( 'Whatsapp', 'merchant' ),
309 'telegram' => esc_html__( 'Telegram', 'merchant' ),
310 'vk' => esc_html__( 'VK', 'merchant' ),
311 'weibo' => esc_html__( 'Weibo', 'merchant' ),
312 'reddit' => esc_html__( 'Reddit', 'merchant' ),
313 'ok' => esc_html__( 'Ok', 'merchant' ),
314 'xing' => esc_html__( 'Xing', 'merchant' ),
315 'mail' => esc_html__( 'Mail', 'merchant' ),
316 ),
317 'default' => 'facebook',
318 ),
319 ),
320 ),
321 ),
322 'default' => array(
323 array(
324 'layout' => 'social',
325 'social_network' => 'facebook',
326 ),
327 array(
328 'layout' => 'social',
329 'social_network' => 'twitter',
330 ),
331 array(
332 'layout' => 'social',
333 'social_network' => 'linkedin',
334 ),
335 ),
336 ),
337
338 // Dislay Copy To Clipboard.
339 array(
340 'id' => 'display_copy_to_clipboard',
341 'type' => 'switcher',
342 'title' => __( 'Display copy to clipboard', 'merchant' ),
343 'desc' => __( 'Displays a copy to clipboard field after the social links.', 'merchant' ),
344 'default' => 1,
345 ),
346 ),
347 ) );
348
349 // Shortcode
350 $merchant_module_id = Merchant_Wishlist::MODULE_ID;
351 Merchant_Admin_Options::create( array(
352 'module' => $merchant_module_id,
353 'title' => esc_html__( 'Use shortcode', 'merchant' ),
354 'fields' => array(
355 array(
356 'id' => 'use_shortcode',
357 'type' => 'switcher',
358 'title' => __( 'Use shortcode', 'merchant' ),
359 'default' => 0,
360 ),
361 array(
362 'type' => 'info',
363 'id' => 'shortcode_info',
364 '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' ),
365 ),
366 array(
367 'id' => 'shortcode_text',
368 'type' => 'text_readonly',
369 'title' => esc_html__( 'Shortcode text', 'merchant' ),
370 'default' => '[merchant_module_' . str_replace( '-', '_', $merchant_module_id ) . ']',
371 'condition' => array( 'use_shortcode', '==', '1' ),
372 ),
373 ),
374 ) );
375