| 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 |
array( |
| 227 |
'id' => 'include_subcategories', |
| 228 |
'type' => 'switcher', |
| 229 |
'title' => esc_html__( 'Include subcategories', 'merchant' ), |
| 230 |
'desc' => esc_html__( 'When enabled, selecting a parent category also applies to all of its child categories.', 'merchant' ), |
| 231 |
'default' => 0, |
| 232 |
'conditions' => array( |
| 233 |
'relation' => 'OR', |
| 234 |
'terms' => array( |
| 235 |
array( |
| 236 |
'field' => 'inclusion', |
| 237 |
'operator' => '===', |
| 238 |
'value' => true, |
| 239 |
), |
| 240 |
array( |
| 241 |
'field' => 'exclusion', |
| 242 |
'operator' => '===', |
| 243 |
'value' => true, |
| 244 |
), |
| 245 |
), |
| 246 |
), |
| 247 |
'ai_meta' => array( |
| 248 |
'semantic_group' => 'product_targeting', |
| 249 |
'usage_hint' => 'Enable so selected parent categories also cover their child categories, for both the include list and the exclude list. Off by default, which matches only the exact categories chosen.', |
| 250 |
), |
| 251 |
), |
| 252 |
), |
| 253 |
), |
| 254 |
array( |
| 255 |
'title' => esc_html__( 'Add To Wishlist Button Settings', 'merchant' ), |
| 256 |
'module' => 'wishlist', |
| 257 |
'fields' => array( |
| 258 |
|
| 259 |
// Button icon. |
| 260 |
array( |
| 261 |
'id' => 'button_icon', |
| 262 |
'type' => 'choices', |
| 263 |
'title' => esc_html__( 'Select an icon', 'merchant' ), |
| 264 |
'options' => array( |
| 265 |
'heart1' => MERCHANT_URI . 'inc/modules/wishlist/admin/icons/heart1.svg', |
| 266 |
'heart2' => MERCHANT_URI . 'inc/modules/wishlist/admin/icons/heart2.svg', |
| 267 |
), |
| 268 |
'default' => 'heart1', |
| 269 |
), |
| 270 |
|
| 271 |
// Button position top. |
| 272 |
array( |
| 273 |
'id' => 'button_position_top', |
| 274 |
'type' => 'range', |
| 275 |
'title' => esc_html__( 'Button vertical position', 'merchant' ), |
| 276 |
'min' => 1, |
| 277 |
'max' => 80, |
| 278 |
'step' => 1, |
| 279 |
'default' => 20, |
| 280 |
'unit' => 'px', |
| 281 |
), |
| 282 |
|
| 283 |
// Button position left. |
| 284 |
array( |
| 285 |
'id' => 'button_position_left', |
| 286 |
'type' => 'range', |
| 287 |
'title' => esc_html__( 'Button horizontal position', 'merchant' ), |
| 288 |
'min' => 1, |
| 289 |
'max' => 80, |
| 290 |
'step' => 1, |
| 291 |
'default' => 20, |
| 292 |
'unit' => 'px', |
| 293 |
), |
| 294 |
|
| 295 |
// Tooltip. |
| 296 |
array( |
| 297 |
'id' => 'tooltip', |
| 298 |
'type' => 'switcher', |
| 299 |
'title' => esc_html__( 'Display tooltip', 'merchant' ), |
| 300 |
'default' => 1, |
| 301 |
), |
| 302 |
|
| 303 |
// Tooltip text. |
| 304 |
array( |
| 305 |
'id' => 'tooltip_text', |
| 306 |
'type' => 'text', |
| 307 |
'title' => esc_html__( 'Tooltip text', 'merchant' ), |
| 308 |
'default' => esc_html__( 'Add to wishlist', 'merchant' ), |
| 309 |
'condition' => array( 'tooltip', '==', '1' ), |
| 310 |
), |
| 311 |
array( |
| 312 |
'id' => 'tooltip_text_after', |
| 313 |
'type' => 'text', |
| 314 |
'title' => esc_html__( 'Tooltip text after adding to wishlist', 'merchant' ), |
| 315 |
'default' => esc_html__( 'Added to wishlist', 'merchant' ), |
| 316 |
'condition' => array( 'tooltip', '==', '1' ), |
| 317 |
), |
| 318 |
|
| 319 |
// Tooltip border radius. |
| 320 |
array( |
| 321 |
'id' => 'tooltip_border_radius', |
| 322 |
'type' => 'range', |
| 323 |
'title' => esc_html__( 'Tooltip border radius', 'merchant' ), |
| 324 |
'min' => 0, |
| 325 |
'max' => 35, |
| 326 |
'step' => 1, |
| 327 |
'default' => 4, |
| 328 |
'unit' => 'px', |
| 329 |
'condition' => array( 'tooltip', '==', '1' ), |
| 330 |
), |
| 331 |
|
| 332 |
// Colors. |
| 333 |
|
| 334 |
// Icon stroke color. |
| 335 |
array( |
| 336 |
'id' => 'icon_stroke_color', |
| 337 |
'type' => 'color', |
| 338 |
'title' => esc_html__( 'Icon stroke color', 'merchant' ), |
| 339 |
'default' => '#212121', |
| 340 |
), |
| 341 |
|
| 342 |
// Icon stroke color (hover). |
| 343 |
array( |
| 344 |
'id' => 'icon_stroke_color_hover', |
| 345 |
'type' => 'color', |
| 346 |
'title' => esc_html__( 'Icon stroke color (hover)', 'merchant' ), |
| 347 |
'default' => '#212121', |
| 348 |
), |
| 349 |
|
| 350 |
// Icon fill color. |
| 351 |
array( |
| 352 |
'id' => 'icon_fill_color', |
| 353 |
'type' => 'color', |
| 354 |
'title' => esc_html__( 'Icon fill color', 'merchant' ), |
| 355 |
'default' => 'transparent', |
| 356 |
), |
| 357 |
|
| 358 |
// Icon fill color (hover). |
| 359 |
array( |
| 360 |
'id' => 'icon_fill_color_hover', |
| 361 |
'type' => 'color', |
| 362 |
'title' => esc_html__( 'Icon fill color (hover)', 'merchant' ), |
| 363 |
'default' => '#f04c4c', |
| 364 |
), |
| 365 |
|
| 366 |
// Tooltip text color. |
| 367 |
array( |
| 368 |
'id' => 'tooltip_text_color', |
| 369 |
'type' => 'color', |
| 370 |
'title' => esc_html__( 'Tooltip text color', 'merchant' ), |
| 371 |
'default' => '#FFF', |
| 372 |
), |
| 373 |
|
| 374 |
// Tooltip background color. |
| 375 |
array( |
| 376 |
'id' => 'tooltip_background_color', |
| 377 |
'type' => 'color', |
| 378 |
'title' => esc_html__( 'Tooltip background color', 'merchant' ), |
| 379 |
'default' => '#212121', |
| 380 |
), |
| 381 |
|
| 382 |
), |
| 383 |
), |
| 384 |
array( |
| 385 |
'module' => 'wishlist', |
| 386 |
'title' => esc_html__( 'Wishlist Page Settings', 'merchant' ), |
| 387 |
'fields' => array( |
| 388 |
|
| 389 |
// Create Wishlist Page. |
| 390 |
array( |
| 391 |
'id' => 'create_page', |
| 392 |
'type' => 'create_page', |
| 393 |
'title' => esc_html__( 'Wishlist page', 'merchant' ), |
| 394 |
'page_title' => esc_html__( 'My Wishlist', 'merchant' ), |
| 395 |
'page_meta_key' => '_wp_page_template', |
| 396 |
'page_meta_value' => 'modules/wishlist/page-template-wishlist.php', |
| 397 |
'option_name' => 'merchant_wishlist_page_id', |
| 398 |
), |
| 399 |
|
| 400 |
// Hide page title. |
| 401 |
array( |
| 402 |
'id' => 'hide_page_title', |
| 403 |
'type' => 'switcher', |
| 404 |
'title' => esc_html__( 'Hide page title', 'merchant' ), |
| 405 |
'default' => 0, |
| 406 |
), |
| 407 |
|
| 408 |
// Table heading background color. |
| 409 |
array( |
| 410 |
'id' => 'table_heading_background_color', |
| 411 |
'type' => 'color', |
| 412 |
'title' => esc_html__( 'Table heading background color', 'merchant' ), |
| 413 |
'default' => '#FFF', |
| 414 |
), |
| 415 |
|
| 416 |
// Table body background color. |
| 417 |
array( |
| 418 |
'id' => 'table_body_background_color', |
| 419 |
'type' => 'color', |
| 420 |
'title' => esc_html__( 'Table body background color', 'merchant' ), |
| 421 |
'default' => '#fdfdfd', |
| 422 |
), |
| 423 |
|
| 424 |
// Table text color. |
| 425 |
array( |
| 426 |
'id' => 'table_text_color', |
| 427 |
'type' => 'color', |
| 428 |
'title' => esc_html__( 'Table text color', 'merchant' ), |
| 429 |
'default' => '#777', |
| 430 |
), |
| 431 |
|
| 432 |
// Table links color. |
| 433 |
array( |
| 434 |
'id' => 'table_links_color', |
| 435 |
'type' => 'color', |
| 436 |
'title' => esc_html__( 'Table links color', 'merchant' ), |
| 437 |
'default' => '#212121', |
| 438 |
), |
| 439 |
|
| 440 |
// Table links color (hover). |
| 441 |
array( |
| 442 |
'id' => 'table_links_color_hover', |
| 443 |
'type' => 'color', |
| 444 |
'title' => esc_html__( 'Table links color (hover)', 'merchant' ), |
| 445 |
'default' => '#757575', |
| 446 |
), |
| 447 |
|
| 448 |
// Buttons color. |
| 449 |
array( |
| 450 |
'id' => 'buttons_color', |
| 451 |
'type' => 'color', |
| 452 |
'title' => esc_html__( 'Buttons color', 'merchant' ), |
| 453 |
'default' => '#FFF', |
| 454 |
), |
| 455 |
|
| 456 |
// Buttons color (hover). |
| 457 |
array( |
| 458 |
'id' => 'buttons_color_hover', |
| 459 |
'type' => 'color', |
| 460 |
'title' => esc_html__( 'Buttons color (hover)', 'merchant' ), |
| 461 |
'default' => '#FFF', |
| 462 |
), |
| 463 |
|
| 464 |
// Buttons background color. |
| 465 |
array( |
| 466 |
'id' => 'buttons_background_color', |
| 467 |
'type' => 'color', |
| 468 |
'title' => esc_html__( 'Buttons background color', 'merchant' ), |
| 469 |
'default' => '#212121', |
| 470 |
), |
| 471 |
|
| 472 |
// Buttons color (hover). |
| 473 |
array( |
| 474 |
'id' => 'buttons_background_color_hover', |
| 475 |
'type' => 'color', |
| 476 |
'title' => esc_html__( 'Buttons background color (hover)', 'merchant' ), |
| 477 |
'default' => '#757575', |
| 478 |
), |
| 479 |
|
| 480 |
), |
| 481 |
), |
| 482 |
array( |
| 483 |
'module' => Merchant_Wishlist::MODULE_ID, |
| 484 |
'title' => esc_html__( 'Wishlist Sharing Settings', 'merchant' ), |
| 485 |
'fields' => array( |
| 486 |
|
| 487 |
// Enable. |
| 488 |
array( |
| 489 |
'id' => 'enable_sharing', |
| 490 |
'type' => 'switcher', |
| 491 |
'title' => esc_html__( 'Enable', 'merchant' ), |
| 492 |
'desc' => esc_html__( 'Allow users to share the wishlist.', 'merchant' ), |
| 493 |
'default' => 1, |
| 494 |
), |
| 495 |
|
| 496 |
// Sharing Links. |
| 497 |
array( |
| 498 |
'id' => 'sharing_links', |
| 499 |
'type' => 'flexible_content', |
| 500 |
'sorting' => true, |
| 501 |
'title' => esc_html__( 'Social links', 'merchant' ), |
| 502 |
'desc' => esc_html__( 'Add the available social links to share the wishlist.', 'merchant' ), |
| 503 |
'button_label' => esc_html__( 'Add new', 'merchant' ), |
| 504 |
'layouts' => array( |
| 505 |
'social' => array( |
| 506 |
'title' => esc_html__( 'Social link', 'merchant' ), |
| 507 |
'fields' => array( |
| 508 |
array( |
| 509 |
'id' => 'social_network', |
| 510 |
'title' => esc_html__( 'Social Network', 'merchant' ), |
| 511 |
'type' => 'select', |
| 512 |
'options' => array( |
| 513 |
'facebook' => esc_html__( 'Facebook', 'merchant' ), |
| 514 |
'twitter' => esc_html__( 'Twitter', 'merchant' ), |
| 515 |
'linkedin' => esc_html__( 'Linkedin', 'merchant' ), |
| 516 |
'pinterest' => esc_html__( 'Pinterest', 'merchant' ), |
| 517 |
'whatsapp' => esc_html__( 'Whatsapp', 'merchant' ), |
| 518 |
'telegram' => esc_html__( 'Telegram', 'merchant' ), |
| 519 |
'vk' => esc_html__( 'VK', 'merchant' ), |
| 520 |
'weibo' => esc_html__( 'Weibo', 'merchant' ), |
| 521 |
'reddit' => esc_html__( 'Reddit', 'merchant' ), |
| 522 |
'ok' => esc_html__( 'Ok', 'merchant' ), |
| 523 |
'xing' => esc_html__( 'Xing', 'merchant' ), |
| 524 |
'mail' => esc_html__( 'Mail', 'merchant' ), |
| 525 |
), |
| 526 |
'default' => 'facebook', |
| 527 |
), |
| 528 |
), |
| 529 |
), |
| 530 |
), |
| 531 |
'default' => array( |
| 532 |
array( |
| 533 |
'layout' => 'social', |
| 534 |
'social_network' => 'facebook', |
| 535 |
), |
| 536 |
array( |
| 537 |
'layout' => 'social', |
| 538 |
'social_network' => 'twitter', |
| 539 |
), |
| 540 |
array( |
| 541 |
'layout' => 'social', |
| 542 |
'social_network' => 'linkedin', |
| 543 |
), |
| 544 |
), |
| 545 |
), |
| 546 |
|
| 547 |
// Dislay Copy To Clipboard. |
| 548 |
array( |
| 549 |
'id' => 'display_copy_to_clipboard', |
| 550 |
'type' => 'switcher', |
| 551 |
'title' => esc_html__( 'Display copy to clipboard', 'merchant' ), |
| 552 |
'desc' => esc_html__( 'Displays a copy to clipboard field after the social links.', 'merchant' ), |
| 553 |
'default' => 1, |
| 554 |
), |
| 555 |
), |
| 556 |
), |
| 557 |
array( |
| 558 |
'module' => Merchant_Wishlist::MODULE_ID, |
| 559 |
'title' => esc_html__( 'Use shortcode', 'merchant' ), |
| 560 |
'fields' => array( |
| 561 |
array( |
| 562 |
'id' => 'use_shortcode', |
| 563 |
'type' => 'switcher', |
| 564 |
'title' => esc_html__( 'Use shortcode', 'merchant' ), |
| 565 |
'default' => 0, |
| 566 |
), |
| 567 |
array( |
| 568 |
'type' => 'info', |
| 569 |
'id' => 'shortcode_info', |
| 570 |
'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' ), |
| 571 |
), |
| 572 |
array( |
| 573 |
'id' => 'shortcode_text', |
| 574 |
'type' => 'text_readonly', |
| 575 |
'title' => esc_html__( 'Shortcode text', 'merchant' ), |
| 576 |
'default' => '[merchant_module_' . str_replace( '-', '_', Merchant_Wishlist::MODULE_ID ) . ']', |
| 577 |
'condition' => array( 'use_shortcode', '==', '1' ), |
| 578 |
), |
| 579 |
), |
| 580 |
), |
| 581 |
); |
| 582 |
|