PluginProbe
Product Labels, Quick View, Buy Now, Pre-Orders, Frequently Bought Together & More for WooCommerce – Merchant / 1.10.3
Product Labels, Quick View, Buy Now, Pre-Orders, Frequently Bought Together & More for WooCommerce – Merchant v1.10.3
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 / product-audio / admin / options.php

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

56 lines 1.6 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 /**
4 * Product Audio Options.
5 *
6 * @package Merchant
7 */
8
9 if ( ! defined( 'ABSPATH' ) ) {
10 exit; // Exit if accessed directly
11 }
12
13 // Settings
14 Merchant_Admin_Options::create( array(
15 'title' => esc_html__( 'Settings', 'merchant' ),
16 'module' => 'product-audio',
17 'fields' => array(
18
19 array(
20 'id' => 'autoplay',
21 'type' => 'switcher',
22 'title' => esc_html__( 'Autoplay', 'merchant' ),
23 'desc' => esc_html__( 'Autoplay may cause usability issues for some users.', 'merchant' ),
24 'default' => false,
25 ),
26
27 ),
28 ) );
29
30 // Shortcode
31 $merchant_module_id = Merchant_Product_Audio::MODULE_ID;
32 Merchant_Admin_Options::create( array(
33 'module' => $merchant_module_id,
34 'title' => esc_html__( 'Use shortcode', 'merchant' ),
35 'fields' => array(
36 array(
37 'id' => 'use_shortcode',
38 'type' => 'switcher',
39 'title' => __( 'Use shortcode', 'merchant' ),
40 'default' => 0,
41 ),
42 array(
43 'type' => 'info',
44 'id' => 'shortcode_info',
45 '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' ),
46 ),
47 array(
48 'id' => 'shortcode_text',
49 'type' => 'text_readonly',
50 'title' => esc_html__( 'Shortcode text', 'merchant' ),
51 'default' => '[merchant_module_' . str_replace( '-', '_', $merchant_module_id ) . ']',
52 'condition' => array( 'use_shortcode', '==', '1' ),
53 ),
54 ),
55 ) );
56