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

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