PluginProbe
Product Labels, Quick View, Buy Now, Pre-Orders, Frequently Bought Together & More for WooCommerce – Merchant / 2.2.7
Product Labels, Quick View, Buy Now, Pre-Orders, Frequently Bought Together & More for WooCommerce – Merchant v2.2.7
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-video / admin / options.php

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

74 lines 2.1 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 /**
4 * Product Video 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-video',
17 'fields' => array(
18
19 // Autoplay.
20 array(
21 'id' => 'autoplay',
22 'type' => 'switcher',
23 'title' => esc_html__( 'Autoplay', 'merchant' ),
24 'desc' => esc_html__( 'Autoplay may cause usability issues for some users.', 'merchant' ),
25 'default' => false,
26 ),
27
28 // Aspect ratio.
29 array(
30 'id' => 'aspect_ratio',
31 'type' => 'select',
32 'title' => esc_html__( 'Aspect ratio', 'merchant' ),
33 'desc' => esc_html__( 'The aspect ratio definition is the proportional relationship between the width and height of a video.', 'merchant' ),
34 'options' => array(
35 '16-9' => '16:9',
36 '9-16' => '9:16',
37 '4-3' => '4:3',
38 '3-2' => '3:2',
39 '1-1' => '1:1',
40 'auto' => 'auto',
41 ),
42 'default' => '16-9',
43 ),
44
45 ),
46 ) );
47
48 // Shortcode
49 $merchant_module_id = Merchant_Product_Video::MODULE_ID;
50 Merchant_Admin_Options::create( array(
51 'module' => $merchant_module_id,
52 'title' => esc_html__( 'Use shortcode', 'merchant' ),
53 'fields' => array(
54 array(
55 'id' => 'use_shortcode',
56 'type' => 'switcher',
57 'title' => __( 'Use shortcode', 'merchant' ),
58 'default' => 0,
59 ),
60 array(
61 'type' => 'info',
62 'id' => 'shortcode_info',
63 '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' ),
64 ),
65 array(
66 'id' => 'shortcode_text',
67 'type' => 'text_readonly',
68 'title' => esc_html__( 'Shortcode text', 'merchant' ),
69 'default' => '[merchant_module_' . str_replace( '-', '_', $merchant_module_id ) . ']',
70 'condition' => array( 'use_shortcode', '==', '1' ),
71 ),
72 ),
73 ) );
74