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

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

153 lines 3.7 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Trust Badges
4 *
5 * @package Merchant
6 */
7
8 if ( ! defined( 'ABSPATH' ) ) {
9 exit; // Exit if accessed directly
10 }
11
12 /**
13 * Trust Trust
14 */
15 Merchant_Admin_Options::create( array(
16 'title' => esc_html__( 'Trust Badges', 'merchant' ),
17 'module' => Merchant_Trust_Badges::MODULE_ID,
18 'fields' => array(
19
20 array(
21 'id' => 'badges',
22 'type' => 'gallery',
23 'label' => esc_html__( 'Select badges', 'merchant' ),
24 ),
25
26 ),
27 ) );
28
29 /**
30 * Settings
31 */
32 Merchant_Admin_Options::create( array(
33 'title' => esc_html__( 'Settings', 'merchant' ),
34 'module' => Merchant_Trust_Badges::MODULE_ID,
35 'fields' => array(
36
37 array(
38 'id' => 'align',
39 'type' => 'select',
40 'title' => esc_html__( 'Align logos', 'merchant' ),
41 'options' => array(
42 'flex-start' => esc_html__( 'Left', 'merchant' ),
43 'center' => esc_html__( 'Center', 'merchant' ),
44 'flex-end' => esc_html__( 'Right', 'merchant' ),
45 ),
46 'default' => 'center',
47 ),
48
49 array(
50 'id' => 'title',
51 'type' => 'text',
52 'title' => esc_html__( 'Text above the logos', 'merchant' ),
53 'default' => esc_html__( 'Product Quality Guaranteed!', 'merchant' ),
54 ),
55
56 array(
57 'id' => 'font-size',
58 'type' => 'range',
59 'title' => esc_html__( 'Font size', 'merchant' ),
60 'min' => 1,
61 'max' => 250,
62 'step' => 1,
63 'default' => 15,
64 'unit' => 'px',
65 ),
66
67 array(
68 'id' => 'text-color',
69 'type' => 'color',
70 'title' => esc_html__( 'Text color', 'merchant' ),
71 'default' => '#212121',
72 ),
73
74 array(
75 'id' => 'border-color',
76 'type' => 'color',
77 'title' => esc_html__( 'Border color', 'merchant' ),
78 'default' => '#e5e5e5',
79 ),
80
81 array(
82 'id' => 'margin-top',
83 'type' => 'range',
84 'title' => esc_html__( 'Margin top', 'merchant' ),
85 'min' => 1,
86 'max' => 250,
87 'step' => 1,
88 'default' => 20,
89 'unit' => 'px',
90 ),
91
92 array(
93 'id' => 'margin-bottom',
94 'type' => 'range',
95 'title' => esc_html__( 'Margin bottom', 'merchant' ),
96 'min' => 1,
97 'max' => 250,
98 'step' => 1,
99 'default' => 20,
100 'unit' => 'px',
101 ),
102
103 array(
104 'id' => 'image-max-width',
105 'type' => 'range',
106 'title' => esc_html__( 'Image max width', 'merchant' ),
107 'min' => 1,
108 'max' => 250,
109 'step' => 1,
110 'default' => 70,
111 'unit' => 'px',
112 ),
113
114 array(
115 'id' => 'image-max-height',
116 'type' => 'range',
117 'title' => esc_html__( 'Image max height', 'merchant' ),
118 'min' => 1,
119 'max' => 250,
120 'step' => 1,
121 'default' => 70,
122 'unit' => 'px',
123 ),
124
125 ),
126 ) );
127
128 // Shortcode
129 $merchant_module_id = Merchant_Trust_Badges::MODULE_ID;
130 Merchant_Admin_Options::create( array(
131 'module' => $merchant_module_id,
132 'title' => esc_html__( 'Use shortcode', 'merchant' ),
133 'fields' => array(
134 array(
135 'id' => 'use_shortcode',
136 'type' => 'switcher',
137 'title' => __( 'Use shortcode', 'merchant' ),
138 'default' => 0,
139 ),
140 array(
141 'type' => 'info',
142 'id' => 'shortcode_info',
143 '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' ),
144 ),
145 array(
146 'id' => 'shortcode_text',
147 'type' => 'text_readonly',
148 'title' => esc_html__( 'Shortcode text', 'merchant' ),
149 'default' => '[merchant_module_' . str_replace( '-', '_', $merchant_module_id ) . ']',
150 'condition' => array( 'use_shortcode', '==', '1' ),
151 ),
152 ),
153 ) );