PluginProbe
Product Labels, Quick View, Buy Now, Pre-Orders, Frequently Bought Together & More for WooCommerce – Merchant / 1.10.4
Product Labels, Quick View, Buy Now, Pre-Orders, Frequently Bought Together & More for WooCommerce – Merchant v1.10.4
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 1.10.4, at inc/modules/size-chart/admin/options.php

236 lines 6.9 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 Merchant_Admin_Options::create( array(
15 'title' => esc_html__( 'Settings', 'merchant' ),
16 'module' => Merchant_Size_Chart::MODULE_ID,
17 'fields' => array(
18
19 array(
20 'id' => 'global_size_chart',
21 'type' => 'select_size_chart',
22 'title' => esc_html__( 'Global size chart (optional)', 'merchant' ),
23 /* Translators: 1. Link open tag 2. Link close tag */
24 '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>' ),
25 ),
26
27 array(
28 'id' => 'global_size_chart_categories',
29 'type' => 'select_ajax',
30 'title' => esc_html__( 'Categories', 'merchant' ),
31 'source' => 'options',
32 'multiple' => true,
33 'options' => Merchant_Admin_Options::get_category_select2_choices(),
34 'placeholder' => esc_html__( 'Select categories', 'merchant' ),
35 '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' ),
36 ),
37
38 array(
39 'id' => 'text',
40 'type' => 'text',
41 'title' => esc_html__( 'Label text', 'merchant' ),
42 'default' => esc_html__( 'Size Chart', 'merchant' ),
43 ),
44
45 array(
46 'id' => 'icon',
47 'type' => 'choices',
48 'title' => esc_html__( 'Icon', 'merchant' ),
49 'options' => array(
50 'icon-size-chart' => MERCHANT_URI . 'assets/images/icons/size-chart/admin/icon-size-chart.svg',
51 'cloth-size-guide-icon' => MERCHANT_URI . 'assets/images/icons/size-chart/admin/cloth-size-guide-icon.svg',
52 'measurement-vertical-icon' => MERCHANT_URI . 'assets/images/icons/size-chart/admin/measurement-vertical-icon.svg',
53 'measuring-tape-icon' => MERCHANT_URI . 'assets/images/icons/size-chart/admin/measuring-tape-icon.svg',
54 'pencil-rule' => MERCHANT_URI . 'assets/images/icons/size-chart/admin/pencil-rule.svg',
55 'scale-ruler-icon' => MERCHANT_URI . 'assets/images/icons/size-chart/admin/scale-ruler-icon.svg',
56 ),
57 'default' => 'icon-size-chart',
58 ),
59
60 array(
61 'id' => 'icon-size',
62 'type' => 'range',
63 'title' => esc_html__( 'Icon size', 'merchant' ),
64 'min' => 1,
65 'max' => 100,
66 'step' => 1,
67 'default' => 24,
68 'unit' => 'px',
69 ),
70
71 array(
72 'id' => 'title-text-color',
73 'type' => 'color',
74 'title' => esc_html__( 'Title text color', 'merchant' ),
75 'default' => '#212121',
76 ),
77
78 array(
79 'id' => 'title-text-color-hover',
80 'type' => 'color',
81 'title' => esc_html__( 'Title text color hover', 'merchant' ),
82 'default' => '#757575',
83 ),
84
85 array(
86 'id' => 'icon-color',
87 'type' => 'color',
88 'title' => esc_html__( 'Icon color', 'merchant' ),
89 ),
90
91 array(
92 'id' => 'icon-color-hover',
93 'type' => 'color',
94 'title' => esc_html__( 'Icon color hover', 'merchant' ),
95 ),
96
97 ),
98 ) );
99
100 // Design
101 Merchant_Admin_Options::create( array(
102 'title' => esc_html__( 'Popup Design', 'merchant' ),
103 'module' => Merchant_Size_Chart::MODULE_ID,
104 'fields' => array(
105
106 array(
107 'id' => 'popup-width',
108 'type' => 'range',
109 'title' => esc_html__( 'Popup width', 'merchant' ),
110 'min' => 1,
111 'max' => 2000,
112 'step' => 1,
113 'default' => 750,
114 'unit' => 'px',
115 ),
116
117 array(
118 'id' => 'background-color',
119 'type' => 'color',
120 'title' => esc_html__( 'Background color', 'merchant' ),
121 'default' => '#f2f2f2',
122 ),
123
124 array(
125 'id' => 'close-icon-color',
126 'type' => 'color',
127 'title' => esc_html__( 'Close icon color', 'merchant' ),
128 'default' => '#212121',
129 ),
130
131 array(
132 'id' => 'close-icon-color-hover',
133 'type' => 'color',
134 'title' => esc_html__( 'Close icon color hover', 'merchant' ),
135 'default' => '#757575',
136 ),
137
138 array(
139 'id' => 'title-color',
140 'type' => 'color',
141 'title' => esc_html__( 'Title color', 'merchant' ),
142 'default' => '#212112',
143 ),
144
145 array(
146 'id' => 'tabs-color',
147 'type' => 'color',
148 'title' => esc_html__( 'Tabs color', 'merchant' ),
149 'default' => '#757575',
150 ),
151
152 array(
153 'id' => 'tabs-color-active',
154 'type' => 'color',
155 'title' => esc_html__( 'Tabs color active', 'merchant' ),
156 'default' => '#212121',
157 ),
158
159 array(
160 'id' => 'table-headings-background-color',
161 'type' => 'color',
162 'title' => esc_html__( 'Table headings background color', 'merchant' ),
163 'default' => '#212121',
164 ),
165
166 array(
167 'id' => 'table-headings-text-color',
168 'type' => 'color',
169 'title' => esc_html__( 'Table headings text color', 'merchant' ),
170 'default' => '#ffffff',
171 ),
172
173 array(
174 'id' => 'table-body-background-color',
175 'type' => 'color',
176 'title' => esc_html__( 'Table body background color', 'merchant' ),
177 'default' => '#ffffff',
178 ),
179
180 array(
181 'id' => 'table-body-text-color',
182 'type' => 'color',
183 'title' => esc_html__( 'Table body text color', 'merchant' ),
184 'default' => '#212121',
185 ),
186
187 array(
188 'id' => 'description-text-color',
189 'type' => 'color',
190 'title' => esc_html__( 'Description text Color', 'merchant' ),
191 'default' => '#212121',
192 ),
193
194 array(
195 'id' => 'description-link-color',
196 'type' => 'color',
197 'title' => esc_html__( 'Description link color', 'merchant' ),
198 'default' => '#212121',
199 ),
200
201 array(
202 'id' => 'description-link-color-hover',
203 'type' => 'color',
204 'title' => esc_html__( 'Description link color hover', 'merchant' ),
205 'default' => '#757575',
206 ),
207
208 ),
209 ) );
210
211 // Shortcode
212 $merchant_module_id = Merchant_Size_Chart::MODULE_ID;
213 Merchant_Admin_Options::create( array(
214 'module' => $merchant_module_id,
215 'title' => esc_html__( 'Use shortcode', 'merchant' ),
216 'fields' => array(
217 array(
218 'id' => 'use_shortcode',
219 'type' => 'switcher',
220 'title' => __( 'Use shortcode', 'merchant' ),
221 'default' => 0,
222 ),
223 array(
224 'type' => 'info',
225 'id' => 'shortcode_info',
226 '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' ),
227 ),
228 array(
229 'id' => 'shortcode_text',
230 'type' => 'text_readonly',
231 'title' => esc_html__( 'Shortcode text', 'merchant' ),
232 'default' => '[merchant_module_' . str_replace( '-', '_', $merchant_module_id ) . ']',
233 'condition' => array( 'use_shortcode', '==', '1' ),
234 ),
235 ),
236 ) );