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

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

246 lines 7.3 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 /**
4 * Size Chart Options.
5 *
6 * @package Merchant
7 */
8
9 if ( ! defined( 'ABSPATH' ) ) {
10 exit; // Exit if accessed directly
11 }
12
13 // Settings
14
15 return array(
16 array(
17 'title' => esc_html__( 'Settings', 'merchant' ),
18 'module' => Merchant_Size_Chart::MODULE_ID,
19 'fields' => array(
20
21 array(
22 'id' => 'global_size_chart',
23 'type' => 'select_size_chart',
24 'title' => esc_html__( 'Global size chart (optional)', 'merchant' ),
25 /* Translators: 1. Link open tag 2. Link close tag */
26 'desc' => sprintf( esc_html__( 'Your size charts will appear in this option as you create them. %1$sClick here%2$s to create or modify the available size charts.', 'merchant' ), '<a href="'. esc_url( admin_url( 'edit.php?post_type=merchant_size_chart' ) ) .'">', '</a>' ),
27 'ai_meta' => array(
28 'usage_hint' => 'Selects the fallback size chart shown on all products. Overridden by per-product size chart assignments. Leave empty to show no global chart.',
29 ),
30 ),
31
32 array(
33 'id' => 'global_size_chart_categories',
34 'type' => 'select_ajax',
35 'title' => esc_html__( 'Categories', 'merchant' ),
36 'source' => 'options',
37 'multiple' => true,
38 'options' => Merchant_Admin_Options::get_category_select2_choices(),
39 'placeholder' => esc_html__( 'Select categories', 'merchant' ),
40 'desc' => esc_html__( 'The global size chart will appear only on products within the selected categories. If no categories are selected, the size chart will be displayed on all products.', 'merchant' ),
41 'ai_meta' => array(
42 'entity' => 'category',
43 'reference_type' => 'dynamic',
44 'taxonomy' => 'product_cat',
45 'value_format' => 'slug',
46 'abstraction_level' => 3,
47 'usage_hint' => 'Limits the global size chart to products in these categories. Dynamic: future products added to the category are included. Leave empty to apply to all products.',
48 ),
49 ),
50
51 array(
52 'id' => 'text',
53 'type' => 'text',
54 'title' => esc_html__( 'Label text', 'merchant' ),
55 'default' => esc_html__( 'Size Chart', 'merchant' ),
56 ),
57
58 array(
59 'id' => 'icon',
60 'type' => 'choices',
61 'title' => esc_html__( 'Icon', 'merchant' ),
62 'options' => array(
63 'icon-size-chart' => MERCHANT_URI . 'assets/images/icons/size-chart/admin/icon-size-chart.svg',
64 'cloth-size-guide-icon' => MERCHANT_URI . 'assets/images/icons/size-chart/admin/cloth-size-guide-icon.svg',
65 'measurement-vertical-icon' => MERCHANT_URI . 'assets/images/icons/size-chart/admin/measurement-vertical-icon.svg',
66 'measuring-tape-icon' => MERCHANT_URI . 'assets/images/icons/size-chart/admin/measuring-tape-icon.svg',
67 'pencil-rule' => MERCHANT_URI . 'assets/images/icons/size-chart/admin/pencil-rule.svg',
68 'scale-ruler-icon' => MERCHANT_URI . 'assets/images/icons/size-chart/admin/scale-ruler-icon.svg',
69 ),
70 'default' => 'icon-size-chart',
71 ),
72
73 array(
74 'id' => 'icon-size',
75 'type' => 'range',
76 'title' => esc_html__( 'Icon size', 'merchant' ),
77 'min' => 1,
78 'max' => 100,
79 'step' => 1,
80 'default' => 24,
81 'unit' => 'px',
82 ),
83
84 array(
85 'id' => 'title-text-color',
86 'type' => 'color',
87 'title' => esc_html__( 'Title text color', 'merchant' ),
88 'default' => '#212121',
89 ),
90
91 array(
92 'id' => 'title-text-color-hover',
93 'type' => 'color',
94 'title' => esc_html__( 'Title text color hover', 'merchant' ),
95 'default' => '#757575',
96 ),
97
98 array(
99 'id' => 'icon-color',
100 'type' => 'color',
101 'title' => esc_html__( 'Icon color', 'merchant' ),
102 ),
103
104 array(
105 'id' => 'icon-color-hover',
106 'type' => 'color',
107 'title' => esc_html__( 'Icon color hover', 'merchant' ),
108 ),
109
110 ),
111 ),
112 array(
113 'title' => esc_html__( 'Popup Design', 'merchant' ),
114 'module' => Merchant_Size_Chart::MODULE_ID,
115 'fields' => array(
116
117 array(
118 'id' => 'popup-width',
119 'type' => 'range',
120 'title' => esc_html__( 'Popup width', 'merchant' ),
121 'min' => 1,
122 'max' => 2000,
123 'step' => 1,
124 'default' => 750,
125 'unit' => 'px',
126 ),
127
128 array(
129 'id' => 'background-color',
130 'type' => 'color',
131 'title' => esc_html__( 'Background color', 'merchant' ),
132 'default' => '#f2f2f2',
133 ),
134
135 array(
136 'id' => 'close-icon-color',
137 'type' => 'color',
138 'title' => esc_html__( 'Close icon color', 'merchant' ),
139 'default' => '#212121',
140 ),
141
142 array(
143 'id' => 'close-icon-color-hover',
144 'type' => 'color',
145 'title' => esc_html__( 'Close icon color hover', 'merchant' ),
146 'default' => '#757575',
147 ),
148
149 array(
150 'id' => 'title-color',
151 'type' => 'color',
152 'title' => esc_html__( 'Title color', 'merchant' ),
153 'default' => '#212112',
154 ),
155
156 array(
157 'id' => 'tabs-color',
158 'type' => 'color',
159 'title' => esc_html__( 'Tabs color', 'merchant' ),
160 'default' => '#757575',
161 ),
162
163 array(
164 'id' => 'tabs-color-active',
165 'type' => 'color',
166 'title' => esc_html__( 'Tabs color active', 'merchant' ),
167 'default' => '#212121',
168 ),
169
170 array(
171 'id' => 'table-headings-background-color',
172 'type' => 'color',
173 'title' => esc_html__( 'Table headings background color', 'merchant' ),
174 'default' => '#212121',
175 ),
176
177 array(
178 'id' => 'table-headings-text-color',
179 'type' => 'color',
180 'title' => esc_html__( 'Table headings text color', 'merchant' ),
181 'default' => '#ffffff',
182 ),
183
184 array(
185 'id' => 'table-body-background-color',
186 'type' => 'color',
187 'title' => esc_html__( 'Table body background color', 'merchant' ),
188 'default' => '#ffffff',
189 ),
190
191 array(
192 'id' => 'table-body-text-color',
193 'type' => 'color',
194 'title' => esc_html__( 'Table body text color', 'merchant' ),
195 'default' => '#212121',
196 ),
197
198 array(
199 'id' => 'description-text-color',
200 'type' => 'color',
201 'title' => esc_html__( 'Description text Color', 'merchant' ),
202 'default' => '#212121',
203 ),
204
205 array(
206 'id' => 'description-link-color',
207 'type' => 'color',
208 'title' => esc_html__( 'Description link color', 'merchant' ),
209 'default' => '#212121',
210 ),
211
212 array(
213 'id' => 'description-link-color-hover',
214 'type' => 'color',
215 'title' => esc_html__( 'Description link color hover', 'merchant' ),
216 'default' => '#757575',
217 ),
218
219 ),
220 ),
221 array(
222 'module' => Merchant_Size_Chart::MODULE_ID,
223 'title' => esc_html__( 'Use shortcode', 'merchant' ),
224 'fields' => array(
225 array(
226 'id' => 'use_shortcode',
227 'type' => 'switcher',
228 'title' => __( 'Use shortcode', 'merchant' ),
229 'default' => 0,
230 ),
231 array(
232 'type' => 'info',
233 'id' => 'shortcode_info',
234 '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' ),
235 ),
236 array(
237 'id' => 'shortcode_text',
238 'type' => 'text_readonly',
239 'title' => esc_html__( 'Shortcode text', 'merchant' ),
240 'default' => '[merchant_module_' . str_replace( '-', '_', Merchant_Size_Chart::MODULE_ID ) . ']',
241 'condition' => array( 'use_shortcode', '==', '1' ),
242 ),
243 ),
244 ),
245 );
246