Version Description
Released on 29 November 2019 =
Update: Plugin framework
Download this release
Release Info
Developer | yithemes |
Plugin | YITH WooCommerce Ajax Search |
Version | 1.7.3 |
Comparing to | |
See all releases |
Code changes from version 1.7.2 to 1.7.3
- README.txt +6 -1
- class.yith-wcas-admin.php +1 -0
- init.php +2 -2
- plugin-fw/assets/css/metaboxes.css +351 -320
- plugin-fw/assets/css/yit-plugin-panel.css +153 -4
- plugin-fw/assets/css/yith-fields.css +1083 -1089
- plugin-fw/assets/js/metabox.js +65 -52
- plugin-fw/assets/js/metabox.min.js +1 -1
- plugin-fw/assets/js/multisite-updater.min.js +8 -1
- plugin-fw/assets/js/wp-pages.js +23 -0
- plugin-fw/assets/js/wp-pages.min.js +1 -0
- plugin-fw/assets/js/yit-cpt-unlimited.min.js +2 -2
- plugin-fw/assets/js/yith-dashboard.min.js +1 -1
- plugin-fw/assets/js/yith-enhanced-select.min.js +10 -1
- plugin-fw/assets/js/yith-fields.js +63 -43
- plugin-fw/assets/js/yith-fields.min.js +29 -25
- plugin-fw/assets/js/yith-gutenberg.min.js +6 -6
- plugin-fw/assets/js/yith-promo.min.js +1 -1
- plugin-fw/assets/js/yith-system-info.min.js +1 -13
- plugin-fw/assets/js/yith-update-plugins.min.js +1 -1
- plugin-fw/init.php +2 -8
- plugin-fw/lib/promo/yith-promo.php +19 -3
- plugin-fw/lib/promo/yith-promo.xml +2 -41
- plugin-fw/lib/yit-assets.php +7 -7
- plugin-fw/lib/yit-metabox.php +131 -188
- plugin-fw/lib/yit-plugin-panel-wc.php +53 -31
- plugin-fw/lib/yit-plugin-panel.php +541 -189
- plugin-fw/lib/yit-plugin-subpanel.php +0 -5
- plugin-fw/templates/fields/checkbox-array.php +35 -0
- plugin-fw/templates/fields/country-select.php +64 -0
- plugin-fw/templates/fields/datepicker.php +1 -1
- plugin-fw/templates/fields/onoff.php +6 -3
- plugin-fw/templates/fields/toggle-element.php +194 -177
- plugin-fw/templates/fields/upload.php +13 -11
- plugin-fw/templates/metaboxes/field-row.php +7 -3
- plugin-fw/templates/metaboxes/tab.php +16 -12
- plugin-fw/templates/panel/sub-tabs-nav.php +46 -0
- plugin-fw/templates/panel/woocommerce/woocommerce-form.php +6 -3
- plugin-fw/templates/panel/woocommerce/woocommerce-option-row.php +3 -1
- plugin-fw/templates/panel/woocommerce/woocommerce-panel.php +7 -14
- plugin-fw/yit-functions.php +192 -240
README.txt
CHANGED
@@ -4,7 +4,7 @@ Contributors: yithemes
|
|
4 |
Tags: woocommerce search by sku, woocommerce search results, woocommerce search shortcode, woocommerce search page, woocommerce search form, woocommerce search filter, woocommerce search products, woocommerce search content, woocommerce search autocomplete, woocommerce advanced search, woocommerce search category, woocommerce search product attributes, woocommerce search by tag, woocommerce search by brand, woocommerce predictive, woocommerce live search, woocommerce single product search, woocommerce site search, woocommerce search tex, tajax, search, woocommerce, products, themes, yit, e-commerce, shop, yith, ajax search, instant search, premium, yithemes, autocomplete, autosuggest, better search, category search, custom search, highlight terms, Live Search, Predictive Search, product search, relevant search, search highlight, search product, suggest, typeahead, WooCommerce Plugin, woocommerce product search, woocommerce search, wordpress ecommerce
|
5 |
Requires at least: 4.0.0
|
6 |
Tested up to: 5.3
|
7 |
-
Stable tag: 1.7.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -138,6 +138,11 @@ If you have created your own language pack for YITH WooCommerce Ajax Search, or
|
|
138 |
2. YITH WooCommerce Ajax Search in operation displaying WooCommerce search results
|
139 |
|
140 |
== Changelog ==
|
|
|
|
|
|
|
|
|
|
|
141 |
= 1.7.2 - Released on 7 November 2019 =
|
142 |
|
143 |
* Update: Plugin framework
|
4 |
Tags: woocommerce search by sku, woocommerce search results, woocommerce search shortcode, woocommerce search page, woocommerce search form, woocommerce search filter, woocommerce search products, woocommerce search content, woocommerce search autocomplete, woocommerce advanced search, woocommerce search category, woocommerce search product attributes, woocommerce search by tag, woocommerce search by brand, woocommerce predictive, woocommerce live search, woocommerce single product search, woocommerce site search, woocommerce search tex, tajax, search, woocommerce, products, themes, yit, e-commerce, shop, yith, ajax search, instant search, premium, yithemes, autocomplete, autosuggest, better search, category search, custom search, highlight terms, Live Search, Predictive Search, product search, relevant search, search highlight, search product, suggest, typeahead, WooCommerce Plugin, woocommerce product search, woocommerce search, wordpress ecommerce
|
5 |
Requires at least: 4.0.0
|
6 |
Tested up to: 5.3
|
7 |
+
Stable tag: 1.7.3
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
138 |
2. YITH WooCommerce Ajax Search in operation displaying WooCommerce search results
|
139 |
|
140 |
== Changelog ==
|
141 |
+
= 1.7.3 - Released on 29 November 2019 =
|
142 |
+
|
143 |
+
* Update: Plugin framework
|
144 |
+
|
145 |
+
|
146 |
= 1.7.2 - Released on 7 November 2019 =
|
147 |
|
148 |
* Update: Plugin framework
|
class.yith-wcas-admin.php
CHANGED
@@ -131,6 +131,7 @@ if( !class_exists( 'YITH_WCAS_Admin' ) ) {
|
|
131 |
$args = array(
|
132 |
'create_menu_page' => true,
|
133 |
'parent_slug' => '',
|
|
|
134 |
'page_title' => __( 'YITH WooCommerce Ajax Search', 'yith-woocommerce-ajax-search' ),
|
135 |
'menu_title' => __( 'Ajax Search', 'yith-woocommerce-ajax-search' ),
|
136 |
'capability' => 'manage_options',
|
131 |
$args = array(
|
132 |
'create_menu_page' => true,
|
133 |
'parent_slug' => '',
|
134 |
+
'plugin_slug' => YITH_WCAS_SLUG,
|
135 |
'page_title' => __( 'YITH WooCommerce Ajax Search', 'yith-woocommerce-ajax-search' ),
|
136 |
'menu_title' => __( 'Ajax Search', 'yith-woocommerce-ajax-search' ),
|
137 |
'capability' => 'manage_options',
|
init.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Plugin Name: YITH WooCommerce Ajax Search
|
4 |
* Plugin URI: https://yithemes.com/themes/plugins/yith-woocommerce-ajax-search/
|
5 |
* Description: <code><strong>YITH WooCommerce Ajax Search</strong></code> is the plugin that allows you to search for a specific product by inserting a few characters. Thanks to <strong>Ajax Search</strong>, users can quickly find the contents they are interested in without wasting time among site pages. <a href="https://yithemes.com/" target="_blank">Get more plugins for your e-commerce shop on <strong>YITH</strong></a>.
|
6 |
-
* Version: 1.7.
|
7 |
* Author: YITH
|
8 |
* Author URI: https://yithemes.com/
|
9 |
* Text Domain: yith-woocommerce-ajax-search
|
@@ -67,7 +67,7 @@ register_activation_hook( __FILE__, 'yith_plugin_registration_hook' );
|
|
67 |
if ( defined( 'YITH_WCAS_VERSION' ) ){
|
68 |
return;
|
69 |
}else{
|
70 |
-
define( 'YITH_WCAS_VERSION', '1.7.
|
71 |
}
|
72 |
|
73 |
if ( ! defined( 'YITH_WCAS_FREE_INIT' ) ) {
|
3 |
* Plugin Name: YITH WooCommerce Ajax Search
|
4 |
* Plugin URI: https://yithemes.com/themes/plugins/yith-woocommerce-ajax-search/
|
5 |
* Description: <code><strong>YITH WooCommerce Ajax Search</strong></code> is the plugin that allows you to search for a specific product by inserting a few characters. Thanks to <strong>Ajax Search</strong>, users can quickly find the contents they are interested in without wasting time among site pages. <a href="https://yithemes.com/" target="_blank">Get more plugins for your e-commerce shop on <strong>YITH</strong></a>.
|
6 |
+
* Version: 1.7.3
|
7 |
* Author: YITH
|
8 |
* Author URI: https://yithemes.com/
|
9 |
* Text Domain: yith-woocommerce-ajax-search
|
67 |
if ( defined( 'YITH_WCAS_VERSION' ) ){
|
68 |
return;
|
69 |
}else{
|
70 |
+
define( 'YITH_WCAS_VERSION', '1.7.3' );
|
71 |
}
|
72 |
|
73 |
if ( ! defined( 'YITH_WCAS_FREE_INIT' ) ) {
|
plugin-fw/assets/css/metaboxes.css
CHANGED
@@ -1,208 +1,239 @@
|
|
1 |
/* self-clear floats */
|
2 |
.clearfix:after {
|
3 |
-
content: ".";
|
4 |
-
display: block;
|
5 |
-
height: 0;
|
6 |
-
clear: both;
|
7 |
-
visibility: hidden;
|
8 |
-
overflow: hidden;
|
9 |
}
|
10 |
|
11 |
/* ie.css */
|
12 |
* html .clearfix { /* IE6 */
|
13 |
-
height: 1%;
|
14 |
}
|
15 |
|
16 |
*:first-child + html .clearfix { /* IE7 */
|
17 |
-
min-height: 1%;
|
18 |
}
|
19 |
|
20 |
.clearboth {
|
21 |
-
clear: both
|
22 |
}
|
23 |
|
24 |
/* === TAB STYLE */
|
25 |
.metaboxes-tab {
|
26 |
-
margin: -6px -12px -8px;
|
27 |
}
|
28 |
|
29 |
.metaboxes-tab div.tabs-panel {
|
30 |
-
height: auto;
|
31 |
-
overflow: visible;
|
32 |
-
margin-top: 0px;
|
33 |
-
padding: 0 10px;
|
34 |
-
background: none;
|
35 |
-
border: 0;
|
36 |
}
|
37 |
|
38 |
.metaboxes-tab ul.metaboxes-tabs {
|
39 |
-
background: #f1f1f1;
|
40 |
-
margin: 0;
|
41 |
-
padding: 10px 0 0 5px;
|
42 |
}
|
43 |
|
44 |
.metaboxes-tab ul.metaboxes-tabs li {
|
45 |
-
float: left;
|
46 |
-
background: #dedede;
|
47 |
-
margin: 0 0 0 5px;
|
48 |
}
|
49 |
|
50 |
.metaboxes-tab ul.metaboxes-tabs li a {
|
51 |
-
color: #555;
|
52 |
-
text-decoration: none;
|
53 |
-
padding: 8px 15px;
|
54 |
-
display: block;
|
55 |
-
box-shadow: none !important;
|
56 |
}
|
57 |
|
58 |
.metaboxes-tab ul.metaboxes-tabs li.tabs {
|
59 |
-
background: #fff;
|
60 |
}
|
61 |
|
62 |
.metaboxes-tab p.field-row {
|
63 |
-
margin: 20px 0;
|
64 |
}
|
65 |
|
66 |
.metaboxes-tab div.sep {
|
67 |
-
height: 1px;
|
68 |
-
background: #dfdfdf;
|
69 |
-
clear: both;
|
70 |
-
margin-left: -10px;
|
71 |
-
margin-right: -10px;
|
72 |
}
|
73 |
|
74 |
.metaboxes-tab label {
|
75 |
-
font-weight: bold;
|
76 |
-
width: 160px;
|
77 |
-
float: left;
|
78 |
-
line-height: 23px;
|
79 |
-
margin-left: -184px;
|
80 |
}
|
81 |
|
82 |
.metaboxes-tab label small {
|
83 |
-
font-weight: normal;
|
84 |
-
line-height: 15px;
|
85 |
-
font-style: italic;
|
86 |
-
color: #999;
|
87 |
-
display: block;
|
88 |
}
|
89 |
|
90 |
.metaboxes-tab .yith-plugin-fw-radio__row {
|
91 |
-
width: 100%;
|
92 |
-
min-height: 20px;
|
93 |
}
|
94 |
|
95 |
.metaboxes-tab .yith-plugin-fw-radio__row label,
|
96 |
.metaboxes-tab .yith-toggle-elements label,
|
97 |
.metaboxes-tab .yith-add-box label {
|
98 |
-
margin-left: 0;
|
99 |
-
font-weight: normal;
|
100 |
}
|
101 |
|
102 |
.metaboxes-tab.yith-plugin-ui h3 {
|
103 |
-
color: #2a8db0;
|
104 |
-
font-size: 15px;
|
105 |
-
text-transform: uppercase;
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
background: transparent;
|
111 |
}
|
112 |
|
113 |
.metaboxes-tab.yith-plugin-ui .yith-add-box,
|
114 |
.metaboxes-tab.yith-plugin-ui .yith-toggle-row {
|
115 |
-
width: auto;
|
116 |
}
|
117 |
|
118 |
.metaboxes-tab .wp-picker-container label {
|
119 |
-
font-weight: inherit;
|
120 |
-
width: auto;
|
121 |
-
float: none;
|
122 |
-
line-height: inherit;
|
123 |
-
margin-left: 0;
|
124 |
}
|
125 |
|
126 |
.metaboxes-tab.yith-plugin-ui .yith-plugin-fw-radio__row label {
|
127 |
-
width: auto !important;
|
128 |
-
display: inline-block;
|
129 |
-
font-weight: normal;
|
130 |
}
|
131 |
|
132 |
.metaboxes-tab input[type="checkbox"] {
|
133 |
-
vertical-align: middle
|
134 |
}
|
135 |
|
136 |
.metaboxes-tab input.button-secondary, .metaboxes-tab input.checkbox {
|
137 |
-
width: auto;
|
138 |
}
|
139 |
|
140 |
.metaboxes-tab p.field-row.textarea .description {
|
141 |
-
vertical-align: top;
|
142 |
}
|
143 |
|
144 |
.metaboxes-tab p.field-row.checkbox {
|
145 |
-
background: none;
|
146 |
}
|
147 |
|
148 |
.metaboxes-tab .the-metabox {
|
149 |
-
margin: 20px 0;
|
150 |
-
margin-left: 184px;
|
151 |
}
|
152 |
|
153 |
.metaboxes-tab .the-metabox.no-label {
|
154 |
-
margin: 20px 0;
|
155 |
-
margin-left: 0;
|
156 |
}
|
157 |
|
158 |
.metaboxes-tab hr {
|
159 |
-
height: 0px;
|
160 |
-
border-top: 1px solid #dadada;
|
161 |
-
width: auto;
|
162 |
-
margin-left: -10px;
|
163 |
-
margin-right: -10px;
|
164 |
}
|
165 |
|
166 |
.metaboxes-tab .the-metabox p {
|
167 |
-
margin: 0;
|
168 |
}
|
169 |
|
170 |
.metaboxes-tab .the-metabox:last-child {
|
171 |
-
border-bottom: 0px;
|
172 |
}
|
173 |
|
174 |
.metaboxes-tab .the-metabox.checkbox {
|
175 |
-
background: none;
|
176 |
}
|
177 |
|
178 |
.metaboxes-tab span.description.inline {
|
179 |
-
display: inline-block;
|
180 |
-
line-height: 23px;
|
181 |
-
width: auto;
|
182 |
-
vertical-align: middle;
|
183 |
-
margin: 0;
|
184 |
}
|
185 |
|
186 |
.metaboxes-tab .slider label {
|
187 |
-
padding: 15px 0;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
188 |
}
|
189 |
|
190 |
/* sortable table posts */
|
191 |
|
192 |
#the-list.ui-sortable tr:hover {
|
193 |
-
cursor: move;
|
194 |
}
|
195 |
|
196 |
.the-metabox.preview {
|
197 |
-
float: none;
|
198 |
}
|
199 |
|
200 |
.metaboxes-tab .the-metabox.no-label.preview {
|
201 |
-
margin-left: 184px;
|
202 |
}
|
203 |
|
204 |
.metaboxes-tab .the-metabox.no-label.preview img {
|
205 |
-
box-shadow: 0 1px 8px rgba(0, 0, 0, 0.2);
|
206 |
}
|
207 |
|
208 |
/**************************************
|
@@ -218,504 +249,504 @@
|
|
218 |
.metaboxes-tab .yith-plugin-fw-text-input,
|
219 |
.metaboxes-tab .yith-plugin-fw-text-array-table,
|
220 |
.metaboxes-tab .yith-plugin-fw-textarea {
|
221 |
-
width: 400px;
|
222 |
-
max-width: 100%;
|
223 |
}
|
224 |
|
225 |
.metaboxes-tab.yith-plugin-ui input[type=number] {
|
226 |
-
width: auto;
|
227 |
-
min-width: 90px;
|
228 |
}
|
229 |
|
230 |
.metaboxes-tab.yith-plugin-ui p {
|
231 |
-
font-size: 14px;
|
232 |
}
|
233 |
|
234 |
.metaboxes-tab.yith-plugin-ui p.section-description {
|
235 |
|
236 |
-
margin: 0 20px 40px 18px;
|
237 |
}
|
238 |
|
239 |
.metaboxes-tab .yith-plugin-fw-text-array-table input[type=text] {
|
240 |
-
width: 100%;
|
241 |
}
|
242 |
|
243 |
.metaboxes-tab.yith-plugin-ui .yith-add-box h3 {
|
244 |
-
padding: 0 0 30px 0;
|
245 |
-
font-weight: 600;
|
246 |
-
margin: 0;
|
247 |
}
|
248 |
|
249 |
.metaboxes-tab.yith-plugin-ui .select2-container--default .select2-selection--single {
|
250 |
-
border: 0;
|
251 |
-
margin: 0;
|
252 |
}
|
253 |
|
254 |
/* wp editor */
|
255 |
.the-metabox.textarea-editor .mceIframeContainer {
|
256 |
-
background: #fff;
|
257 |
}
|
258 |
|
259 |
|
260 |
.the-metabox.textarea-editor label {
|
261 |
-
margin-top: 24px;
|
262 |
}
|
263 |
|
264 |
/* categories */
|
265 |
.categories-panel {
|
266 |
-
width: 30%;
|
267 |
-
float: left;
|
268 |
-
margin-right: 4px;
|
269 |
}
|
270 |
|
271 |
.categories-panel .box {
|
272 |
-
height: 200px;
|
273 |
-
border: 1px solid #dfdfdf;
|
274 |
-
background: #fff;
|
275 |
-
padding: 6px 10px;
|
276 |
-
overflow: auto;
|
277 |
}
|
278 |
|
279 |
.categories-panel ul {
|
280 |
-
list-style: none;
|
281 |
-
margin: 0;
|
282 |
}
|
283 |
|
284 |
.categories-panel ul li {
|
285 |
-
line-height: 19px;
|
286 |
-
margin: 0;
|
287 |
-
padding: 0;
|
288 |
-
word-wrap: break-word;
|
289 |
}
|
290 |
|
291 |
.categories-panel ul li label {
|
292 |
-
font-weight: normal !important;
|
293 |
-
margin-left: 0 !important;
|
294 |
}
|
295 |
|
296 |
.categories-panel input.newcategory {
|
297 |
-
width: 100%;
|
298 |
-
margin-bottom: 3px;
|
299 |
}
|
300 |
|
301 |
/* contact form */
|
302 |
.contactform_item {
|
303 |
-
border-style: solid;
|
304 |
-
border-width: 1px;
|
305 |
-
line-height: 1;
|
306 |
-
margin-bottom: 20px;
|
307 |
-
padding: 0;
|
308 |
-
background-color: #f5f5f5;
|
309 |
-
background-image: -moz-linear-gradient(center top, #f9f9f9, #f5f5f5);
|
310 |
-
border-color: #dfdfdf;
|
311 |
-
border-radius: 3px 3px 3px 3px;
|
312 |
-
box-shadow: 0 1px 0 #fff inset;
|
313 |
-
min-width: 255px;
|
314 |
-
position: relative;
|
315 |
}
|
316 |
|
317 |
.contactform_item .handlediv {
|
318 |
-
position: relative;
|
319 |
-
top: -4px;
|
320 |
}
|
321 |
|
322 |
.contactform_item h3 {
|
323 |
-
min-height: 21px;
|
324 |
-
margin: 13px;
|
325 |
}
|
326 |
|
327 |
.contactform_item .inside {
|
328 |
-
padding: 10px !important;
|
329 |
}
|
330 |
|
331 |
.contactform_item .deps {
|
332 |
-
display: none;
|
333 |
}
|
334 |
|
335 |
.contactform_item .addoptions p.option {
|
336 |
-
margin: 5px 0 5px 200px
|
337 |
}
|
338 |
|
339 |
.contactform_item .addoptions p label {
|
340 |
-
width: 80px !important;
|
341 |
}
|
342 |
|
343 |
.contactform_item .add-field-option {
|
344 |
-
margin-bottom: 10px !important;
|
345 |
}
|
346 |
|
347 |
.remove_item {
|
348 |
-
float: right;
|
349 |
}
|
350 |
|
351 |
.metabox-sortable-placeholder {
|
352 |
-
border: 1px dotted #dedede;
|
353 |
-
margin: 10px 0
|
354 |
}
|
355 |
|
356 |
/* features tab */
|
357 |
.featurestab_item {
|
358 |
-
border-style: solid;
|
359 |
-
border-width: 1px;
|
360 |
-
line-height: 1;
|
361 |
-
margin-bottom: 20px;
|
362 |
-
padding: 0;
|
363 |
-
background-color: #f5f5f5;
|
364 |
-
background-image: -moz-linear-gradient(center top, #f9f9f9, #f5f5f5);
|
365 |
-
border-color: #dfdfdf;
|
366 |
-
border-radius: 3px 3px 3px 3px;
|
367 |
-
box-shadow: 0 1px 0 #fff inset;
|
368 |
-
min-width: 255px;
|
369 |
-
position: relative;
|
370 |
}
|
371 |
|
372 |
.featurestab_item .handlediv {
|
373 |
-
position: relative;
|
374 |
-
top: -4px;
|
375 |
}
|
376 |
|
377 |
.featurestab_item h3 {
|
378 |
-
min-height: 21px
|
379 |
}
|
380 |
|
381 |
.featurestab_item .inside {
|
382 |
-
padding: 10px !important;
|
383 |
}
|
384 |
|
385 |
.featurestab_item .deps {
|
386 |
-
display: none;
|
387 |
}
|
388 |
|
389 |
.featurestab_item .addoptions p.option {
|
390 |
-
margin: 5px 0 5px 200px
|
391 |
}
|
392 |
|
393 |
.featurestab_item .addoptions p label {
|
394 |
-
width: 80px !important;
|
395 |
}
|
396 |
|
397 |
.featurestab_item .add-field-option {
|
398 |
-
margin-bottom: 10px !important;
|
399 |
}
|
400 |
|
401 |
.messages-panel.updated {
|
402 |
-
margin: 10px 0px 10px !important;
|
403 |
-
max-width: 1200px;
|
404 |
-
border-radius: 5px;
|
405 |
-
-webkit-box-sizing: border-box;
|
406 |
-
box-sizing: border-box;
|
407 |
}
|
408 |
|
409 |
.ui-widget-overlay {
|
410 |
-
background-image: none !important;
|
411 |
}
|
412 |
|
413 |
.the-metabox .icon_type {
|
414 |
-
width: 30%;
|
415 |
-
float: left;
|
416 |
-
margin-right: 40px
|
417 |
}
|
418 |
|
419 |
#post-type-settings .category-list label {
|
420 |
-
width: 187px;
|
421 |
}
|
422 |
|
423 |
.remove_cat {
|
424 |
-
float: right;
|
425 |
-
text-align: center;
|
426 |
-
display: block;
|
427 |
-
width: 20px;
|
428 |
-
height: 20px;
|
429 |
-
border-radius: 20px;
|
430 |
-
font-weight: bold;
|
431 |
-
font-size: 10px;
|
432 |
-
background: #efefef;
|
433 |
-
text-decoration: none;
|
434 |
}
|
435 |
|
436 |
/* typography */
|
437 |
.the-metabox.typography .select_wrapper.font-family {
|
438 |
-
width: 200px;
|
439 |
}
|
440 |
|
441 |
.the-metabox.typography .spinner_container {
|
442 |
-
float: left;
|
443 |
-
margin-right: 10px;
|
444 |
}
|
445 |
|
446 |
.the-metabox.typography .spinner_container input.number {
|
447 |
-
width: 50px !important;
|
448 |
-
-webkit-border-top-right-radius: 0px;
|
449 |
-
-webkit-border-bottom-right-radius: 0px;
|
450 |
-
-moz-border-radius-topright: 0px;
|
451 |
-
-moz-border-radius-bottomright: 0px;
|
452 |
-
border-top-right-radius: 0px;
|
453 |
-
border-bottom-right-radius: 0px;
|
454 |
}
|
455 |
|
456 |
/* number */
|
457 |
.the-metabox.number input.number {
|
458 |
-
width: 50px !important;
|
459 |
}
|
460 |
|
461 |
/* number */
|
462 |
.rm_number .number {
|
463 |
-
width: 70px;
|
464 |
-
text-align: right;
|
465 |
-
-webkit-border-top-right-radius: 0px;
|
466 |
-
-webkit-border-bottom-right-radius: 0px;
|
467 |
-
-moz-border-radius-topright: 0px;
|
468 |
-
-moz-border-radius-bottomright: 0px;
|
469 |
-
border-top-right-radius: 0px;
|
470 |
-
border-bottom-right-radius: 0px;
|
471 |
}
|
472 |
|
473 |
.spinner-wrapper {
|
474 |
-
position: relative;
|
475 |
-
height: 23px;
|
476 |
-
overflow: hidden;
|
477 |
}
|
478 |
|
479 |
.spinner-wrapper input.number {
|
480 |
-
float: left;
|
481 |
}
|
482 |
|
483 |
.spinner-wrapper .spinner-button {
|
484 |
-
cursor: pointer;
|
485 |
-
float: left;
|
486 |
-
position: absolute;
|
487 |
-
left: 69px;
|
488 |
-
width: 15px;
|
489 |
-
height: 12px;
|
490 |
-
border: 1px solid #dfdfdf;
|
491 |
-
background: #fff;
|
492 |
-
margin: 0;
|
493 |
-
padding: 0;
|
494 |
-
line-height: 9999px;
|
495 |
-
overflow: hidden;
|
496 |
-
background: url('../images/spinner.png') no-repeat center -11px
|
497 |
}
|
498 |
|
499 |
.spinner-wrapper .spinner-button.button-plus {
|
500 |
-
top: 0;
|
501 |
-
-webkit-border-top-right-radius: 3px !important;
|
502 |
-
-moz-border-radius-topright: 3px !important;
|
503 |
-
border-top-right-radius: 3px !important;
|
504 |
}
|
505 |
|
506 |
.spinner-wrapper .spinner-button.button-minus {
|
507 |
-
bottom: 0;
|
508 |
-
background-position: center -30px;
|
509 |
-
-webkit-border-bottom-right-radius: 3px !important;
|
510 |
-
-moz-border-radius-bottomright: 3px !important;
|
511 |
-
border-bottom-right-radius: 3px !important;
|
512 |
}
|
513 |
|
514 |
.spinner-wrapper .spinner-button.button-plus:active {
|
515 |
-
background-position: center 0px;
|
516 |
}
|
517 |
|
518 |
.spinner-wrapper .spinner-button.button-minus:active {
|
519 |
-
background-position: center -20px;
|
520 |
}
|
521 |
|
522 |
.rm_typography .spinner_container {
|
523 |
-
float: left;
|
524 |
-
margin-right: 10px;
|
525 |
}
|
526 |
|
527 |
.rm_typography .spinner-wrapper {
|
528 |
-
height: 28px;
|
529 |
}
|
530 |
|
531 |
.rm_typography .spinner-wrapper input.number {
|
532 |
-
height: 28px;
|
533 |
}
|
534 |
|
535 |
.rm_typography .spinner-wrapper .spinner-button.button-plus {
|
536 |
-
height: 15px;
|
537 |
-
background-position: center -10px;
|
538 |
}
|
539 |
|
540 |
.rm_typography .spinner-wrapper .spinner-button.button-minus {
|
541 |
-
height: 14px;
|
542 |
}
|
543 |
|
544 |
.the-metabox .spinner-wrapper .spinner-button {
|
545 |
-
left: 49px;
|
546 |
}
|
547 |
|
548 |
.the-metabox.typography .spinner-wrapper .spinner-button {
|
549 |
-
left: 35px;
|
550 |
}
|
551 |
|
552 |
/* images */
|
553 |
.the-metabox.images, .the-metabox.images label {
|
554 |
-
margin-left: 0;
|
555 |
-
display: block;
|
556 |
}
|
557 |
|
558 |
.the-metabox.images .slides-wrapper {
|
559 |
-
clear: both;
|
560 |
}
|
561 |
|
562 |
.the-metabox.images .slides-wrapper li {
|
563 |
-
position: relative;
|
564 |
}
|
565 |
|
566 |
.the-metabox.images a.delete {
|
567 |
-
display: block;
|
568 |
-
margin-left: 4px;
|
569 |
-
text-decoration: none;
|
570 |
-
font-weight: bold;
|
571 |
-
color: red;
|
572 |
-
position: absolute;
|
573 |
-
top: 0;
|
574 |
-
right: 0;
|
575 |
-
width: 10px;
|
576 |
-
height: 18px;
|
577 |
-
z-index: 10;
|
578 |
-
cursor: pointer !important;
|
579 |
}
|
580 |
|
581 |
/* wp editor */
|
582 |
.wp_themeSkin iframe {
|
583 |
-
background: #fff !important;
|
584 |
}
|
585 |
|
586 |
/* custom tabs */
|
587 |
.customtab_item {
|
588 |
-
border-style: solid;
|
589 |
-
border-width: 1px;
|
590 |
-
line-height: 1;
|
591 |
-
margin-bottom: 20px;
|
592 |
-
padding: 0;
|
593 |
-
background-color: #f5f5f5;
|
594 |
-
background-image: -moz-linear-gradient(center top, #f9f9f9, #f5f5f5);
|
595 |
-
border-color: #dfdfdf;
|
596 |
-
border-radius: 3px 3px 3px 3px;
|
597 |
-
box-shadow: 0 1px 0 #fff inset;
|
598 |
-
min-width: 255px;
|
599 |
-
position: relative;
|
600 |
}
|
601 |
|
602 |
.customtab_item .handlediv {
|
603 |
-
position: relative;
|
604 |
-
top: -4px;
|
605 |
}
|
606 |
|
607 |
.customtab_item h3 {
|
608 |
-
min-height: 21px
|
609 |
}
|
610 |
|
611 |
.customtab_item .inside {
|
612 |
-
padding: 10px !important;
|
613 |
}
|
614 |
|
615 |
.customtab_item .deps {
|
616 |
-
display: none;
|
617 |
}
|
618 |
|
619 |
.customtab_item .addoptions p.option {
|
620 |
-
margin: 5px 0 5px 200px
|
621 |
}
|
622 |
|
623 |
.customtab_item .addoptions p label {
|
624 |
-
width: 80px !important;
|
625 |
}
|
626 |
|
627 |
.customtab_item .add-field-option {
|
628 |
-
margin-bottom: 10px !important;
|
629 |
}
|
630 |
|
631 |
.customtab_item .remove_item {
|
632 |
-
float: right;
|
633 |
}
|
634 |
|
635 |
.metabox-sortable-placeholder {
|
636 |
-
border: 1px dotted #dedede;
|
637 |
-
margin: 10px 0
|
638 |
}
|
639 |
|
640 |
.the-metabox.customtabs {
|
641 |
-
margin-left: 0;
|
642 |
}
|
643 |
|
644 |
#customtab_item_sample {
|
645 |
-
display: none;
|
646 |
}
|
647 |
|
648 |
.the-metabox.customtabs .field-row {
|
649 |
-
margin-bottom: 10px;
|
650 |
}
|
651 |
|
652 |
#yit_custom_tabs label {
|
653 |
-
font-weight: normal;
|
654 |
-
width: auto;
|
655 |
-
float: none;
|
656 |
-
line-height: auto;
|
657 |
-
margin-left: 0;
|
658 |
}
|
659 |
|
660 |
.wp-admin p label input[type=radio] {
|
661 |
-
width: 16px;
|
662 |
-
margin-right: 10px;
|
663 |
-
margin-top: 3px;
|
664 |
}
|
665 |
|
666 |
.wp-admin .form-field._preset_onsale_icon_field label input[type=radio] {
|
667 |
-
margin-top: 0;
|
668 |
}
|
669 |
|
670 |
.the-metabox .spinner {
|
671 |
-
margin-top: 5px;
|
672 |
-
float: none;
|
673 |
}
|
674 |
|
675 |
/*sidebars*/
|
676 |
#choose-sidebars.choose {
|
677 |
-
margin-left: 0px;
|
678 |
}
|
679 |
|
680 |
#_active_page_options-container label, #_active_page_options-container p {
|
681 |
-
display: inline-block;
|
682 |
-
margin: 0px;
|
683 |
}
|
684 |
|
685 |
#_active_page_options-container label {
|
686 |
-
margin-right: 10px;
|
687 |
-
margin-top: 3px;
|
688 |
}
|
689 |
|
690 |
#_active_page_options-container {
|
691 |
-
float: right;
|
692 |
-
margin-right: 20px;
|
693 |
-
margin-top: 5px;
|
694 |
-
z-index: 9999 !important;
|
695 |
-
position: absolute;
|
696 |
-
right: 0;
|
697 |
}
|
698 |
|
699 |
/*-----------------------
|
700 |
* Colorpicker - fix issues in combination with third-party themes or plugin (Basel, VC Addons, ...)
|
701 |
*/
|
702 |
.metaboxes-tab .the-metabox.colorpicker {
|
703 |
-
display: block;
|
704 |
-
width: auto;
|
705 |
-
height: auto;
|
706 |
-
overflow: visible;
|
707 |
-
top: auto;
|
708 |
-
left: auto;
|
709 |
-
background: transparent;
|
710 |
-
position: static;
|
711 |
-
z-index: 1;
|
712 |
-
font-family: inherit;
|
713 |
}
|
714 |
|
715 |
.the-metabox.checkbox.checkboxgroup-start.clearfix {
|
716 |
-
margin: 40px 0 0 264px;
|
717 |
}
|
718 |
|
719 |
.the-metabox.checkbox.checkboxgroup.clearfix {
|
720 |
-
margin: 0 0 0 264px;
|
721 |
}
|
1 |
/* self-clear floats */
|
2 |
.clearfix:after {
|
3 |
+
content : ".";
|
4 |
+
display : block;
|
5 |
+
height : 0;
|
6 |
+
clear : both;
|
7 |
+
visibility : hidden;
|
8 |
+
overflow : hidden;
|
9 |
}
|
10 |
|
11 |
/* ie.css */
|
12 |
* html .clearfix { /* IE6 */
|
13 |
+
height : 1%;
|
14 |
}
|
15 |
|
16 |
*:first-child + html .clearfix { /* IE7 */
|
17 |
+
min-height : 1%;
|
18 |
}
|
19 |
|
20 |
.clearboth {
|
21 |
+
clear : both
|
22 |
}
|
23 |
|
24 |
/* === TAB STYLE */
|
25 |
.metaboxes-tab {
|
26 |
+
margin : -6px -12px -8px;
|
27 |
}
|
28 |
|
29 |
.metaboxes-tab div.tabs-panel {
|
30 |
+
height : auto;
|
31 |
+
overflow : visible;
|
32 |
+
margin-top : 0px;
|
33 |
+
padding : 0 10px;
|
34 |
+
background : none;
|
35 |
+
border : 0;
|
36 |
}
|
37 |
|
38 |
.metaboxes-tab ul.metaboxes-tabs {
|
39 |
+
background : #f1f1f1;
|
40 |
+
margin : 0;
|
41 |
+
padding : 10px 0 0 5px;
|
42 |
}
|
43 |
|
44 |
.metaboxes-tab ul.metaboxes-tabs li {
|
45 |
+
float : left;
|
46 |
+
background : #dedede;
|
47 |
+
margin : 0 0 0 5px;
|
48 |
}
|
49 |
|
50 |
.metaboxes-tab ul.metaboxes-tabs li a {
|
51 |
+
color : #555;
|
52 |
+
text-decoration : none;
|
53 |
+
padding : 8px 15px;
|
54 |
+
display : block;
|
55 |
+
box-shadow : none !important;
|
56 |
}
|
57 |
|
58 |
.metaboxes-tab ul.metaboxes-tabs li.tabs {
|
59 |
+
background : #fff;
|
60 |
}
|
61 |
|
62 |
.metaboxes-tab p.field-row {
|
63 |
+
margin : 20px 0;
|
64 |
}
|
65 |
|
66 |
.metaboxes-tab div.sep {
|
67 |
+
height : 1px;
|
68 |
+
background : #dfdfdf;
|
69 |
+
clear : both;
|
70 |
+
margin-left : -10px;
|
71 |
+
margin-right : -10px;
|
72 |
}
|
73 |
|
74 |
.metaboxes-tab label {
|
75 |
+
font-weight : bold;
|
76 |
+
width : 160px;
|
77 |
+
float : left;
|
78 |
+
line-height : 23px;
|
79 |
+
margin-left : -184px;
|
80 |
}
|
81 |
|
82 |
.metaboxes-tab label small {
|
83 |
+
font-weight : normal;
|
84 |
+
line-height : 15px;
|
85 |
+
font-style : italic;
|
86 |
+
color : #999;
|
87 |
+
display : block;
|
88 |
}
|
89 |
|
90 |
.metaboxes-tab .yith-plugin-fw-radio__row {
|
91 |
+
width : 100%;
|
92 |
+
min-height : 20px;
|
93 |
}
|
94 |
|
95 |
.metaboxes-tab .yith-plugin-fw-radio__row label,
|
96 |
.metaboxes-tab .yith-toggle-elements label,
|
97 |
.metaboxes-tab .yith-add-box label {
|
98 |
+
margin-left : 0;
|
99 |
+
font-weight : normal;
|
100 |
}
|
101 |
|
102 |
.metaboxes-tab.yith-plugin-ui h3 {
|
103 |
+
color : #2a8db0;
|
104 |
+
font-size : 15px;
|
105 |
+
text-transform : uppercase;
|
106 |
+
padding : 5px 20px;
|
107 |
+
margin : 0 0 0 -4px;
|
108 |
+
width : auto;
|
109 |
+
background : transparent;
|
|
|
110 |
}
|
111 |
|
112 |
.metaboxes-tab.yith-plugin-ui .yith-add-box,
|
113 |
.metaboxes-tab.yith-plugin-ui .yith-toggle-row {
|
114 |
+
width : auto;
|
115 |
}
|
116 |
|
117 |
.metaboxes-tab .wp-picker-container label {
|
118 |
+
font-weight : inherit;
|
119 |
+
width : auto;
|
120 |
+
float : none;
|
121 |
+
line-height : inherit;
|
122 |
+
margin-left : 0;
|
123 |
}
|
124 |
|
125 |
.metaboxes-tab.yith-plugin-ui .yith-plugin-fw-radio__row label {
|
126 |
+
width : auto !important;
|
127 |
+
display : inline-block;
|
128 |
+
font-weight : normal;
|
129 |
}
|
130 |
|
131 |
.metaboxes-tab input[type="checkbox"] {
|
132 |
+
vertical-align : middle
|
133 |
}
|
134 |
|
135 |
.metaboxes-tab input.button-secondary, .metaboxes-tab input.checkbox {
|
136 |
+
width : auto;
|
137 |
}
|
138 |
|
139 |
.metaboxes-tab p.field-row.textarea .description {
|
140 |
+
vertical-align : top;
|
141 |
}
|
142 |
|
143 |
.metaboxes-tab p.field-row.checkbox {
|
144 |
+
background : none;
|
145 |
}
|
146 |
|
147 |
.metaboxes-tab .the-metabox {
|
148 |
+
margin : 20px 0;
|
149 |
+
margin-left : 184px;
|
150 |
}
|
151 |
|
152 |
.metaboxes-tab .the-metabox.no-label {
|
153 |
+
margin : 20px 0;
|
154 |
+
margin-left : 0;
|
155 |
}
|
156 |
|
157 |
.metaboxes-tab hr {
|
158 |
+
height : 0px;
|
159 |
+
border-top : 1px solid #dadada;
|
160 |
+
width : auto;
|
161 |
+
margin-left : -10px;
|
162 |
+
margin-right : -10px;
|
163 |
}
|
164 |
|
165 |
.metaboxes-tab .the-metabox p {
|
166 |
+
margin : 0;
|
167 |
}
|
168 |
|
169 |
.metaboxes-tab .the-metabox:last-child {
|
170 |
+
border-bottom : 0px;
|
171 |
}
|
172 |
|
173 |
.metaboxes-tab .the-metabox.checkbox {
|
174 |
+
background : none;
|
175 |
}
|
176 |
|
177 |
.metaboxes-tab span.description.inline {
|
178 |
+
display : inline-block;
|
179 |
+
line-height : 23px;
|
180 |
+
width : auto;
|
181 |
+
vertical-align : middle;
|
182 |
+
margin : 0;
|
183 |
}
|
184 |
|
185 |
.metaboxes-tab .slider label {
|
186 |
+
padding : 15px 0;
|
187 |
+
}
|
188 |
+
|
189 |
+
.metaboxes-tab.yith-plugin-ui ul.metaboxes-tabs {
|
190 |
+
background : transparent;
|
191 |
+
border-bottom : 1px solid #d8d8d8;
|
192 |
+
padding : 10px 0 0 0;
|
193 |
+
margin : 0 10px
|
194 |
+
}
|
195 |
+
|
196 |
+
|
197 |
+
.metaboxes-tab.yith-plugin-ui ul.metaboxes-tabs li {
|
198 |
+
background : #fff;
|
199 |
+
border-top : 1px solid #d8d8d8;
|
200 |
+
border-left : 1px solid #d8d8d8;
|
201 |
+
border-right : 1px solid #d8d8d8;
|
202 |
+
margin : 0 0 -1px -1px;
|
203 |
+
}
|
204 |
+
|
205 |
+
.metaboxes-tab.yith-plugin-ui ul.metaboxes-tabs li.tabs {
|
206 |
+
border-bottom : 1px solid #fff;
|
207 |
+
}
|
208 |
+
|
209 |
+
.metaboxes-tab.yith-plugin-ui ul.metaboxes-tabs li a {
|
210 |
+
color : #336374;
|
211 |
+
padding : 10px 18px;
|
212 |
+
text-transform : uppercase;
|
213 |
+
font-weight : 600;
|
214 |
+
display : inline-block;
|
215 |
+
}
|
216 |
+
|
217 |
+
.metaboxes-tab.yith-plugin-ui ul.metaboxes-tabs li.tabs a {
|
218 |
+
color : #2a8db0;
|
219 |
}
|
220 |
|
221 |
/* sortable table posts */
|
222 |
|
223 |
#the-list.ui-sortable tr:hover {
|
224 |
+
cursor : move;
|
225 |
}
|
226 |
|
227 |
.the-metabox.preview {
|
228 |
+
float : none;
|
229 |
}
|
230 |
|
231 |
.metaboxes-tab .the-metabox.no-label.preview {
|
232 |
+
margin-left : 184px;
|
233 |
}
|
234 |
|
235 |
.metaboxes-tab .the-metabox.no-label.preview img {
|
236 |
+
box-shadow : 0 1px 8px rgba(0, 0, 0, 0.2);
|
237 |
}
|
238 |
|
239 |
/**************************************
|
249 |
.metaboxes-tab .yith-plugin-fw-text-input,
|
250 |
.metaboxes-tab .yith-plugin-fw-text-array-table,
|
251 |
.metaboxes-tab .yith-plugin-fw-textarea {
|
252 |
+
width : 400px;
|
253 |
+
max-width : 100%;
|
254 |
}
|
255 |
|
256 |
.metaboxes-tab.yith-plugin-ui input[type=number] {
|
257 |
+
width : auto;
|
258 |
+
min-width : 90px;
|
259 |
}
|
260 |
|
261 |
.metaboxes-tab.yith-plugin-ui p {
|
262 |
+
font-size : 14px;
|
263 |
}
|
264 |
|
265 |
.metaboxes-tab.yith-plugin-ui p.section-description {
|
266 |
|
267 |
+
margin : 0 20px 40px 18px;
|
268 |
}
|
269 |
|
270 |
.metaboxes-tab .yith-plugin-fw-text-array-table input[type=text] {
|
271 |
+
width : 100%;
|
272 |
}
|
273 |
|
274 |
.metaboxes-tab.yith-plugin-ui .yith-add-box h3 {
|
275 |
+
padding : 0 0 30px 0;
|
276 |
+
font-weight : 600;
|
277 |
+
margin : 0;
|
278 |
}
|
279 |
|
280 |
.metaboxes-tab.yith-plugin-ui .select2-container--default .select2-selection--single {
|
281 |
+
border : 0;
|
282 |
+
margin : 0;
|
283 |
}
|
284 |
|
285 |
/* wp editor */
|
286 |
.the-metabox.textarea-editor .mceIframeContainer {
|
287 |
+
background : #fff;
|
288 |
}
|
289 |
|
290 |
|
291 |
.the-metabox.textarea-editor label {
|
292 |
+
margin-top : 24px;
|
293 |
}
|
294 |
|
295 |
/* categories */
|
296 |
.categories-panel {
|
297 |
+
width : 30%;
|
298 |
+
float : left;
|
299 |
+
margin-right : 4px;
|
300 |
}
|
301 |
|
302 |
.categories-panel .box {
|
303 |
+
height : 200px;
|
304 |
+
border : 1px solid #dfdfdf;
|
305 |
+
background : #fff;
|
306 |
+
padding : 6px 10px;
|
307 |
+
overflow : auto;
|
308 |
}
|
309 |
|
310 |
.categories-panel ul {
|
311 |
+
list-style : none;
|
312 |
+
margin : 0;
|
313 |
}
|
314 |
|
315 |
.categories-panel ul li {
|
316 |
+
line-height : 19px;
|
317 |
+
margin : 0;
|
318 |
+
padding : 0;
|
319 |
+
word-wrap : break-word;
|
320 |
}
|
321 |
|
322 |
.categories-panel ul li label {
|
323 |
+
font-weight : normal !important;
|
324 |
+
margin-left : 0 !important;
|
325 |
}
|
326 |
|
327 |
.categories-panel input.newcategory {
|
328 |
+
width : 100%;
|
329 |
+
margin-bottom : 3px;
|
330 |
}
|
331 |
|
332 |
/* contact form */
|
333 |
.contactform_item {
|
334 |
+
border-style : solid;
|
335 |
+
border-width : 1px;
|
336 |
+
line-height : 1;
|
337 |
+
margin-bottom : 20px;
|
338 |
+
padding : 0;
|
339 |
+
background-color : #f5f5f5;
|
340 |
+
background-image : -moz-linear-gradient(center top, #f9f9f9, #f5f5f5);
|
341 |
+
border-color : #dfdfdf;
|
342 |
+
border-radius : 3px 3px 3px 3px;
|
343 |
+
box-shadow : 0 1px 0 #fff inset;
|
344 |
+
min-width : 255px;
|
345 |
+
position : relative;
|
346 |
}
|
347 |
|
348 |
.contactform_item .handlediv {
|
349 |
+
position : relative;
|
350 |
+
top : -4px;
|
351 |
}
|
352 |
|
353 |
.contactform_item h3 {
|
354 |
+
min-height : 21px;
|
355 |
+
margin : 13px;
|
356 |
}
|
357 |
|
358 |
.contactform_item .inside {
|
359 |
+
padding : 10px !important;
|
360 |
}
|
361 |
|
362 |
.contactform_item .deps {
|
363 |
+
display : none;
|
364 |
}
|
365 |
|
366 |
.contactform_item .addoptions p.option {
|
367 |
+
margin : 5px 0 5px 200px
|
368 |
}
|
369 |
|
370 |
.contactform_item .addoptions p label {
|
371 |
+
width : 80px !important;
|
372 |
}
|
373 |
|
374 |
.contactform_item .add-field-option {
|
375 |
+
margin-bottom : 10px !important;
|
376 |
}
|
377 |
|
378 |
.remove_item {
|
379 |
+
float : right;
|
380 |
}
|
381 |
|
382 |
.metabox-sortable-placeholder {
|
383 |
+
border : 1px dotted #dedede;
|
384 |
+
margin : 10px 0
|
385 |
}
|
386 |
|
387 |
/* features tab */
|
388 |
.featurestab_item {
|
389 |
+
border-style : solid;
|
390 |
+
border-width : 1px;
|
391 |
+
line-height : 1;
|
392 |
+
margin-bottom : 20px;
|
393 |
+
padding : 0;
|
394 |
+
background-color : #f5f5f5;
|
395 |
+
background-image : -moz-linear-gradient(center top, #f9f9f9, #f5f5f5);
|
396 |
+
border-color : #dfdfdf;
|
397 |
+
border-radius : 3px 3px 3px 3px;
|
398 |
+
box-shadow : 0 1px 0 #fff inset;
|
399 |
+
min-width : 255px;
|
400 |
+
position : relative;
|
401 |
}
|
402 |
|
403 |
.featurestab_item .handlediv {
|
404 |
+
position : relative;
|
405 |
+
top : -4px;
|
406 |
}
|
407 |
|
408 |
.featurestab_item h3 {
|
409 |
+
min-height : 21px
|
410 |
}
|
411 |
|
412 |
.featurestab_item .inside {
|
413 |
+
padding : 10px !important;
|
414 |
}
|
415 |
|
416 |
.featurestab_item .deps {
|
417 |
+
display : none;
|
418 |
}
|
419 |
|
420 |
.featurestab_item .addoptions p.option {
|
421 |
+
margin : 5px 0 5px 200px
|
422 |
}
|
423 |
|
424 |
.featurestab_item .addoptions p label {
|
425 |
+
width : 80px !important;
|
426 |
}
|
427 |
|
428 |
.featurestab_item .add-field-option {
|
429 |
+
margin-bottom : 10px !important;
|
430 |
}
|
431 |
|
432 |
.messages-panel.updated {
|
433 |
+
margin : 10px 0px 10px !important;
|
434 |
+
max-width : 1200px;
|
435 |
+
border-radius : 5px;
|
436 |
+
-webkit-box-sizing : border-box;
|
437 |
+
box-sizing : border-box;
|
438 |
}
|
439 |
|
440 |
.ui-widget-overlay {
|
441 |
+
background-image : none !important;
|
442 |
}
|
443 |
|
444 |
.the-metabox .icon_type {
|
445 |
+
width : 30%;
|
446 |
+
float : left;
|
447 |
+
margin-right : 40px
|
448 |
}
|
449 |
|
450 |
#post-type-settings .category-list label {
|
451 |
+
width : 187px;
|
452 |
}
|
453 |
|
454 |
.remove_cat {
|
455 |
+
float : right;
|
456 |
+
text-align : center;
|
457 |
+
display : block;
|
458 |
+
width : 20px;
|
459 |
+
height : 20px;
|
460 |
+
border-radius : 20px;
|
461 |
+
font-weight : bold;
|
462 |
+
font-size : 10px;
|
463 |
+
background : #efefef;
|
464 |
+
text-decoration : none;
|
465 |
}
|
466 |
|
467 |
/* typography */
|
468 |
.the-metabox.typography .select_wrapper.font-family {
|
469 |
+
width : 200px;
|
470 |
}
|
471 |
|
472 |
.the-metabox.typography .spinner_container {
|
473 |
+
float : left;
|
474 |
+
margin-right : 10px;
|
475 |
}
|
476 |
|
477 |
.the-metabox.typography .spinner_container input.number {
|
478 |
+
width : 50px !important;
|
479 |
+
-webkit-border-top-right-radius : 0px;
|
480 |
+
-webkit-border-bottom-right-radius : 0px;
|
481 |
+
-moz-border-radius-topright : 0px;
|
482 |
+
-moz-border-radius-bottomright : 0px;
|
483 |
+
border-top-right-radius : 0px;
|
484 |
+
border-bottom-right-radius : 0px;
|
485 |
}
|
486 |
|
487 |
/* number */
|
488 |
.the-metabox.number input.number {
|
489 |
+
width : 50px !important;
|
490 |
}
|
491 |
|
492 |
/* number */
|
493 |
.rm_number .number {
|
494 |
+
width : 70px;
|
495 |
+
text-align : right;
|
496 |
+
-webkit-border-top-right-radius : 0px;
|
497 |
+
-webkit-border-bottom-right-radius : 0px;
|
498 |
+
-moz-border-radius-topright : 0px;
|
499 |
+
-moz-border-radius-bottomright : 0px;
|
500 |
+
border-top-right-radius : 0px;
|
501 |
+
border-bottom-right-radius : 0px;
|
502 |
}
|
503 |
|
504 |
.spinner-wrapper {
|
505 |
+
position : relative;
|
506 |
+
height : 23px;
|
507 |
+
overflow : hidden;
|
508 |
}
|
509 |
|
510 |
.spinner-wrapper input.number {
|
511 |
+
float : left;
|
512 |
}
|
513 |
|
514 |
.spinner-wrapper .spinner-button {
|
515 |
+
cursor : pointer;
|
516 |
+
float : left;
|
517 |
+
position : absolute;
|
518 |
+
left : 69px;
|
519 |
+
width : 15px;
|
520 |
+
height : 12px;
|
521 |
+
border : 1px solid #dfdfdf;
|
522 |
+
background : #fff;
|
523 |
+
margin : 0;
|
524 |
+
padding : 0;
|
525 |
+
line-height : 9999px;
|
526 |
+
overflow : hidden;
|
527 |
+
background : url('../images/spinner.png') no-repeat center -11px
|
528 |
}
|
529 |
|
530 |
.spinner-wrapper .spinner-button.button-plus {
|
531 |
+
top : 0;
|
532 |
+
-webkit-border-top-right-radius : 3px !important;
|
533 |
+
-moz-border-radius-topright : 3px !important;
|
534 |
+
border-top-right-radius : 3px !important;
|
535 |
}
|
536 |
|
537 |
.spinner-wrapper .spinner-button.button-minus {
|
538 |
+
bottom : 0;
|
539 |
+
background-position : center -30px;
|
540 |
+
-webkit-border-bottom-right-radius : 3px !important;
|
541 |
+
-moz-border-radius-bottomright : 3px !important;
|
542 |
+
border-bottom-right-radius : 3px !important;
|
543 |
}
|
544 |
|
545 |
.spinner-wrapper .spinner-button.button-plus:active {
|
546 |
+
background-position : center 0px;
|
547 |
}
|
548 |
|
549 |
.spinner-wrapper .spinner-button.button-minus:active {
|
550 |
+
background-position : center -20px;
|
551 |
}
|
552 |
|
553 |
.rm_typography .spinner_container {
|
554 |
+
float : left;
|
555 |
+
margin-right : 10px;
|
556 |
}
|
557 |
|
558 |
.rm_typography .spinner-wrapper {
|
559 |
+
height : 28px;
|
560 |
}
|
561 |
|
562 |
.rm_typography .spinner-wrapper input.number {
|
563 |
+
height : 28px;
|
564 |
}
|
565 |
|
566 |
.rm_typography .spinner-wrapper .spinner-button.button-plus {
|
567 |
+
height : 15px;
|
568 |
+
background-position : center -10px;
|
569 |
}
|
570 |
|
571 |
.rm_typography .spinner-wrapper .spinner-button.button-minus {
|
572 |
+
height : 14px;
|
573 |
}
|
574 |
|
575 |
.the-metabox .spinner-wrapper .spinner-button {
|
576 |
+
left : 49px;
|
577 |
}
|
578 |
|
579 |
.the-metabox.typography .spinner-wrapper .spinner-button {
|
580 |
+
left : 35px;
|
581 |
}
|
582 |
|
583 |
/* images */
|
584 |
.the-metabox.images, .the-metabox.images label {
|
585 |
+
margin-left : 0;
|
586 |
+
display : block;
|
587 |
}
|
588 |
|
589 |
.the-metabox.images .slides-wrapper {
|
590 |
+
clear : both;
|
591 |
}
|
592 |
|
593 |
.the-metabox.images .slides-wrapper li {
|
594 |
+
position : relative;
|
595 |
}
|
596 |
|
597 |
.the-metabox.images a.delete {
|
598 |
+
display : block;
|
599 |
+
margin-left : 4px;
|
600 |
+
text-decoration : none;
|
601 |
+
font-weight : bold;
|
602 |
+
color : red;
|
603 |
+
position : absolute;
|
604 |
+
top : 0;
|
605 |
+
right : 0;
|
606 |
+
width : 10px;
|
607 |
+
height : 18px;
|
608 |
+
z-index : 10;
|
609 |
+
cursor : pointer !important;
|
610 |
}
|
611 |
|
612 |
/* wp editor */
|
613 |
.wp_themeSkin iframe {
|
614 |
+
background : #fff !important;
|
615 |
}
|
616 |
|
617 |
/* custom tabs */
|
618 |
.customtab_item {
|
619 |
+
border-style : solid;
|
620 |
+
border-width : 1px;
|
621 |
+
line-height : 1;
|
622 |
+
margin-bottom : 20px;
|
623 |
+
padding : 0;
|
624 |
+
background-color : #f5f5f5;
|
625 |
+
background-image : -moz-linear-gradient(center top, #f9f9f9, #f5f5f5);
|
626 |
+
border-color : #dfdfdf;
|
627 |
+
border-radius : 3px 3px 3px 3px;
|
628 |
+
box-shadow : 0 1px 0 #fff inset;
|
629 |
+
min-width : 255px;
|
630 |
+
position : relative;
|
631 |
}
|
632 |
|
633 |
.customtab_item .handlediv {
|
634 |
+
position : relative;
|
635 |
+
top : -4px;
|
636 |
}
|
637 |
|
638 |
.customtab_item h3 {
|
639 |
+
min-height : 21px
|
640 |
}
|
641 |
|
642 |
.customtab_item .inside {
|
643 |
+
padding : 10px !important;
|
644 |
}
|
645 |
|
646 |
.customtab_item .deps {
|
647 |
+
display : none;
|
648 |
}
|
649 |
|
650 |
.customtab_item .addoptions p.option {
|
651 |
+
margin : 5px 0 5px 200px
|
652 |
}
|
653 |
|
654 |
.customtab_item .addoptions p label {
|
655 |
+
width : 80px !important;
|
656 |
}
|
657 |
|
658 |
.customtab_item .add-field-option {
|
659 |
+
margin-bottom : 10px !important;
|
660 |
}
|
661 |
|
662 |
.customtab_item .remove_item {
|
663 |
+
float : right;
|
664 |
}
|
665 |
|
666 |
.metabox-sortable-placeholder {
|
667 |
+
border : 1px dotted #dedede;
|
668 |
+
margin : 10px 0
|
669 |
}
|
670 |
|
671 |
.the-metabox.customtabs {
|
672 |
+
margin-left : 0;
|
673 |
}
|
674 |
|
675 |
#customtab_item_sample {
|
676 |
+
display : none;
|
677 |
}
|
678 |
|
679 |
.the-metabox.customtabs .field-row {
|
680 |
+
margin-bottom : 10px;
|
681 |
}
|
682 |
|
683 |
#yit_custom_tabs label {
|
684 |
+
font-weight : normal;
|
685 |
+
width : auto;
|
686 |
+
float : none;
|
687 |
+
line-height : auto;
|
688 |
+
margin-left : 0;
|
689 |
}
|
690 |
|
691 |
.wp-admin p label input[type=radio] {
|
692 |
+
width : 16px;
|
693 |
+
margin-right : 10px;
|
694 |
+
margin-top : 3px;
|
695 |
}
|
696 |
|
697 |
.wp-admin .form-field._preset_onsale_icon_field label input[type=radio] {
|
698 |
+
margin-top : 0;
|
699 |
}
|
700 |
|
701 |
.the-metabox .spinner {
|
702 |
+
margin-top : 5px;
|
703 |
+
float : none;
|
704 |
}
|
705 |
|
706 |
/*sidebars*/
|
707 |
#choose-sidebars.choose {
|
708 |
+
margin-left : 0px;
|
709 |
}
|
710 |
|
711 |
#_active_page_options-container label, #_active_page_options-container p {
|
712 |
+
display : inline-block;
|
713 |
+
margin : 0px;
|
714 |
}
|
715 |
|
716 |
#_active_page_options-container label {
|
717 |
+
margin-right : 10px;
|
718 |
+
margin-top : 3px;
|
719 |
}
|
720 |
|
721 |
#_active_page_options-container {
|
722 |
+
float : right;
|
723 |
+
margin-right : 20px;
|
724 |
+
margin-top : 5px;
|
725 |
+
z-index : 9999 !important;
|
726 |
+
position : absolute;
|
727 |
+
right : 0;
|
728 |
}
|
729 |
|
730 |
/*-----------------------
|
731 |
* Colorpicker - fix issues in combination with third-party themes or plugin (Basel, VC Addons, ...)
|
732 |
*/
|
733 |
.metaboxes-tab .the-metabox.colorpicker {
|
734 |
+
display : block;
|
735 |
+
width : auto;
|
736 |
+
height : auto;
|
737 |
+
overflow : visible;
|
738 |
+
top : auto;
|
739 |
+
left : auto;
|
740 |
+
background : transparent;
|
741 |
+
position : static;
|
742 |
+
z-index : 1;
|
743 |
+
font-family : inherit;
|
744 |
}
|
745 |
|
746 |
.the-metabox.checkbox.checkboxgroup-start.clearfix {
|
747 |
+
margin : 40px 0 0 264px;
|
748 |
}
|
749 |
|
750 |
.the-metabox.checkbox.checkboxgroup.clearfix {
|
751 |
+
margin : 0 0 0 264px;
|
752 |
}
|
plugin-fw/assets/css/yit-plugin-panel.css
CHANGED
@@ -35,11 +35,22 @@
|
|
35 |
padding-top : 20px;
|
36 |
}
|
37 |
|
38 |
-
#plugin-fw-wc table.form-table, #yith-plugin-fw-panel table.form-table {
|
39 |
background-color : #fff;
|
40 |
margin-bottom : 20px;
|
41 |
}
|
42 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
43 |
#plugin-fw-wc table.form-table th, #yith-plugin-fw-panel table.form-table th {
|
44 |
padding : 20px;
|
45 |
}
|
@@ -49,6 +60,83 @@
|
|
49 |
margin : 0;
|
50 |
}
|
51 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
52 |
/* === Plugins Upgrader === */
|
53 |
|
54 |
.yit-plugin-changelog-wrapper {
|
@@ -409,7 +497,7 @@
|
|
409 |
|
410 |
#wpwrap h2.nav-tab-wrapper, #wpbody-content h2.nav-tab-wrapper {
|
411 |
border-bottom : 1px solid #ccc;
|
412 |
-
margin-right: 15px;
|
413 |
}
|
414 |
|
415 |
/* === YIT FRAMEWORK === */
|
@@ -421,8 +509,8 @@
|
|
421 |
|
422 |
/* === Panel Content and Container === */
|
423 |
.yit-admin-panel-container {
|
424 |
-
position
|
425 |
-
margin-right: 15px;
|
426 |
}
|
427 |
|
428 |
.yit-admin-panel-content-wrap {
|
@@ -456,6 +544,67 @@
|
|
456 |
margin : 0;
|
457 |
}
|
458 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
459 |
/* === Responsive === */
|
460 |
|
461 |
@media (max-width : 767px) {
|
35 |
padding-top : 20px;
|
36 |
}
|
37 |
|
38 |
+
#plugin-fw-wc table.form-table, #yith-plugin-fw-panel table.form-table, .yith-plugin-fw-panel-custom-tab-container {
|
39 |
background-color : #fff;
|
40 |
margin-bottom : 20px;
|
41 |
}
|
42 |
|
43 |
+
.yith-plugin-fw-panel-custom-tab-container {
|
44 |
+
padding : 20px;
|
45 |
+
box-sizing : border-box;
|
46 |
+
margin-right : 15px;
|
47 |
+
}
|
48 |
+
|
49 |
+
.yith-plugin-fw-panel-custom-tab-container > h2 {
|
50 |
+
border : none;
|
51 |
+
padding : 15px 0;
|
52 |
+
}
|
53 |
+
|
54 |
#plugin-fw-wc table.form-table th, #yith-plugin-fw-panel table.form-table th {
|
55 |
padding : 20px;
|
56 |
}
|
60 |
margin : 0;
|
61 |
}
|
62 |
|
63 |
+
|
64 |
+
/**
|
65 |
+
Post type Edit
|
66 |
+
*/
|
67 |
+
|
68 |
+
.yith-plugin-fw-wp-page-wrapper {
|
69 |
+
margin : 23px 20px 0 2px;
|
70 |
+
}
|
71 |
+
|
72 |
+
.yith-plugin-fw-wp-page-wrapper .notice,
|
73 |
+
.yith-plugin-fw-wp-page-wrapper div.updated,
|
74 |
+
.yith-plugin-fw-wp-page-wrapper div.error {
|
75 |
+
margin : 5px 15px 15px 0;
|
76 |
+
}
|
77 |
+
|
78 |
+
.yith-plugin-fw-wp-page-wrapper .wrap {
|
79 |
+
border : 1px solid #d8d8d8;
|
80 |
+
border-top : 0;
|
81 |
+
margin : 0 15px 0 0;
|
82 |
+
background : #fff;
|
83 |
+
padding : 20px;
|
84 |
+
box-sizing : border-box;
|
85 |
+
}
|
86 |
+
|
87 |
+
#wpwrap .yith-plugin-fw-wp-page-wrapper .yith-plugin-ui h2.nav-tab-wrapper, #wpbody-content .yith-plugin-fw-wp-page-wrapper .yith-plugin-ui h2.nav-tab-wrapper {
|
88 |
+
padding-bottom : 0;
|
89 |
+
}
|
90 |
+
|
91 |
+
.yith-plugin-fw-wp-page-wrapper .postbox {
|
92 |
+
box-shadow : none;
|
93 |
+
}
|
94 |
+
|
95 |
+
.yith-plugin-fw-wp-page-wrapper h1.nav-tab-wrapper, .yith-plugin-fw-wp-page-wrapper h2.nav-tab-wrapper, .yith-plugin-fw-wp-page-wrapper .nav-tab-wrapper {
|
96 |
+
padding-top : 9px;
|
97 |
+
padding-bottom : 0;
|
98 |
+
}
|
99 |
+
|
100 |
+
.yith-plugin-fw-wp-page-wrapper .wrap h1.wp-heading-inline {
|
101 |
+
color : #2a8db0;
|
102 |
+
font-size : 15px;
|
103 |
+
text-transform : uppercase;
|
104 |
+
font-weight : 600;
|
105 |
+
}
|
106 |
+
|
107 |
+
.yith-plugin-fw-wp-page-wrapper .wrap a.page-title-action,
|
108 |
+
.yith-plugin-fw-wp-page-wrapper .wrap a.page-title-action:active {
|
109 |
+
border-radius : 3px;
|
110 |
+
text-transform : uppercase;
|
111 |
+
box-shadow : none;
|
112 |
+
border : 0;
|
113 |
+
font-weight : 700;
|
114 |
+
font-size : 11px;
|
115 |
+
padding : 0 14px;
|
116 |
+
outline : none;
|
117 |
+
height : auto;
|
118 |
+
transition : all ease 0.3s;
|
119 |
+
text-shadow : none;
|
120 |
+
vertical-align : middle;
|
121 |
+
line-height : 26px;
|
122 |
+
display : inline-block;
|
123 |
+
text-decoration : none;
|
124 |
+
cursor : pointer;
|
125 |
+
background-color : #375f6b;
|
126 |
+
color : #fff;
|
127 |
+
margin-left: 10px !important;
|
128 |
+
}
|
129 |
+
|
130 |
+
.yith-plugin-fw-wp-page-wrapper .wrap a.page-title-action:hover {
|
131 |
+
border-color : #007694;
|
132 |
+
background : #007694;
|
133 |
+
color : #fff;
|
134 |
+
}
|
135 |
+
|
136 |
+
.yith-plugin-fw-wp-page-wrapper #wp-content-editor-tools {
|
137 |
+
background : transparent;
|
138 |
+
}
|
139 |
+
|
140 |
/* === Plugins Upgrader === */
|
141 |
|
142 |
.yit-plugin-changelog-wrapper {
|
497 |
|
498 |
#wpwrap h2.nav-tab-wrapper, #wpbody-content h2.nav-tab-wrapper {
|
499 |
border-bottom : 1px solid #ccc;
|
500 |
+
margin-right : 15px;
|
501 |
}
|
502 |
|
503 |
/* === YIT FRAMEWORK === */
|
509 |
|
510 |
/* === Panel Content and Container === */
|
511 |
.yit-admin-panel-container {
|
512 |
+
position : relative;
|
513 |
+
margin-right : 15px;
|
514 |
}
|
515 |
|
516 |
.yit-admin-panel-content-wrap {
|
544 |
margin : 0;
|
545 |
}
|
546 |
|
547 |
+
/**
|
548 |
+
* Sub Tabs
|
549 |
+
*/
|
550 |
+
.yith-plugin-ui .yith-plugin-fw-sub-tabs-nav {
|
551 |
+
background : #fff;
|
552 |
+
padding : 10px 20px;
|
553 |
+
box-sizing : border-box;
|
554 |
+
margin-right : 15px;
|
555 |
+
border-left : 1px solid #d8d8d8;
|
556 |
+
border-right : 1px solid #d8d8d8;
|
557 |
+
}
|
558 |
+
|
559 |
+
.yith-plugin-ui .yith-plugin-fw-sub-tabs-nav h3.nav-tab-wrapper {
|
560 |
+
text-transform : uppercase;
|
561 |
+
line-height : inherit;
|
562 |
+
font-weight : 600;
|
563 |
+
}
|
564 |
+
|
565 |
+
.yith-plugin-ui .yith-plugin-fw-sub-tabs-nav .nav-tab {
|
566 |
+
line-height : 1.71428571;
|
567 |
+
margin-left : 0;
|
568 |
+
margin-right : 0;
|
569 |
+
background-color : #fff;
|
570 |
+
color : #336374;
|
571 |
+
font-size : 13px;
|
572 |
+
padding : 8px 20px 9px;
|
573 |
+
border : 0;
|
574 |
+
border-left : 1px solid #d8d8d8;
|
575 |
+
border-top : 1px solid #d8d8d8;
|
576 |
+
}
|
577 |
+
|
578 |
+
.yith-plugin-ui .yith-plugin-fw-sub-tabs-nav .nav-tab .yith-nav-sub-tab__title,
|
579 |
+
.yith-plugin-ui .yith-plugin-fw-sub-tabs-nav .nav-tab .yith-nav-sub-tab__icon {
|
580 |
+
vertical-align : middle;
|
581 |
+
}
|
582 |
+
|
583 |
+
.yith-plugin-ui .yith-plugin-fw-sub-tabs-nav .nav-tab .yith-nav-sub-tab__icon {
|
584 |
+
margin-left : 8px;
|
585 |
+
font-size : 22px;
|
586 |
+
margin-right : -3px;
|
587 |
+
}
|
588 |
+
|
589 |
+
.yith-plugin-ui .yith-plugin-fw-sub-tabs-nav .nav-tab .yith-nav-sub-tab__icon:before {
|
590 |
+
color : inherit;
|
591 |
+
}
|
592 |
+
|
593 |
+
.yith-plugin-ui .yith-plugin-fw-sub-tabs-nav .nav-tab:last-child {
|
594 |
+
border-right : 1px solid #d8d8d8;
|
595 |
+
}
|
596 |
+
|
597 |
+
.yith-plugin-ui .yith-plugin-fw-sub-tabs-nav .yith-nav-sub-tab--highlight {
|
598 |
+
color : #fff;
|
599 |
+
background : #2a8db0;
|
600 |
+
}
|
601 |
+
|
602 |
+
.yith-plugin-ui .yith-plugin-fw-sub-tabs-nav .nav-tab-active {
|
603 |
+
color : #2a8db0;
|
604 |
+
background : #fff;
|
605 |
+
border-bottom : 1px solid #fff;
|
606 |
+
}
|
607 |
+
|
608 |
/* === Responsive === */
|
609 |
|
610 |
@media (max-width : 767px) {
|
plugin-fw/assets/css/yith-fields.css
CHANGED
@@ -1,44 +1,48 @@
|
|
1 |
.yith-plugin-fw span.description {
|
2 |
-
display: block;
|
3 |
-
margin-top: 5px;
|
4 |
-
font-size: 12px;
|
5 |
-
color: #777;
|
6 |
-
font-style: italic;
|
7 |
-
clear: both;
|
8 |
}
|
9 |
|
10 |
.yith-plugin-fw span.description.inline {
|
11 |
-
display: inline-block;
|
12 |
-
margin: 0 0 0 5px;
|
13 |
}
|
14 |
|
15 |
.yith-disabled {
|
16 |
-
opacity: 0.3;
|
17 |
-
pointer-events: none;
|
18 |
}
|
19 |
|
20 |
.yith-plugin-fw-field-wrapper:not(.yith-plugin-fw-title-field-wrapper) {
|
21 |
-
display: block;
|
22 |
-
width: 100%;
|
23 |
}
|
24 |
|
25 |
.yith-plugin-fw-field-wrapper span.desc {
|
26 |
-
display: block;
|
27 |
-
width: 100%;
|
28 |
}
|
29 |
|
30 |
.yith-plugin-fw-title-field-wrapper h3.title {
|
31 |
-
width: 100%;
|
32 |
padding: 0 !important;
|
33 |
}
|
34 |
|
35 |
.the-metabox .yith-plugin-fw-title-field-wrapper h3.title {
|
36 |
-
float: left;
|
37 |
}
|
38 |
|
39 |
.yith-plugin-fw span.color-alpha {
|
40 |
-
height:
|
|
|
|
|
|
|
41 |
}
|
|
|
42 |
.yith-plugin-fw .wp-color-result-text{
|
43 |
height: 100%;
|
44 |
}
|
@@ -51,10 +55,10 @@
|
|
51 |
.yith-plugin-ui input[type=password],
|
52 |
.woocommerce .yith-plugin-fw table.form-table input[type=text]:not(.select2-search__field),
|
53 |
.woocommerce .yith-plugin-fw table.form-table select {
|
54 |
-
width: 400px;
|
55 |
-
max-width: 100%;
|
56 |
-
height: 30px;
|
57 |
-
padding: 5px;
|
58 |
line-height: 1;
|
59 |
}
|
60 |
|
@@ -62,10 +66,10 @@
|
|
62 |
.woocommerce .yith-plugin-fw table.form-table input[type=text].yith-plugin-fw-colorpicker,
|
63 |
.yith-plugin-fw input[type=text].wp-color-picker,
|
64 |
.yith-plugin-fw input[type=text].yith-plugin-fw-colorpicker {
|
65 |
-
width: 6em;
|
66 |
-
max-width: none;
|
67 |
-
height: auto;
|
68 |
-
padding: 3px 5px;
|
69 |
}
|
70 |
|
71 |
.wp-core-ui .yith-plugin-fw-colorpicker-field-wrapper button{
|
@@ -74,350 +78,364 @@
|
|
74 |
|
75 |
.woocommerce .yith-plugin-fw table.form-table input[type=text].colorpick,
|
76 |
.yith-plugin-fw input[type=text].colorpick {
|
77 |
-
width: 6em;
|
78 |
-
max-width: none;
|
79 |
-
height: auto;
|
80 |
-
padding: 6px;
|
81 |
}
|
82 |
|
83 |
.yith-plugin-fw input.select2-search__field,
|
84 |
.yith-plugin-fw .select2-container .select2-search--inline .select2-search__field,
|
85 |
.woocommerce .yith-plugin-fw input.select2-search__field,
|
86 |
.woocommerce .yith-plugin-fw table.form-table input.select2-search__field {
|
87 |
-
padding: 3px;
|
88 |
}
|
89 |
|
90 |
.yith-plugin-fw .select2-container .select2-selection--single .select2-selection__rendered {
|
91 |
-
line-height: 27px;
|
92 |
}
|
93 |
|
94 |
.yith-plugin-fw textarea {
|
95 |
-
width: 400px;
|
96 |
-
max-width: 100%;
|
97 |
-
padding: 5px;
|
98 |
}
|
99 |
|
100 |
/* ------------- ICONS ------------- */
|
101 |
.yit-icons-manager-wrapper {
|
102 |
-
width: 100%;
|
103 |
-
max-width: 400px;
|
104 |
}
|
105 |
|
106 |
.yit-icons-manager-text {
|
107 |
-
width: 100%;
|
108 |
}
|
109 |
|
110 |
.yit-icons-manager-icon-text {
|
111 |
-
width: calc(100% - 35px) !important;
|
112 |
-
height: 30px;
|
113 |
-
float: left;
|
114 |
-
margin: 0;
|
115 |
}
|
116 |
|
117 |
.yit-icons-manager-icon-preview {
|
118 |
-
width: 30px;
|
119 |
-
height: 30px;
|
120 |
-
margin-right: 5px;
|
121 |
-
float: left;
|
122 |
-
padding-top: 6px;
|
123 |
-
box-sizing: border-box;
|
124 |
-
text-align: center;
|
125 |
-
background: #f1f1f1;
|
126 |
}
|
127 |
|
128 |
.yit-icons-manager-list-wrapper {
|
129 |
-
margin: 10px 0;
|
130 |
-
box-shadow: 0 0 0 1px #ddd;
|
131 |
}
|
132 |
|
133 |
ul.yit-icons-manager-list {
|
134 |
-
width: 100%;
|
135 |
-
height: 300px;
|
136 |
-
overflow-y: scroll;
|
137 |
-
margin: 0;
|
138 |
}
|
139 |
|
140 |
ul.yit-icons-manager-list li {
|
141 |
-
float: left;
|
142 |
-
width: 30px;
|
143 |
-
height: 30px;
|
144 |
-
padding-top: 6px;
|
145 |
-
box-sizing: border-box;
|
146 |
-
text-align: center;
|
147 |
-
background: #f1f1f1;
|
148 |
-
margin: 1px;
|
149 |
-
cursor: pointer;
|
150 |
}
|
151 |
|
152 |
ul.yit-icons-manager-list li:hover {
|
153 |
-
background: #c5dcf6;
|
154 |
}
|
155 |
|
156 |
ul.yit-icons-manager-list li.active {
|
157 |
-
background: #d4f0ff;
|
158 |
}
|
159 |
|
160 |
.yit-icons-manager-action-set-default {
|
161 |
-
margin-bottom: 0;
|
162 |
}
|
163 |
|
164 |
.yit-icons-manager-default-icon-preview {
|
165 |
-
height: 100%;
|
166 |
-
display: inline-block;
|
167 |
-
padding-left: 10px;
|
168 |
-
border-left: 1px solid #ccc;
|
169 |
-
margin-left: 10px;
|
170 |
}
|
171 |
|
172 |
/* ------- Text Array ------- */
|
173 |
.yith-plugin-fw-text-array-table td {
|
174 |
-
padding: 1px;
|
175 |
}
|
176 |
|
177 |
.yith-plugin-fw-text-array-table input[type=text],
|
178 |
.woocommerce table.form-table table.yith-plugin-fw-text-array-table input[type=text] {
|
179 |
-
width: 100%;
|
180 |
}
|
181 |
|
182 |
/* ------- Image Gallery ------- */
|
183 |
.yith-plugin-fw .image-gallery ul li {
|
184 |
-
display: inline-block;
|
185 |
-
width: 80px;
|
186 |
-
margin-left: 10px;
|
187 |
-
position: relative;
|
188 |
}
|
189 |
|
190 |
.yith-plugin-fw .image-gallery ul li img {
|
191 |
-
width: 80px;
|
192 |
-
border: 1px solid #ccc;
|
193 |
}
|
194 |
|
195 |
.yith-plugin-fw .image-gallery ul li ul {
|
196 |
-
position: absolute;
|
197 |
-
top: -6px;
|
198 |
-
right: -1px;
|
199 |
-
width: 20px;
|
200 |
-
height: 20px;
|
201 |
}
|
202 |
|
203 |
.yith-plugin-fw .image-gallery ul a.delete {
|
204 |
-
background: url(../images/x.png) no-repeat;
|
205 |
-
width: 20px;
|
206 |
-
height: 20px;
|
207 |
-
display: block;
|
208 |
-
text-indent: -99999px;
|
209 |
}
|
210 |
|
211 |
/* ------- OnOff ------- */
|
212 |
.yith-plugin-fw-onoff-container {
|
213 |
-
display: inline-block;
|
|
|
214 |
}
|
215 |
|
216 |
.yith-plugin-fw-onoff-container input {
|
217 |
-
display: none;
|
218 |
}
|
219 |
|
220 |
.yith-plugin-fw-onoff-container input + span {
|
221 |
-
cursor: pointer;
|
222 |
-
text-indent: -9999px;
|
223 |
-
display: block;
|
224 |
-
width: 36px;
|
225 |
-
line-height: 1;
|
226 |
-
height: 20px;
|
227 |
-
background: #a4a4a4;
|
228 |
-
border-radius: 24px;
|
229 |
-
position: relative;
|
230 |
-
transition: all 0.3s;
|
231 |
}
|
232 |
|
233 |
|
234 |
.yith-plugin-fw-onoff-container input + span:before {
|
235 |
-
content: '';
|
236 |
-
background: #fff;
|
237 |
-
width: 16px;
|
238 |
-
height: 16px;
|
239 |
-
border-radius: 50%;
|
240 |
-
position: absolute;
|
241 |
-
top: 2px;
|
242 |
-
left: 2px;
|
243 |
-
transition: all 0.3s;
|
244 |
}
|
245 |
|
246 |
.yith-plugin-fw-onoff-container input:checked + span,
|
247 |
.yith-plugin-fw-onoff-container input.onoffchecked + span {
|
248 |
-
background: #0073aa;
|
249 |
}
|
250 |
|
251 |
.yith-plugin-fw-onoff-container input:checked + span:before,
|
252 |
.yith-plugin-fw-onoff-container input.onoffchecked + span:before {
|
253 |
-
left: 18px;
|
254 |
}
|
255 |
|
256 |
/* ------- Preview ------- */
|
257 |
.yith-plugin-fw-preview-field {
|
258 |
-
max-height: 200px;
|
259 |
}
|
260 |
|
261 |
/* ------- Radio ------- */
|
262 |
.yith-plugin-fw-radio input[type=radio] {
|
263 |
-
margin: 0 3px 0 0;
|
264 |
}
|
265 |
|
266 |
.yith-plugin-fw-radio__row {
|
267 |
-
margin-bottom: 8px;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
268 |
}
|
269 |
|
270 |
/* ------- Sidebar Layout ------- */
|
271 |
.yith-plugin-fw-sidebar-layout input[type="radio"] {
|
272 |
-
display: none;
|
273 |
-
width: 0px;
|
274 |
}
|
275 |
|
276 |
.yith-plugin-fw-sidebar-layout input[type="radio"]:first-child {
|
277 |
-
margin-right: -2px;
|
278 |
}
|
279 |
|
280 |
.yith-plugin-fw-sidebar-layout input[type="radio"] + img {
|
281 |
-
border: 2px solid #fff;
|
282 |
-
padding: 1px;
|
283 |
}
|
284 |
|
285 |
.yith-plugin-fw-sidebar-layout input[type="radio"] + img:hover {
|
286 |
-
cursor: pointer;
|
287 |
}
|
288 |
|
289 |
.yith-plugin-fw-sidebar-layout input[checked] + img {
|
290 |
-
border: 2px solid #f2ad35;
|
291 |
-
padding: 1px;
|
292 |
}
|
293 |
|
294 |
.yith-plugin-fw-sidebar-layout select {
|
295 |
-
vertical-align: 12px;
|
296 |
}
|
297 |
|
298 |
.yit-admin-panel-content-wrap .yith-plugin-fw-sidebar-layout label {
|
299 |
-
font-weight: bold;
|
300 |
-
width: 200px;
|
301 |
-
float: left;
|
302 |
-
line-height: 23px;
|
303 |
-
margin-left: -230px;
|
304 |
}
|
305 |
|
306 |
/* ------- Slider ------- */
|
307 |
.yith-plugin-fw .slider {
|
308 |
-
padding-top: 20px;
|
309 |
-
}
|
310 |
-
|
311 |
-
.ui-slider .minCaption {
|
312 |
-
position: absolute;
|
313 |
-
right: 95%;
|
314 |
-
top: -6px;
|
315 |
-
margin-right: 11px;
|
316 |
-
}
|
317 |
-
|
318 |
-
.ui-slider .maxCaption {
|
319 |
-
position: absolute;
|
320 |
-
left: 95%;
|
321 |
-
top: -6px;
|
322 |
-
margin-left: 20px;
|
323 |
-
}
|
324 |
-
|
325 |
-
.ui-slider-horizontal .ui-slider-handle {
|
326 |
-
background: #fff;
|
327 |
-
border: 0px !important;
|
328 |
-
top: -12px !important;
|
329 |
-
border-radius: 50%;
|
330 |
-
width: 27px !important;
|
331 |
-
height: 27px !important;
|
332 |
-
box-sizing: border-box;
|
333 |
-
box-shadow: 0 1px 7px -1px rgba(0, 0, 0, 0.5);
|
334 |
-
font-size: 13px;
|
335 |
-
padding: 6px 0;
|
336 |
-
font-weight: 600;
|
337 |
-
color: #555;
|
338 |
-
text-align: center;
|
339 |
}
|
340 |
|
341 |
-
.
|
342 |
-
|
343 |
-
|
344 |
-
|
345 |
-
|
346 |
-
width: 90%;
|
347 |
-
margin: 15px 5% 20px 5%;
|
348 |
}
|
349 |
|
350 |
-
.
|
351 |
-
|
352 |
-
|
|
|
|
|
353 |
}
|
354 |
|
355 |
-
.
|
356 |
-
background: #
|
357 |
-
|
358 |
-
|
359 |
-
|
360 |
-
|
361 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
362 |
}
|
363 |
|
364 |
/* ------- Select2 ------- */
|
365 |
.yith-plugin-fw-select2-wrapper {
|
366 |
-
width: 400px;
|
367 |
}
|
368 |
|
369 |
/* ------- Textarea ------- */
|
370 |
.yith-plugin-fw-textarea-editor-field-wrapper {
|
371 |
-
max-width: 1000px;
|
372 |
-
clear: both;
|
373 |
}
|
374 |
|
375 |
.yith-plugin-fw-textarea-editor-field-wrapper textarea.wp-editor-area,
|
376 |
.woocommerce table.form-table .yith-plugin-fw-textarea-editor-field-wrapper textarea.wp-editor-area {
|
377 |
-
width: 100%;
|
378 |
}
|
379 |
|
380 |
/* ------- Buttons ------- */
|
381 |
.yith-plugin-fw-buttons-field-wrapper {
|
382 |
-
margin-top: 7px;
|
383 |
}
|
384 |
|
385 |
/* ------- Select Images ------- */
|
386 |
.yith-plugin-fw-select-images__list {
|
387 |
-
margin: 0;
|
388 |
-
display: flex;
|
389 |
-
flex-wrap: wrap;
|
390 |
}
|
391 |
|
392 |
.yith-plugin-fw-select-images__item {
|
393 |
-
width: calc(20% - 10px);
|
394 |
-
min-width: 150px;
|
395 |
-
margin: 0 10px 10px 0;
|
396 |
-
padding: 10px;
|
397 |
-
box-sizing: border-box;
|
398 |
-
cursor: pointer;
|
399 |
-
transition: all .3s;
|
400 |
-
border: 2px solid #eee;
|
401 |
-
display: flex;
|
402 |
-
flex-direction: column;
|
403 |
-
justify-content: space-between;
|
404 |
}
|
405 |
|
406 |
.yith-plugin-fw-select-images__item:hover,
|
407 |
.yith-plugin-fw-select-images__item.yith-plugin-fw-select-images__item--selected {
|
408 |
-
border-color: #07bcce;
|
409 |
}
|
410 |
|
411 |
.yith-plugin-fw-select-images__item__label {
|
412 |
-
text-align: center;
|
413 |
-
font-weight: 600;
|
414 |
-
margin-bottom: 10px;
|
415 |
}
|
416 |
|
417 |
.yith-plugin-fw-select-images__item img {
|
418 |
-
display: block;
|
419 |
-
max-width: 100%;
|
420 |
-
margin: 0 auto;
|
421 |
}
|
422 |
|
423 |
/****************
|
@@ -436,29 +454,29 @@ WordPress 5.3 with old panel fixes
|
|
436 |
YITH UI
|
437 |
****************/
|
438 |
@font-face {
|
439 |
-
font-family: 'yith-icon';
|
440 |
-
src: url('../fonts/yith-icon.eot?7ik896');
|
441 |
-
src: url('../fonts/yith-icon.eot?7ik896#iefix') format('embedded-opentype'),
|
442 |
url('../fonts/yith-icon.ttf?7ik896') format('truetype'),
|
443 |
url('../fonts/yith-icon.woff?7ik896') format('woff'),
|
444 |
url('../fonts/yith-icon.svg?7ik896#yith-icon') format('svg');
|
445 |
-
font-weight: normal;
|
446 |
-
font-style: normal;
|
447 |
}
|
448 |
|
449 |
[class^="icon-"], [class*=" icon-"][class^="yith-icon-"], [class*=" yith-icon-"] {
|
450 |
/* use !important to prevent issues with browser extensions that change fonts */
|
451 |
-
font-family: 'yith-icon' !important;
|
452 |
-
speak: none;
|
453 |
-
font-style: normal;
|
454 |
-
font-weight: normal;
|
455 |
-
font-variant: normal;
|
456 |
-
text-transform: none;
|
457 |
-
line-height: 1;
|
458 |
|
459 |
/* Better Font Rendering =========== */
|
460 |
-
-webkit-font-smoothing: antialiased;
|
461 |
-
-moz-osx-font-smoothing: grayscale;
|
462 |
}
|
463 |
|
464 |
.yith-icon-reply:before {
|
@@ -466,351 +484,351 @@ YITH UI
|
|
466 |
color: #757575;
|
467 |
}
|
468 |
.yith-icon-calendar_add:before {
|
469 |
-
content: "\e913";
|
470 |
-
color: #757575;
|
471 |
}
|
472 |
|
473 |
.yith-icon-calendar_money:before {
|
474 |
-
content: "\e914";
|
475 |
-
color: #757575;
|
476 |
}
|
477 |
|
478 |
.yith-icon-calendar2:before {
|
479 |
-
content: "\e915";
|
480 |
-
color: #757575;
|
481 |
}
|
482 |
|
483 |
.yith-icon-people:before {
|
484 |
-
content: "\e916";
|
485 |
-
color: #757575;
|
486 |
}
|
487 |
|
488 |
.yith-icon-shield_money:before {
|
489 |
-
content: "\e917";
|
490 |
-
color: #757575;
|
491 |
}
|
492 |
|
493 |
.yith-icon-time_check:before {
|
494 |
-
content: "\e918";
|
495 |
-
color: #757575;
|
496 |
}
|
497 |
|
498 |
.yith-icon-world_settings:before {
|
499 |
-
content: "\e919";
|
500 |
-
color: #757575;
|
501 |
}
|
502 |
|
503 |
.yith-icon-arrow_eye_closed:before {
|
504 |
-
content: "\e912";
|
505 |
-
color: #757575;
|
506 |
}
|
507 |
|
508 |
.yith-icon-arrow_eye:before {
|
509 |
-
content: "\e911";
|
510 |
-
color: #757575;
|
511 |
}
|
512 |
|
513 |
.yith-icon-reset:before {
|
514 |
-
content: "\e910";
|
515 |
-
color: #757575;
|
516 |
}
|
517 |
|
518 |
.yith-icon-drag:before {
|
519 |
-
content: "\e90f";
|
520 |
-
color: #757575;
|
521 |
}
|
522 |
|
523 |
.yith-icon-trash:before {
|
524 |
-
content: "\e90d";
|
525 |
-
color: #757575;
|
526 |
}
|
527 |
|
528 |
.yith-icon-info:before {
|
529 |
-
content: "\e90e";
|
530 |
-
color: #757575;
|
531 |
}
|
532 |
|
533 |
.yith-icon-arrow_down:before {
|
534 |
-
content: "\e900";
|
535 |
-
color: #757575;
|
536 |
}
|
537 |
|
538 |
.yith-icon-arrow_left:before {
|
539 |
-
content: "\e901";
|
540 |
-
color: #757575;
|
541 |
}
|
542 |
|
543 |
.yith-icon-arrow_right:before {
|
544 |
-
content: "\e902";
|
545 |
-
color: #757575;
|
546 |
}
|
547 |
|
548 |
.yith-icon-arrow_up:before {
|
549 |
-
content: "\e903";
|
550 |
-
color: #757575;
|
551 |
}
|
552 |
|
553 |
.yith-icon-calendar:before {
|
554 |
-
content: "\e904";
|
555 |
-
color: #757575;
|
556 |
}
|
557 |
|
558 |
.yith-icon-check:before {
|
559 |
-
content: "\e905";
|
560 |
-
color: #757575;
|
561 |
}
|
562 |
|
563 |
.yith-icon-close:before {
|
564 |
-
content: "\e906";
|
565 |
-
color: #757575;
|
566 |
}
|
567 |
|
568 |
.yith-icon-edit:before {
|
569 |
-
content: "\e907";
|
570 |
-
color: #757575;
|
571 |
}
|
572 |
|
573 |
.yith-icon-magnifier:before {
|
574 |
-
content: "\e908";
|
575 |
-
color: #757575;
|
576 |
}
|
577 |
|
578 |
.yith-icon-pencil:before {
|
579 |
-
content: "\e909";
|
580 |
-
color: #757575;
|
581 |
}
|
582 |
|
583 |
.yith-icon-plus:before {
|
584 |
-
content: "\e90a";
|
585 |
-
color: #757575;
|
586 |
}
|
587 |
|
588 |
.yith-icon-update:before {
|
589 |
-
content: "\e90b";
|
590 |
-
color: #757575;
|
591 |
}
|
592 |
|
593 |
.yith-icon-upload:before {
|
594 |
-
content: "\e90c";
|
595 |
-
color: #757575;
|
596 |
}
|
597 |
|
598 |
.yith-plugin-fw-banner {
|
599 |
-
width: 100%;
|
600 |
-
height: 75px;
|
601 |
-
background: url('../images/banner-premium.png');
|
602 |
}
|
603 |
|
604 |
.yith-plugin-fw-banner.yith-plugin-fw-banner-free {
|
605 |
-
height: 290px;
|
606 |
-
background: url('../images/banner-free.png') no-repeat;
|
607 |
}
|
608 |
|
609 |
.yith-plugin-fw-banner.yith-plugin-fw-banner-free h1 {
|
610 |
-
max-width: auto;
|
611 |
-
text-align: left;
|
612 |
-
|
613 |
-
padding-top: 15px;
|
614 |
-
padding-bottom: 8px;
|
615 |
}
|
616 |
|
617 |
.yith-plugin-fw-banner h1 {
|
618 |
-
text-transform: uppercase;
|
619 |
-
color: #0c5777;
|
620 |
-
font-size: 15px;
|
621 |
-
padding-left: 150px;
|
622 |
-
font-weight: 700;
|
623 |
-
text-align: left;
|
624 |
-
display: inline-block;
|
625 |
-
box-sizing: border-box;
|
626 |
}
|
627 |
|
628 |
.yith-plugin-fw-banner span {
|
629 |
-
font-style: italic;
|
630 |
-
display: block;
|
631 |
-
font-size: 15px;
|
632 |
-
color: #214249;
|
633 |
-
text-transform: none;
|
634 |
-
text-align: right;
|
635 |
}
|
636 |
|
637 |
.yith-plugin-fw-banner a,
|
638 |
.yith-plugin-fw-banner a:focus {
|
639 |
-
text-decoration: none;
|
640 |
-
outline: none;
|
641 |
-
box-shadow: none;
|
642 |
}
|
643 |
|
644 |
.yith-banners ul {
|
645 |
-
list-style: none;
|
646 |
-
margin-left: 10px;
|
647 |
}
|
648 |
|
649 |
.yith-banners ul li {
|
650 |
-
display: inline-block;
|
651 |
-
margin-left: 10px;
|
652 |
}
|
653 |
|
654 |
.yith-plugin-ui a {
|
655 |
-
outline: none;
|
656 |
-
box-shadow: none;
|
657 |
}
|
658 |
|
659 |
.yith-plugin-ui {
|
660 |
-
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
|
661 |
}
|
662 |
|
663 |
.yith-plugin-ui #wpwrap h2.nav-tab-wrapper, .yith-plugin-ui #wpbody-content h2.nav-tab-wrapper {
|
664 |
-
margin-top: 10px;
|
665 |
}
|
666 |
|
667 |
.yith-plugin-ui .nav-tab {
|
668 |
-
margin-left: 0px;
|
669 |
-
margin-right: 2px;
|
670 |
-
background-color: #336374;
|
671 |
-
color: #fff;
|
672 |
-
font-size: 15px;
|
673 |
-
padding: 7px 20px;
|
674 |
-
border: 0;
|
675 |
}
|
676 |
|
677 |
.yith-plugin-ui .nav-tab:first-child {
|
678 |
-
border-left: 1px solid #d9d9d9;
|
679 |
}
|
680 |
|
681 |
.yith-plugin-ui .nav-tab.yith-premium {
|
682 |
-
background-color: #be421c;
|
683 |
}
|
684 |
|
685 |
.yith-plugin-ui .nav-tab-active {
|
686 |
-
background-color: #fff;
|
687 |
-
color: #336374;
|
688 |
-
border-bottom: 1px solid #fff;
|
689 |
}
|
690 |
|
691 |
.yith-plugin-ui .nav-tab-active.yith-premium {
|
692 |
-
background-color: #fff;
|
693 |
-
color: #be421c;
|
694 |
}
|
695 |
|
696 |
.yith-plugin-ui #plugin-fw-wc {
|
697 |
-
padding-top: 0px;
|
698 |
}
|
699 |
|
700 |
.yith-plugin-ui .form-table td {
|
701 |
-
padding: 15px 20px;
|
702 |
}
|
703 |
|
704 |
.yith-plugin-ui.metaboxes-tab label {
|
705 |
-
color: #33373b;
|
706 |
-
font-size: 14px;
|
707 |
-
margin-left: -248px;
|
708 |
}
|
709 |
|
710 |
.yith-plugin-ui.metaboxes-tab .the-metabox {
|
711 |
-
margin: 40px 0 40px 290px;
|
712 |
-
margin-left: 264px;
|
713 |
}
|
714 |
|
715 |
.yith-plugin-ui.metaboxes-tab label {
|
716 |
-
width: 200px;
|
717 |
-
font-weight: 600;
|
718 |
}
|
719 |
|
720 |
.yith-plugin-ui span.description {
|
721 |
-
color: #716269;
|
722 |
-
font-size: 14px;
|
723 |
-
font-style: normal;
|
724 |
-
font-weight: 400;
|
725 |
-
margin-top: 15px;
|
726 |
-
margin-left: 0;
|
727 |
}
|
728 |
|
729 |
#wpwrap .yith-plugin-ui h2.nav-tab-wrapper, #wpbody-content .yith-plugin-ui h2.nav-tab-wrapper {
|
730 |
-
border: 0;
|
731 |
-
border-bottom: 1px solid #ccc;
|
732 |
-
margin-right: 15px;
|
733 |
-
margin-bottom: 0;
|
734 |
-
background-color: transparent;
|
735 |
-
padding-left: 0;
|
736 |
}
|
737 |
|
738 |
.yith-plugin-ui #plugin-fw-wc table.form-table,
|
739 |
.yith-plugin-ui #yith-plugin-fw-panel table.form-table,
|
740 |
.yith-plugin-ui table.form-table {
|
741 |
-
border: 1px solid #d8d8d8;
|
742 |
-
border-top: 0;
|
743 |
-
margin-bottom: 40px;
|
744 |
}
|
745 |
|
746 |
.yith-plugin-ui #wpwrap h2.nav-tab-wrapper, .yith-plugin-ui #wpbody-content h2.nav-tab-wrapper {
|
747 |
-
background-color: transparent;
|
748 |
-
border: 0;
|
749 |
-
text-transform: none;
|
750 |
-
border-bottom: 1px solid #ddd;
|
751 |
}
|
752 |
|
753 |
.yith-plugin-ui h2 {
|
754 |
-
color: #2a8db0;
|
755 |
-
font-size: 15px;
|
756 |
-
text-transform: uppercase;
|
757 |
-
border: 1px solid #d8d8d8;
|
758 |
-
border-bottom: 0;
|
759 |
-
background-color: #fff;
|
760 |
-
padding: 35px 20px;
|
761 |
-
margin: 0px;
|
762 |
}
|
763 |
|
764 |
.yith-plugin-ui .yith-plugin-fw-custom-tab h2 {
|
765 |
-
border: 0px solid #d8d8d8;
|
766 |
-
padding-left: 0;
|
767 |
}
|
768 |
|
769 |
.yith-plugin-ui #plugin-fw-wc table.form-table th, #yith-plugin-fw-panel table.form-table th.titledesc, .yith-plugin-ui #plugin-fw-wc table.form-table td, #yith-plugin-fw-panel table.form-table td.forminp {
|
770 |
-
padding: 30px 20px;
|
771 |
}
|
772 |
.yith-plugin-ui #plugin-fw-wc table.form-table tr.toggle-element-fixed td, #yith-plugin-fw-panel table.form-table tr.toggle-element-fixed td.forminp {
|
773 |
padding: 0 20px 30px;
|
774 |
}
|
775 |
.yith-plugin-ui #plugin-fw-wc h2 + div {
|
776 |
-
background: #fff;
|
777 |
-
border-left: 1px solid #d9d9d9;
|
778 |
-
border-right: 1px solid #d9d9d9;
|
779 |
-
margin: -20px 0 0 0;
|
780 |
-
padding-left: 20px;
|
781 |
-
padding-bottom: 5px;
|
782 |
}
|
783 |
|
784 |
.yith-plugin-ui #plugin-fw-wc h2 + div p, .yith-plugin-ui p.info-box {
|
785 |
-
background: #f1f1f1;
|
786 |
-
font-size: 14px;
|
787 |
-
font-weight: 700;
|
788 |
-
width: 40%;
|
789 |
-
display: block;
|
790 |
-
padding: 15px;
|
791 |
-
margin-bottom: 0;
|
792 |
}
|
793 |
|
794 |
.yith-plugin-ui #plugin-fw-wc h2 + div p:before, .yith-plugin-ui p.info-box:before {
|
795 |
-
content: "\e90e";
|
796 |
-
font-family: yith-icon;
|
797 |
-
font-size: 30px;
|
798 |
-
font-weight: normal;
|
799 |
-
display: block;
|
800 |
-
margin-top: -5px;
|
801 |
-
float: left;
|
802 |
-
margin-right: 15px;
|
803 |
}
|
804 |
|
805 |
.yith-plugin-ui h2:first-child {
|
806 |
-
border-top: 0;
|
807 |
}
|
808 |
|
809 |
/*** Icon ***/
|
810 |
.yith-plugin-ui span.yith-icon {
|
811 |
-
margin-left: -36px;
|
812 |
-
line-height: 36px;
|
813 |
-
font-size: 20px;
|
814 |
}
|
815 |
|
816 |
/*** General Input Style ***/
|
@@ -831,65 +849,65 @@ YITH UI
|
|
831 |
.woocommerce .yith-plugin-fw table.form-table input[type=password],
|
832 |
.woocommerce.yith-plugin-fw-panel .yith-plugin-ui table.form-table input[type=number],
|
833 |
.woocommerce.yith-plugin-fw-panel .yith-plugin-ui table.form-table input[type=text] {
|
834 |
-
border: 1px solid #d8d8d8;
|
835 |
-
border-radius: 8px;
|
836 |
-
padding: 8px 10px;
|
837 |
-
height: 38px;
|
838 |
-
min-width: 90px;
|
839 |
-
box-shadow: none;
|
840 |
-
color: #716269;
|
841 |
}
|
842 |
|
843 |
.yith-plugin-ui textarea,
|
844 |
.woocommerce.yith-plugin-fw-panel .yith-plugin-ui table.form-table textarea {
|
845 |
-
height: auto;
|
846 |
}
|
847 |
|
|
|
848 |
.yith-plugin-ui table.form-table input[type=text].wp-color-picker,
|
849 |
.woocommerce.yith-plugin-fw-panel .yith-plugin-ui table.form-table input[type=text].wp-color-picker {
|
850 |
-
|
851 |
-
|
852 |
-
|
853 |
-
|
854 |
-
|
855 |
-
|
856 |
}
|
857 |
|
858 |
.yith-plugin-ui .search-box input[name="s"] {
|
859 |
-
height: 35px;
|
860 |
}
|
861 |
|
862 |
.woocommerce.yith-plugin-fw-panel .yith-plugin-ui table.form-table input[type=text].small-text,
|
863 |
.yith-plugin-ui input[type=text].small-text {
|
864 |
-
width: 100px;
|
865 |
-
height: 25px;
|
866 |
-
border: 1px solid #d9d9d9;
|
867 |
}
|
868 |
|
869 |
.yith-plugin-ui textarea {
|
870 |
-
height: auto;
|
871 |
-
padding: 8px;
|
872 |
}
|
873 |
|
874 |
.yith-plugin-ui select:focus,
|
875 |
.yith-plugin-ui input:focus {
|
876 |
-
border-color: #a7d9ec !important;
|
877 |
}
|
878 |
|
879 |
.woocommerce .yith-plugin-ui table.form-table select,
|
880 |
.yith-plugin-ui select {
|
881 |
-
-webkit-appearance: none;
|
882 |
-
line-height: 1.2em;
|
883 |
-
min-height: 35px;
|
884 |
-
background: url("../images/arrow_down.svg") no-repeat right center;
|
885 |
-
background-size: 35px 13px;
|
886 |
-
border-radius: 8px;
|
887 |
-
padding-left: 10px;
|
888 |
}
|
889 |
|
890 |
.yith-plugin-ui .form-table th {
|
891 |
-
width: 200px;
|
892 |
-
padding-right: 50px;
|
893 |
}
|
894 |
|
895 |
/** BUTTONS **/
|
@@ -903,24 +921,24 @@ YITH UI
|
|
903 |
.yith-plugin-ui .yith-plugin-fw-deselect-all,
|
904 |
.yith-plugin-ui .yith-plugin-fw-upload-button,
|
905 |
.yith-plugin-ui .yith-plugin-fw-upload-button-reset {
|
906 |
-
border-radius: 3px;
|
907 |
-
text-transform: uppercase;
|
908 |
-
box-shadow: none;
|
909 |
-
border: 0;
|
910 |
-
font-weight: 700;
|
911 |
-
font-size: 11px;
|
912 |
-
padding: 0px 14px;
|
913 |
-
outline: none;
|
914 |
-
height: auto;
|
915 |
-
transition: all ease 0.3s;
|
916 |
-
background-color: #d6d6d6;
|
917 |
-
color: #656565;
|
918 |
-
text-shadow: none;
|
919 |
-
vertical-align: middle;
|
920 |
-
line-height: 26px;
|
921 |
-
display: inline-block;
|
922 |
-
text-decoration: none;
|
923 |
-
cursor: pointer;
|
924 |
}
|
925 |
|
926 |
.wp-core-ui .yith-plugin-ui .button-secondary.yith-plugin-fw-upload-button-reset,
|
@@ -928,7 +946,7 @@ YITH UI
|
|
928 |
.yith-plugin-ui .yith-plugin-fw-upload-button-reset,
|
929 |
.yith-plugin-ui .button-secondary.yith-plugin-fw-upload-button-reset,
|
930 |
.yith-plugin-ui .button-secondary.yith-plugin-fw-upload-button {
|
931 |
-
height: 38px;
|
932 |
}
|
933 |
|
934 |
.wp-core-ui .yith-plugin-ui .button:focus,
|
@@ -938,28 +956,28 @@ YITH UI
|
|
938 |
.yith-plugin-ui .yith-edit-button:focus,
|
939 |
.yith-plugin-ui .yith-update-button:focus,
|
940 |
.wp-core-ui .yith-plugin-ui .button-secondary:focus {
|
941 |
-
outline: none;
|
942 |
-
box-shadow: none;
|
943 |
}
|
944 |
|
945 |
.wp-core-ui .yith-plugin-ui .button-xl {
|
946 |
-
padding: 0px 20px;
|
947 |
-
font-size: 14px;
|
948 |
-
line-height: 38px;
|
949 |
-
display: inline-block;
|
950 |
-
font-weight: 600;
|
951 |
}
|
952 |
|
953 |
/** button with inside a span with icon class */
|
954 |
.yith-plugin-ui .button-secondary span.yith-icon {
|
955 |
-
margin-left: 0px;
|
956 |
-
margin-right: 10px;
|
957 |
-
line-height: normal;
|
958 |
}
|
959 |
|
960 |
.yith-plugin-ui .button-secondary span.yith-icon:before {
|
961 |
-
color: #656565;
|
962 |
-
font-size: 15px;
|
963 |
}
|
964 |
|
965 |
|
@@ -968,24 +986,24 @@ YITH UI
|
|
968 |
.yith-plugin-ui .yith-save-button:hover,
|
969 |
.wp-core-ui .yith-plugin-ui .button-secondary:hover,
|
970 |
.yith-plugin-ui .yith-plugin-fw-upload-button-reset:hover {
|
971 |
-
background-color: #cacaca;
|
972 |
-
color: #515151;
|
973 |
}
|
974 |
|
975 |
.wp-core-ui .yith-plugin-ui .button-primary,
|
976 |
.yith-plugin-ui .button-secondary.yith-plugin-fw-select-all,
|
977 |
.yith-plugin-ui .button-secondary.yith-plugin-fw-upload-button {
|
978 |
-
background-color: #007694;
|
979 |
-
color: #fff;
|
980 |
}
|
981 |
|
982 |
|
983 |
.yith-plugin-ui .yith-add-button,
|
984 |
.wp-core-ui .yith-plugin-ui .button-primary:focus,
|
985 |
.wp-core-ui .yith-plugin-ui .button-primary:hover {
|
986 |
-
background-color: #375f6b;
|
987 |
-
color: #fff;
|
988 |
-
cursor: pointer;
|
989 |
}
|
990 |
|
991 |
|
@@ -994,11 +1012,11 @@ YITH UI
|
|
994 |
.yith-plugin-ui .button-secondary.yith-plugin-fw-select-all:hover,
|
995 |
.yith-plugin-ui .button-secondary.yith-plugin-fw-select-all:focus,
|
996 |
.yith-plugin-ui .yith-plugin-fw-upload-button:hover {
|
997 |
-
border-color: #007694;
|
998 |
-
background: #007694;
|
999 |
-
color: #fff;
|
1000 |
-
line-height: 26px;
|
1001 |
-
margin-left: 0;
|
1002 |
}
|
1003 |
|
1004 |
.yith-plugin-ui .button-primary:before,
|
@@ -1007,608 +1025,572 @@ YITH UI
|
|
1007 |
.yith-plugin-ui .yith-edit-button:before,
|
1008 |
.yith-plugin-ui .yith-update-button:before,
|
1009 |
.yith-plugin-ui .button-secondary:before {
|
1010 |
-
font-family: 'yith-icon';
|
1011 |
-
font-size: 10px;
|
1012 |
-
font-weight: 700;
|
1013 |
-
margin-right: 10px;
|
1014 |
-
vertical-align: bottom;
|
1015 |
-
display: inline-block;
|
1016 |
}
|
1017 |
|
1018 |
/** yith-edit-button **/
|
1019 |
.yith-plugin-ui .yith-edit-button {
|
1020 |
-
background-color: #7f9298;
|
1021 |
-
color: #fff;
|
1022 |
}
|
1023 |
|
1024 |
.yith-plugin-ui .yith-edit-button:focus,
|
1025 |
.yith-plugin-ui .yith-edit-button:hover {
|
1026 |
-
background-color: #718085;
|
1027 |
-
color: #fff;
|
1028 |
}
|
1029 |
|
1030 |
.yith-plugin-ui .yith-edit-button:before {
|
1031 |
-
content: "\e907";
|
1032 |
}
|
1033 |
|
1034 |
/** yith-update-button **/
|
1035 |
.yith-plugin-ui .yith-update-button {
|
1036 |
-
background-color: #94aa09;
|
1037 |
-
color: #fff;
|
1038 |
}
|
1039 |
|
1040 |
.yith-plugin-ui .yith-update-button:focus,
|
1041 |
.yith-plugin-ui .yith-update-button:hover {
|
1042 |
-
background-color: #7a9009;
|
1043 |
-
color: #fff;
|
1044 |
}
|
1045 |
|
1046 |
.yith-plugin-ui .yith-update-button:before {
|
1047 |
-
content: "\e90b";
|
1048 |
-
font-size: 15px;
|
1049 |
}
|
1050 |
|
1051 |
/** yith-save-button **/
|
1052 |
|
1053 |
.yith-plugin-ui .yith-save-button {
|
1054 |
-
background-color: #267390;
|
1055 |
-
color: #fff;
|
1056 |
}
|
1057 |
|
1058 |
.yith-plugin-ui .yith-save-button:focus,
|
1059 |
.yith-plugin-ui .yith-save-button:hover {
|
1060 |
-
background-color: #1c4863;
|
1061 |
-
color: #fff;
|
1062 |
}
|
1063 |
|
1064 |
|
1065 |
/** yith-remove-button **/
|
1066 |
|
1067 |
.yith-plugin-ui .button-secondary.yith-remove-button:before {
|
1068 |
-
content: "\e90d";
|
1069 |
-
font-size: 15px;
|
1070 |
}
|
1071 |
|
1072 |
|
1073 |
/** yith-add-button **/
|
1074 |
.yith-plugin-ui .yith-add-button:before {
|
1075 |
-
content: "\e90a";
|
1076 |
}
|
1077 |
|
1078 |
.yith-plugin-ui .yith-add-button.closed {
|
1079 |
-
background-color: #fff;
|
1080 |
-
color: #375f6b;
|
1081 |
-
border: 1px solid #375f6b;
|
1082 |
}
|
1083 |
|
1084 |
.yith-plugin-ui .yith-add-button.closed:before {
|
1085 |
-
content: "\e906";
|
1086 |
}
|
1087 |
|
1088 |
|
1089 |
/** yith-plugin-fw-upload-button **/
|
1090 |
.yith-plugin-ui button.yith-plugin-fw-upload-button:before {
|
1091 |
-
content: "\e90c";
|
1092 |
-
font-family: 'yith-icon';
|
1093 |
-
font-size: 19px;
|
1094 |
-
font-weight: 400;
|
1095 |
-
margin-right: 10px;
|
1096 |
-
vertical-align: middle;
|
1097 |
-
display: inline-block;
|
1098 |
}
|
1099 |
|
1100 |
/** SELECT 2 **/
|
1101 |
.yith-plugin-ui .select2-container,
|
1102 |
.yith-plugin-ui .select2-selection--single {
|
1103 |
-
height: auto;
|
1104 |
-
padding: 2px;
|
1105 |
-
outline: none;
|
1106 |
}
|
1107 |
|
1108 |
.yith-plugin-ui .select2-selection--single {
|
1109 |
-
margin: 0;
|
1110 |
-
border: 0;
|
1111 |
}
|
1112 |
|
1113 |
/* old panel*/
|
1114 |
|
1115 |
-
.yith-plugin-ui span.select2.select2-container.select2-container--default
|
1116 |
-
|
1117 |
-
border
|
|
|
1118 |
}
|
1119 |
|
1120 |
.yith-plugin-ui span.select2.select2-container.select2-container--default:hover,
|
1121 |
.yith-plugin-ui span.select2.select2-container.select2-container--default:active,
|
1122 |
.yith-plugin-ui span.select2.select2-container.select2-container--default:focus {
|
1123 |
-
border-color: #a7d9ec;
|
1124 |
}
|
1125 |
|
1126 |
.yith-plugin-ui .select2-container--default .select2-selection--multiple .select2-selection__choice__remove {
|
1127 |
-
color: #fff;
|
1128 |
}
|
1129 |
|
1130 |
.woocommerce.yith-plugin-fw-panel .yith-plugin-ui table.form-table input[type=text].select2-search__field,
|
1131 |
.yith-plugin-ui .yith-plugin-fw table.form-table input.select2-search__field {
|
1132 |
-
border: 0;
|
1133 |
-
padding: 0;
|
1134 |
-
height: initial;
|
1135 |
}
|
1136 |
|
1137 |
.yith-plugin-ui .select2-container--default .select2-selection--multiple .select2-selection__choice,
|
1138 |
.yith-plugin-ui .select2-selection__choice {
|
1139 |
-
color: #fff;
|
1140 |
-
background-color: #4e8ba2;
|
1141 |
-
border-radius: 12px;
|
1142 |
-
padding: 3px 11px;
|
1143 |
-
border-color: #
|
1144 |
-
font-size: 13px;
|
1145 |
}
|
1146 |
|
1147 |
.yith-plugin-ui .select2-container--default .select2-selection--single .select2-selection__arrow:before {
|
1148 |
-
content: "\e900";
|
1149 |
-
font-family: 'yith-icon' !important;
|
1150 |
-
line-height: 36px;
|
1151 |
-
color: #d9d9d9;
|
1152 |
}
|
1153 |
|
1154 |
.yith-plugin-ui .select2-container--default .select2-selection--single .select2-selection__arrow b {
|
1155 |
-
display: none;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1156 |
}
|
1157 |
|
1158 |
-
.yith-plugin-
|
1159 |
-
|
1160 |
-
.yith-plugin-fw-panel .select2-container--open .select2-dropdown--below,
|
1161 |
-
.yith-plugin-fw-panel .select2-container--open .select2-dropdown--above {
|
1162 |
-
margin-top: 10px;
|
1163 |
-
border-radius: 8px;
|
1164 |
-
box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.12), 0 2px 10px 0 rgba(0, 0, 0, 0.12) !important;
|
1165 |
}
|
1166 |
|
1167 |
-
.yith-plugin-
|
1168 |
-
.yith-plugin-fw-
|
1169 |
-
|
1170 |
}
|
1171 |
|
1172 |
-
.yith-plugin-
|
1173 |
-
|
1174 |
-
|
1175 |
-
.yith-plugin-fw-panel .select2-container--default.select2-container--open.select2-container--above .select2-selection--single {
|
1176 |
-
border-radius: 8px;
|
1177 |
}
|
1178 |
|
1179 |
-
.yith-plugin-
|
1180 |
-
.yith-plugin-fw-
|
1181 |
-
border-
|
1182 |
-
border-
|
1183 |
}
|
1184 |
-
|
1185 |
-
.yith-plugin-fw-
|
1186 |
-
|
1187 |
-
.yith-plugin-ui .select2-results .select2-results__option:last-child,
|
1188 |
-
.yith-plugin-fw-panel .select2-results .select2-results__group,
|
1189 |
-
.yith-plugin-fw-panel .select2-results .select2-results__option:last-child,
|
1190 |
-
.yith-plugin-ui .select2-results .select2-results__group,
|
1191 |
-
.yith-plugin-ui .select2-results .select2-results__option:last-child,
|
1192 |
-
.yith-plugin-fw-panel .select2-results .select2-results__group,
|
1193 |
-
.yith-plugin-fw-panel .select2-results .select2-results__option:last-child {
|
1194 |
-
border-bottom-left-radius: 8px;
|
1195 |
-
border-bottom-right-radius: 8px;
|
1196 |
}
|
1197 |
|
1198 |
-
.yith-plugin-
|
1199 |
-
|
|
|
1200 |
}
|
1201 |
-
|
1202 |
-
.yith-plugin-
|
1203 |
-
|
1204 |
-
|
1205 |
-
|
1206 |
-
.yith-plugin-ui .select2-container--default .select2-results__option--highlighted[data-selected],
|
1207 |
-
.yith-plugin-fw-panel .select2-container--default .select2-results__option--highlighted[aria-selected],
|
1208 |
-
.yith-plugin-fw-panel .select2-container--default .select2-results__option--highlighted[data-selected] {
|
1209 |
-
background-color: #e8eff1;
|
1210 |
-
color: #4e8ba2;
|
1211 |
-
outline: none;
|
1212 |
}
|
1213 |
|
1214 |
.yith-plugin-ui .select2-container--default .select2-selection--multiple .select2-selection__choice__remove,
|
1215 |
.yith-plugin-fw-panel .select2-container--default .select2-selection--multiple .select2-selection__choice__remove {
|
1216 |
-
float: right;
|
1217 |
-
padding-left: 15px;
|
1218 |
-
text-indent: -9999px;
|
1219 |
}
|
1220 |
|
1221 |
|
1222 |
.select2-container--default .select2-selection--multiple .select2-selection__choice__remove:after,
|
1223 |
.woocommerce .yith-plugin-ui .select2-container--default .select2-selection--multiple .select2-selection__choice__remove:after,
|
1224 |
.yith-plugin-ui .select2-container--default .select2-selection--multiple .select2-selection__choice__remove:after {
|
1225 |
-
float: right;
|
1226 |
-
color: #fff;
|
1227 |
-
content: "\e906";
|
1228 |
-
font-family: 'yith-icon' !important;
|
1229 |
-
font-size: 9px;
|
1230 |
-
line-height: 21px;
|
1231 |
-
text-indent: 0;
|
1232 |
}
|
1233 |
|
1234 |
.select2-container--default .select2-selection--multiple .select2-selection__choice__remove:after {
|
1235 |
-
color: #000;
|
1236 |
}
|
1237 |
|
1238 |
.yith-plugin-ui .select2-container--default .select2-selection--multiple .select2-selection__choice__remove:after
|
1239 |
.yith-plugin-fw-panel .select2-container--default .select2-selection--multiple .select2-selection__choice__remove:after {
|
1240 |
-
color: #000;
|
1241 |
}
|
1242 |
|
1243 |
.yith-plugin-ui .select2-container .select2-selection--multiple,
|
1244 |
.yith-plugin-ui .select2-container--default.select2-container--focus .select2-selection--multiple {
|
1245 |
-
border: 0;
|
1246 |
}
|
1247 |
|
1248 |
.yith-plugin-fw .select2-search input[type=text] {
|
1249 |
-
border: 0;
|
1250 |
-
padding: 0;
|
1251 |
-
height: auto;
|
1252 |
}
|
1253 |
|
1254 |
.yith-plugin-ui .yith-plugin-fw-select-field-wrapper span.yith-icon.yith-icon-magnifier,
|
1255 |
.yith-plugin-fw-panel .yith-plugin-fw-select-field-wrapper span.yith-icon.yith-icon-magnifier {
|
1256 |
-
position: absolute;
|
1257 |
-
padding-top: 5px;
|
1258 |
}
|
1259 |
|
1260 |
.yith-plugin-ui input[type=text].select2-search__field {
|
1261 |
-
border: 0;
|
1262 |
-
padding: 0;
|
1263 |
-
height: 30px;
|
1264 |
}
|
1265 |
|
1266 |
.yith-plugin-ui .select2-container--default .select2-search--dropdown .select2-search__field,
|
1267 |
.yith-plugin-fw-panel .select2-container--default .select2-search--dropdown .select2-search__field {
|
1268 |
-
border: 1px solid #d9d9d9;
|
1269 |
-
border-radius: 8px;
|
1270 |
-
box-shadow: none;
|
1271 |
}
|
1272 |
|
1273 |
.yith-plugin-ui .select2-dropdown,
|
1274 |
.yith-plugin-fw-panel .select2-dropdown {
|
1275 |
-
border: 1px solid #d9d9d9;
|
1276 |
}
|
1277 |
|
1278 |
/** RADIO BUTTON **/
|
1279 |
.yith-plugin-ui [type="radio"]:checked,
|
1280 |
.yith-plugin-ui [type="radio"]:not(:checked) {
|
1281 |
-
position: absolute;
|
1282 |
-
left: -9999px;
|
1283 |
}
|
1284 |
|
1285 |
.yith-plugin-ui [type="radio"]:checked + label,
|
1286 |
.yith-plugin-ui [type="radio"]:not(:checked) + label {
|
1287 |
-
position: relative;
|
1288 |
-
padding-left: 35px;
|
1289 |
-
cursor: pointer;
|
1290 |
-
line-height: 20px;
|
1291 |
-
display: inline-block;
|
1292 |
-
color: #716269;
|
1293 |
-
font-size: 14px;
|
1294 |
}
|
1295 |
|
1296 |
.yith-plugin-ui [type="radio"]:checked + label:before,
|
1297 |
.yith-plugin-ui [type="radio"]:not(:checked) + label:before {
|
1298 |
-
content: '';
|
1299 |
-
position: absolute;
|
1300 |
-
left: 0;
|
1301 |
-
top: 0;
|
1302 |
-
width: 19px;
|
1303 |
-
height: 19px;
|
1304 |
-
border: 1px solid #d8d8d8;
|
1305 |
-
border-radius: 100%;
|
1306 |
-
background: #fff;
|
1307 |
}
|
1308 |
|
1309 |
.yith-plugin-ui [type="radio"]:checked + label:after,
|
1310 |
.yith-plugin-ui [type="radio"]:not(:checked) + label:after {
|
1311 |
-
content: '';
|
1312 |
-
width: 13px;
|
1313 |
-
height: 13px;
|
1314 |
-
background: #4e8ba2;
|
1315 |
-
position: absolute;
|
1316 |
-
top: 4px;
|
1317 |
-
left: 4px;
|
1318 |
-
border-radius: 100%;
|
1319 |
-
-webkit-transition: all 0.2s ease;
|
1320 |
-
transition: all 0.2s ease;
|
1321 |
}
|
1322 |
|
1323 |
.yith-plugin-ui [type="radio"]:not(:checked) + label:after {
|
1324 |
-
opacity: 0;
|
1325 |
-
-webkit-transform: scale(0);
|
1326 |
-
transform: scale(0);
|
1327 |
}
|
1328 |
|
1329 |
.yith-plugin-ui [type="radio"]:checked + label:after {
|
1330 |
-
opacity: 1;
|
1331 |
-
-webkit-transform: scale(1);
|
1332 |
-
transform: scale(1);
|
1333 |
}
|
1334 |
|
1335 |
/** CHECKBOX **/
|
1336 |
.yith-plugin-ui input[type="checkbox"] {
|
1337 |
-
-webkit-appearance: none;
|
1338 |
-
background-color: #fff;
|
1339 |
-
border: 1px solid #d8d8d8;
|
1340 |
-
box-shadow: none;
|
1341 |
-
width: 18px;
|
1342 |
-
height: 18px;
|
1343 |
-
border-radius: 3px;
|
1344 |
-
display: inline-block;
|
1345 |
-
position: relative;
|
1346 |
-
margin-right: 10px;
|
1347 |
}
|
1348 |
|
1349 |
.yith-plugin-ui input[type="checkbox"]:checked {
|
1350 |
-
background-color: #4e8ba2;
|
1351 |
-
border-color: #488197;
|
1352 |
}
|
1353 |
|
1354 |
.yith-plugin-ui .forminp-checkbox span.description.inline {
|
1355 |
-
margin-left: 10px;
|
1356 |
}
|
1357 |
|
1358 |
.yith-plugin-ui input[type="checkbox"]:checked:before {
|
1359 |
-
display: none;
|
1360 |
}
|
1361 |
|
1362 |
.yith-plugin-ui input[type="checkbox"]:checked:after {
|
1363 |
-
content: "\e905";
|
1364 |
-
font-family: 'yith-icon';
|
1365 |
-
font-size: 15px;
|
1366 |
-
position: absolute;
|
1367 |
-
top: 8px;
|
1368 |
-
left: 1px;
|
1369 |
-
color: #fff;
|
1370 |
}
|
1371 |
|
1372 |
/** ONOFF **/
|
1373 |
.yith-plugin-ui .yith-plugin-fw-onoff-container input[type="checkbox"] {
|
1374 |
-
display: none;
|
1375 |
}
|
1376 |
|
1377 |
.yith-plugin-ui .yith-plugin-fw-onoff-container input + span {
|
1378 |
-
border: 1px solid #d8d8d8;
|
1379 |
-
background-color: #fff;
|
1380 |
-
width: 60px;
|
1381 |
-
height: 24px;
|
1382 |
}
|
1383 |
|
1384 |
.yith-plugin-ui .yith-plugin-fw-onoff-container input + span:before {
|
1385 |
-
background-color: #d8d8d8;
|
1386 |
}
|
1387 |
|
1388 |
.yith-plugin-ui .yith-plugin-fw-onoff-container input + span:before {
|
1389 |
-
width: 14px;
|
1390 |
-
height: 14px;
|
1391 |
-
top: 5px;
|
1392 |
-
left: 6px;
|
1393 |
-
background-color: #d8d8d8;
|
1394 |
}
|
1395 |
|
1396 |
.yith-plugin-ui .yith-plugin-fw-onoff-container input + span:after {
|
1397 |
-
content: 'OFF';
|
1398 |
-
width: 14px;
|
1399 |
-
height: 14px;
|
1400 |
-
font-size: 13px;
|
1401 |
-
font-weight: 600;
|
1402 |
-
padding-left: 27px;
|
1403 |
-
color: #979797;
|
1404 |
-
margin-top: 5px;
|
1405 |
-
display: inline-block;
|
|
|
1406 |
}
|
1407 |
|
1408 |
.yith-plugin-ui .yith-plugin-fw-onoff-container input:checked + span,
|
1409 |
.yith-plugin-ui .yith-plugin-fw-onoff-container input.onoffchecked + span {
|
1410 |
-
background-color: #fff;
|
1411 |
-
border-color: #98aa36;
|
1412 |
}
|
1413 |
|
1414 |
.yith-plugin-ui .yith-plugin-fw-onoff-container input:checked + span:before,
|
1415 |
.yith-plugin-ui.yith-plugin-fw-onoff-container input.onoffchecked + span:before {
|
1416 |
-
background-color: #98aa36;
|
1417 |
-
left: 41px;
|
1418 |
}
|
1419 |
|
1420 |
.yith-plugin-ui .yith-plugin-fw-onoff-container input:checked + span:after,
|
1421 |
.yith-plugin-ui.yith-plugin-fw-onoff-container input.onoffchecked + span:after {
|
1422 |
-
content: 'ON';
|
1423 |
-
color: #98aa36;
|
1424 |
-
width: 14px;
|
1425 |
-
height: 14px;
|
1426 |
-
display: inline-block;
|
1427 |
-
font-size: 13px;
|
1428 |
-
font-weight: 600;
|
1429 |
-
padding: 0 10px;
|
1430 |
-
margin-top: 5px;
|
|
|
1431 |
}
|
1432 |
|
1433 |
.yith-plugin-ui .yith-plugin-fw-onoff-container input + span {
|
1434 |
-
text-indent: 0;
|
1435 |
}
|
1436 |
|
1437 |
|
1438 |
/**
|
1439 |
DATEPICKER
|
1440 |
*/
|
1441 |
-
.yith-plugin-
|
1442 |
-
|
1443 |
-
|
1444 |
-
box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.12), 0 2px 10px 0 rgba(0, 0, 0, 0.12) !important;
|
1445 |
}
|
1446 |
|
1447 |
-
.yith-plugin-
|
1448 |
-
|
1449 |
-
|
1450 |
-
|
1451 |
-
|
1452 |
-
|
1453 |
-
|
1454 |
-
|
1455 |
-
|
1456 |
-
|
1457 |
-
|
1458 |
-
|
1459 |
-
|
1460 |
-
|
1461 |
-
|
1462 |
-
|
1463 |
-
|
1464 |
-
|
1465 |
-
|
1466 |
-
|
1467 |
-
.yith-plugin-
|
1468 |
-
.yith-plugin-
|
1469 |
-
.yith-plugin-
|
1470 |
-
|
1471 |
-
|
1472 |
-
|
1473 |
-
|
1474 |
-
|
1475 |
-
|
1476 |
-
|
1477 |
-
|
1478 |
-
.yith-plugin-fw-panel .ui-icon.ui-icon-circle-triangle-e {
|
1479 |
-
background: none;
|
1480 |
-
content: "";
|
1481 |
-
border: 0;
|
1482 |
-
text-indent: 0;
|
1483 |
-
width: 15px;
|
1484 |
-
height: 20px;
|
1485 |
-
display: block;
|
1486 |
-
overflow: hidden;
|
1487 |
}
|
1488 |
|
1489 |
.yith-plugin-ui .yith-password-wrapper {
|
1490 |
-
display: inline-block;
|
1491 |
-
width: auto;
|
1492 |
-
position: relative;
|
1493 |
}
|
1494 |
|
1495 |
.yith-plugin-ui .yith-password-wrapper .yith-password-eye-closed:before,
|
1496 |
.yith-plugin-ui .yith-password-wrapper .yith-password-eye:before {
|
1497 |
-
content: '\e911';
|
1498 |
-
color: #999;
|
1499 |
-
font-family: 'yith-icon';
|
1500 |
-
font-size: 20px;
|
1501 |
-
font-weight: normal;
|
1502 |
-
width: 15px;
|
1503 |
-
display: block;
|
1504 |
-
position: absolute;
|
1505 |
-
right: 13px;
|
1506 |
-
top: 0;
|
1507 |
-
line-height: 38px;
|
1508 |
-
bottom: 0;
|
1509 |
-
cursor: pointer;
|
1510 |
}
|
1511 |
|
1512 |
.yith-plugin-ui .yith-password-wrapper .yith-password-eye-closed:before {
|
1513 |
-
content: '\e912';
|
1514 |
}
|
1515 |
|
1516 |
-
.yith-plugin-
|
1517 |
-
|
1518 |
-
|
1519 |
-
|
1520 |
-
font-
|
1521 |
-
font-
|
1522 |
-
|
1523 |
-
|
1524 |
-
display: block;
|
1525 |
}
|
1526 |
|
1527 |
-
.yith-plugin-
|
1528 |
-
|
1529 |
-
|
1530 |
-
|
1531 |
-
|
1532 |
-
font-
|
1533 |
-
font-
|
1534 |
-
|
1535 |
-
|
1536 |
-
display: block;
|
1537 |
}
|
1538 |
|
1539 |
/* arrow */
|
1540 |
-
.yith-plugin-
|
1541 |
-
.yith-plugin-
|
1542 |
-
.yith-plugin-
|
1543 |
-
.yith-plugin-
|
1544 |
-
|
1545 |
-
|
1546 |
-
|
1547 |
-
.yith-plugin-fw-panel .ui-datepicker-prev.ui-datepicker-next-hover {
|
1548 |
-
top: 1px;
|
1549 |
-
cursor: pointer;
|
1550 |
-
}
|
1551 |
-
|
1552 |
-
.yith-plugin-ui .ui-datepicker-prev.ui-datepicker-prev,
|
1553 |
-
.yith-plugin-ui .ui-datepicker-prev.ui-datepicker-prev-hover,
|
1554 |
-
.yith-plugin-fw-panel .ui-datepicker-prev.ui-datepicker-prev,
|
1555 |
-
.yith-plugin-fw-panel .ui-datepicker-prev.ui-datepicker-prev-hover {
|
1556 |
-
left: 5px;
|
1557 |
-
}
|
1558 |
-
|
1559 |
-
.yith-plugin-ui .ui-datepicker .ui-datepicker-next,
|
1560 |
-
.yith-plugin-ui .ui-datepicker-next.ui-datepicker-next-hover,
|
1561 |
-
.yith-plugin-fw-panel .ui-datepicker .ui-datepicker-next,
|
1562 |
-
.yith-plugin-fw-panel .ui-datepicker-next.ui-datepicker-next-hover {
|
1563 |
-
right: 1px;
|
1564 |
-
}
|
1565 |
-
|
1566 |
-
.yith-plugin-ui .ui-datepicker table,
|
1567 |
-
.yith-plugin-fw-panel .ui-datepicker table {
|
1568 |
-
font-size: 10px;
|
1569 |
-
}
|
1570 |
-
|
1571 |
-
.yith-plugin-ui .ui-state-default,
|
1572 |
-
.yith-plugin-ui .ui-widget-content .ui-state-default,
|
1573 |
-
.yith-plugin-ui .ui-widget-header .ui-state-default,
|
1574 |
-
.yith-plugin-fw-panel .ui-state-default,
|
1575 |
-
.yith-plugin-fw-panel .ui-widget-content .ui-state-default,
|
1576 |
-
.yith-plugin-fw-panel .ui-widget-header .ui-state-default {
|
1577 |
-
background: #fff;
|
1578 |
-
border: 1px solid #d9d9d9;
|
1579 |
|
|
|
|
|
|
|
1580 |
}
|
1581 |
|
1582 |
-
.yith-plugin-ui .ui-
|
1583 |
-
.yith-plugin-
|
1584 |
-
|
1585 |
-
.yith-plugin-ui .ui-widget-content .ui-state-focus,
|
1586 |
-
.yith-plugin-ui .ui-widget-header .ui-state-focus,
|
1587 |
-
.yith-plugin-fw-panel .ui-state-hover,
|
1588 |
-
.yith-plugin-fw-panel .ui-widget-content .ui-state-hover,
|
1589 |
-
.yith-plugin-fw-panel a.ui-state-default:focus,
|
1590 |
-
.yith-plugin-fw-panel .ui-widget-content .ui-state-focus,
|
1591 |
-
.yith-plugin-fw-panel .ui-widget-header .ui-state-focus {
|
1592 |
-
background: #ebf1f3;
|
1593 |
-
border: 1px solid #bfd5dd;
|
1594 |
-
outline: none;
|
1595 |
-
box-shadow: none;
|
1596 |
}
|
1597 |
|
1598 |
-
.yith-plugin-
|
1599 |
-
|
1600 |
-
|
1601 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1602 |
}
|
1603 |
|
1604 |
/** colorpicker **/
|
|
|
|
|
|
|
|
|
|
|
1605 |
.yith-plugin-ui .yith-plugin-fw-field-wrapper .yith-colorpicker-group:not(:first-child) {
|
1606 |
-
margin-top: 20px;
|
1607 |
}
|
1608 |
|
1609 |
.yith-plugin-ui .yith-plugin-fw-field-wrapper .iris-picker,
|
1610 |
.yith-plugin-ui .yith-plugin-fw-field-wrapper .wp-picker-holder {
|
1611 |
-
display: none !important;
|
1612 |
}
|
1613 |
|
1614 |
.yith-plugin-ui .yith-plugin-fw-field-wrapper .wp-picker-input-wrap,
|
@@ -1619,261 +1601,254 @@ DATEPICKER
|
|
1619 |
|
1620 |
.yith-plugin-ui .yith-plugin-fw-field-wrapper .wp-picker-active .iris-picker,
|
1621 |
.yith-plugin-ui .yith-plugin-fw-field-wrapper .wp-picker-active .wp-picker-holder {
|
1622 |
-
display: block !important;
|
1623 |
}
|
1624 |
|
1625 |
.woocommerce .yith-plugin-ui .iris-picker {
|
1626 |
-
border: 0;
|
1627 |
-
margin-top: 20px;
|
1628 |
}
|
1629 |
|
1630 |
.yith-plugin-ui .yith-plugin-fw input[type=text].wp-color-picker {
|
1631 |
-
border: 0;
|
1632 |
-
padding: 2px 5px;
|
1633 |
-
height: 30px;
|
1634 |
}
|
1635 |
|
1636 |
.yith-plugin-ui .wp-color-result-text {
|
1637 |
-
display: none;
|
1638 |
-
}
|
1639 |
-
|
1640 |
-
.yith-plugin-ui .wp-picker-container .wp-color-result.button{
|
1641 |
-
height: 30px!important;
|
1642 |
-
}
|
1643 |
-
|
1644 |
-
.yith-plugin-ui .wp-picker-container .color-alpha {
|
1645 |
-
height: 28px!important;
|
1646 |
}
|
1647 |
|
1648 |
.yith-plugin-ui .wp-picker-container .wp-color-result.button {
|
1649 |
-
width: 30px;
|
1650 |
-
height: 30px;
|
1651 |
-
|
1652 |
-
|
1653 |
-
|
1654 |
-
|
1655 |
-
display: inline-block;
|
1656 |
-
vertical-align: middle;
|
|
|
1657 |
}
|
1658 |
|
1659 |
.yith-plugin-ui .wp-picker-default-custom {
|
1660 |
-
cursor: pointer;
|
1661 |
-
width: 25px;
|
1662 |
-
padding: 0 5px;
|
1663 |
-
display: inline-block;
|
1664 |
-
vertical-align: middle;
|
1665 |
-
position: relative;
|
1666 |
}
|
1667 |
|
1668 |
.yith-plugin-ui .wp-picker-default-custom input.button {
|
1669 |
-
opacity: 0;
|
1670 |
-
margin: 0;
|
1671 |
-
padding: 0;
|
1672 |
-
position: absolute;
|
1673 |
-
top: 0;
|
1674 |
-
right: 0;
|
1675 |
-
left: 0;
|
1676 |
-
bottom: 0;
|
1677 |
-
z-index: 2;
|
1678 |
}
|
1679 |
|
1680 |
.yith-plugin-ui .wp-picker-default-custom:before {
|
1681 |
content: "\e91a";
|
1682 |
-
text-indent: 0;
|
1683 |
-
font-family: 'yith-icon';
|
1684 |
-
font-size: 20px;
|
1685 |
-
color: #d8d8d8;
|
1686 |
-
font-weight: normal;
|
1687 |
-
width: 15px;
|
1688 |
-
display: block;
|
1689 |
-
background: none;
|
1690 |
-
line-height: 20px;
|
1691 |
-
margin-left: 8px;
|
1692 |
}
|
1693 |
|
1694 |
.yith-plugin-ui .wp-picker-container {
|
1695 |
-
width: auto;
|
1696 |
-
display: inline-block;
|
1697 |
-
border: 1px solid #d9d9d9;
|
1698 |
-
border-radius: 8px;
|
1699 |
-
padding: 5px;
|
1700 |
}
|
1701 |
|
1702 |
.yith-plugin-ui .iris-picker .iris-square-inner {
|
1703 |
-
box-shadow: none;
|
1704 |
-
border: 1px solid #d9d9d9;
|
1705 |
}
|
1706 |
|
1707 |
.yith-plugin-ui .yith-single-colorpicker {
|
1708 |
-
display: inline-block;
|
1709 |
-
width: 220px;
|
1710 |
}
|
1711 |
|
1712 |
.yith-plugin-ui .yith-single-colorpicker > label {
|
1713 |
-
display: block;
|
1714 |
-
font-size: 11px;
|
1715 |
-
font-weight: 600;
|
1716 |
-
margin: 0 0 10px 0;
|
1717 |
}
|
1718 |
|
1719 |
/* RANGE SLIDER */
|
1720 |
-
.yith-plugin-ui .ui-slider-horizontal .ui-slider-handle {
|
1721 |
-
top: -45px !important;
|
1722 |
-
}
|
1723 |
-
|
1724 |
-
.yith-plugin-ui .ui-slider-horizontal .ui-slider-handle {
|
1725 |
-
position: absolute;
|
1726 |
-
top: -33px;
|
1727 |
-
left: 0;
|
1728 |
-
width: auto !important;
|
1729 |
-
height: auto !important;
|
1730 |
-
padding: 2px 8px;
|
1731 |
-
margin-left: -15px;
|
1732 |
-
font-size: 12px;
|
1733 |
-
line-height: 20px;
|
1734 |
-
color: #4e8ba2;
|
1735 |
-
text-align: center;
|
1736 |
-
background-color: #fff;
|
1737 |
-
border: 1px solid #fff;
|
1738 |
-
border-radius: 3px;
|
1739 |
-
-webkit-transition: opacity .3s ease-in-out 0s;
|
1740 |
-
transition: opacity .3s ease-in-out 0s;
|
1741 |
-
box-shadow: 0px 1px 7px 0px rgba(1, 1, 1, 0.13);
|
1742 |
-
}
|
1743 |
-
|
1744 |
-
.yith-plugin-ui .ui-slider-horizontal .ui-slider-handle:before {
|
1745 |
-
position: absolute;
|
1746 |
-
bottom: -3px;
|
1747 |
-
left: 50%;
|
1748 |
-
display: inline-block;
|
1749 |
-
width: 6px;
|
1750 |
-
height: 6px;
|
1751 |
-
margin-left: -3px;
|
1752 |
-
content: "";
|
1753 |
-
background-color: #fff;
|
1754 |
-
-webkit-transform: rotate(-45deg);
|
1755 |
-
-ms-transform: rotate(-45deg);
|
1756 |
-
transform: rotate(-45deg);
|
1757 |
-
}
|
1758 |
-
|
1759 |
-
.yith-plugin-ui .ui-slider.ui-widget-content .ui-widget-header {
|
1760 |
-
background: #4e8ba2;
|
1761 |
-
}
|
1762 |
-
|
1763 |
-
.yith-plugin-ui .ui-slider-horizontal .ui-slider-handle:after {
|
1764 |
-
content: '';
|
1765 |
-
width: 17px;
|
1766 |
-
height: 17px;
|
1767 |
-
display: block;
|
1768 |
-
position: absolute;
|
1769 |
-
background: #fff;
|
1770 |
-
top: 37px;
|
1771 |
-
border-radius: 50%;
|
1772 |
-
box-shadow: 0px 1px 6px 0px rgba(1, 1, 1, 0.25);
|
1773 |
-
}
|
1774 |
-
|
1775 |
-
.yith-plugin-ui .ui-slider.ui-widget-content {
|
1776 |
-
height: 5px !important;
|
1777 |
-
}
|
1778 |
-
|
1779 |
-
.yith-plugin-ui .ui-slider .minCaption,
|
1780 |
-
.yith-plugin-ui .ui-slider .maxCaption {
|
1781 |
-
font-weight: 700;
|
1782 |
-
font-size: 12px;
|
1783 |
}
|
1784 |
|
1785 |
|
1786 |
/* ADD_BOX AND TOGGLE */
|
1787 |
.yith-plugin-ui .yith-add-box,
|
1788 |
.yith-plugin-ui .yith-toggle-row {
|
1789 |
-
width: 70%;
|
1790 |
-
border: 1px solid #d9d9d9;
|
1791 |
-
box-shadow: none;
|
1792 |
-
border-radius: 4px;
|
1793 |
-
margin: 20px 0;
|
1794 |
-
padding: 10px;
|
1795 |
-
box-sizing: border-box;
|
1796 |
-
background: white;
|
1797 |
}
|
1798 |
|
1799 |
.yith-plugin-ui .yith-toggle-row {
|
1800 |
-
cursor: pointer;
|
1801 |
-
transition: all ease 0.5s;
|
1802 |
}
|
1803 |
.yith-plugin-ui .yith-toggle-row.fixed {
|
1804 |
margin: 0;
|
1805 |
}
|
1806 |
.yith-plugin-ui .yith-toggle-row.highlight {
|
1807 |
-
transition: all ease 0.5s;
|
1808 |
/*box-shadow: 0 0 7px rgb(81, 117, 129);*/
|
1809 |
-
box-shadow: 0 0 7px rgb(30, 140, 190);
|
1810 |
|
1811 |
-
display: block;
|
1812 |
}
|
1813 |
|
1814 |
.yith-plugin-ui .yith-add-box {
|
1815 |
-
padding: 25px;
|
1816 |
-
display: none;
|
1817 |
}
|
1818 |
|
1819 |
.yith-plugin-ui .yith-toggle-title {
|
1820 |
-
position: relative;
|
1821 |
}
|
1822 |
|
1823 |
.yith-plugin-ui #plugin-fw-wc .yith-toggle-title h3,
|
1824 |
-
.yith-plugin-ui.metaboxes-tab
|
1825 |
.yith-plugin-ui .yith-toggle-title h3 {
|
1826 |
-
padding: 0px 20px 0px 25px;
|
1827 |
-
margin: 3px 0;
|
1828 |
|
1829 |
-
display: inline-block;
|
1830 |
-
position: relative;
|
1831 |
-
min-width: 173px;
|
1832 |
-
box-sizing: border-box;
|
1833 |
-
font-weight: 600;
|
1834 |
-
font-size: 15px;
|
1835 |
-
color: #23282d;
|
1836 |
-
text-transform: inherit;
|
1837 |
}
|
1838 |
|
1839 |
.yith-plugin-ui .yith-toggle-title .subtitle {
|
1840 |
-
padding-left: 0;
|
1841 |
-
padding-top: 8px;
|
1842 |
-
font-size: 12px;
|
1843 |
}
|
1844 |
|
1845 |
.yith-plugin-ui .yith-toggle {
|
1846 |
-
position: absolute;
|
1847 |
-
width: 30px;
|
1848 |
-
cursor: pointer;
|
1849 |
-
left: 0;
|
1850 |
-
top: 0;
|
1851 |
-
bottom: 0;
|
1852 |
-
margin: auto;
|
1853 |
-
display: flex;
|
1854 |
-
align-items: center;
|
1855 |
}
|
1856 |
|
1857 |
.yith-plugin-ui .yith-toggle > span:before {
|
1858 |
-
color: #405e69;
|
1859 |
}
|
1860 |
|
1861 |
.yith-plugin-ui .yith-toggle > span {
|
1862 |
-
position: absolute;
|
1863 |
-
right: 50%;
|
1864 |
-
transition: transform .3s;
|
1865 |
-
line-height: 1;
|
1866 |
}
|
1867 |
|
1868 |
|
1869 |
.yith-plugin-ui .yith-toggle-row-opened .yith-toggle span {
|
1870 |
-
transform: rotateZ(90deg);
|
1871 |
}
|
1872 |
|
1873 |
.yith-plugin-ui .yith-toggle-content {
|
1874 |
-
display: none;
|
1875 |
-
position: relative;
|
1876 |
-
padding: 30px 25px;
|
1877 |
}
|
1878 |
|
1879 |
.yith-plugin-ui .yith-toggle-row-opened .yith-toggle-content {
|
@@ -1882,216 +1857,231 @@ DATEPICKER
|
|
1882 |
|
1883 |
.yith-plugin-ui .yith-add-box-row,
|
1884 |
.yith-plugin-ui .yith-toggle-row-opened .yith-toggle-content .yith-toggle-content-row {
|
1885 |
-
display: table;
|
1886 |
-
margin-bottom: 40px;
|
1887 |
}
|
1888 |
|
1889 |
.yith-plugin-ui .yith-add-box-row label,
|
1890 |
.yith-plugin-ui .yith-toggle-row-opened .yith-toggle-content .yith-toggle-content-row > label {
|
1891 |
-
display: table-cell;
|
1892 |
-
width: 200px;
|
1893 |
-
padding-right: 21px;
|
1894 |
-
color: #33373b;
|
1895 |
-
font-size: 14px;
|
1896 |
-
vertical-align: top;
|
1897 |
-
font-weight: 600;
|
1898 |
-
}
|
1899 |
-
.yith-plugin-ui .yith-plugin-fw-radio__row label{
|
1900 |
-
font-weight: 400!important;
|
1901 |
}
|
|
|
1902 |
.yith-plugin-ui .yith-add-box-row .yith-plugin-fw-field-wrapper:not(.yith-plugin-fw-title-field-wrapper),
|
1903 |
.yith-plugin-ui .yith-toggle-row-opened .yith-plugin-fw-field-wrapper:not(.yith-plugin-fw-title-field-wrapper) {
|
1904 |
-
|
1905 |
-
width: auto;
|
1906 |
-
float: none;
|
1907 |
-
vertical-align: middle;
|
1908 |
-
position: relative;
|
1909 |
}
|
1910 |
|
1911 |
.yith-plugin-ui .yith-add-box-row span.yith-icon,
|
1912 |
.yith-plugin-ui .yith-toggle-row-opened .yith-toggle-content .yith-toggle-content-row span.yith-icon {
|
1913 |
-
position: absolute;
|
1914 |
-
right: 15px;
|
1915 |
-
top: 0;
|
1916 |
-
bottom: 0;
|
1917 |
}
|
1918 |
|
1919 |
.yith-plugin-ui .yith-add-box-buttons,
|
1920 |
.yith-plugin-ui .yith-toggle-content-buttons {
|
1921 |
-
text-align: right;
|
1922 |
}
|
1923 |
|
1924 |
.yith-plugin-ui .yith-toggle-onoff {
|
1925 |
-
position: absolute;
|
1926 |
-
cursor: pointer;
|
1927 |
-
right: 0;
|
1928 |
}
|
1929 |
|
1930 |
.yith-plugin-ui .yith-toggle_wrapper.ui-sortable .yith-toggle-onoff {
|
1931 |
-
right: 30px;
|
1932 |
}
|
1933 |
|
1934 |
.yith-plugin-ui .yith-toggle-row .yith-icon-drag {
|
1935 |
-
position: absolute;
|
1936 |
-
right: 0;
|
1937 |
-
top: 25%;
|
1938 |
-
bottom: 0;
|
1939 |
-
line-height: 1;
|
1940 |
}
|
1941 |
|
1942 |
.yith-plugin-ui .yith-toggle-row.with-subtitle .yith-toggle-onoff {
|
1943 |
-
top: 25%;
|
1944 |
}
|
1945 |
|
1946 |
/** SPINNER **/
|
1947 |
.yith-plugin-ui .spinner {
|
1948 |
-
vertical-align: -5px;
|
1949 |
-
float: none;
|
1950 |
}
|
1951 |
|
1952 |
.yith-plugin-ui .spinner.show {
|
1953 |
-
visibility: visible;
|
1954 |
}
|
1955 |
|
1956 |
/* LIST TABLE */
|
1957 |
.yith-plugin-ui .form-table .list-table td {
|
1958 |
-
padding: 15px 0px;
|
1959 |
}
|
1960 |
|
1961 |
.woocommerce.yith-plugin-fw-panel .yith-plugin-ui table.form-table .bulkactions select {
|
1962 |
-
border: 1px solid #d8d8d8;
|
1963 |
-
max-width: 200px;
|
1964 |
-
max-height: 30px;
|
1965 |
-
padding: 0 10px;
|
1966 |
-
margin-right: 5px;
|
1967 |
}
|
1968 |
|
1969 |
.yith-plugin-ui .form-table .list-table th {
|
1970 |
-
width: initial;
|
|
|
|
|
|
|
|
|
1971 |
}
|
1972 |
|
1973 |
.yith-plugin-ui #plugin-fw-wc table.wp-list-table tbody td {
|
1974 |
-
padding-left: 20px;
|
1975 |
}
|
1976 |
|
1977 |
.yith-plugin-ui #plugin-fw-wc table.wp-list-table th,
|
1978 |
.yith-plugin-ui #plugin-fw-wc table.wp-list-table td {
|
1979 |
-
padding: 15px 20px 15px 20px;
|
1980 |
}
|
1981 |
|
1982 |
.yith-plugin-ui #plugin-fw-wc table.wp-list-table thead td,
|
1983 |
.yith-plugin-ui #plugin-fw-wc table.wp-list-table thead th,
|
1984 |
.yith-plugin-ui #plugin-fw-wc table.wp-list-table tfoot td,
|
1985 |
.yith-plugin-ui #plugin-fw-wc table.wp-list-table tfoot th {
|
1986 |
-
padding: 3px 20px;
|
1987 |
}
|
1988 |
|
1989 |
.yith-plugin-ui #plugin-fw-wc table.wp-list-table thead a,
|
1990 |
.yith-plugin-ui #plugin-fw-wc table.wp-list-table tfoot a {
|
1991 |
-
padding-left: 0;
|
1992 |
}
|
1993 |
|
1994 |
.yith-plugin-ui .yith-plugin-fw-list-table h2 {
|
1995 |
-
border: 0;
|
1996 |
-
padding: 35px 0 15px;
|
1997 |
-
display: inline-block;
|
1998 |
-
margin-right: 10px;
|
1999 |
}
|
2000 |
|
2001 |
.yith-plugin-ui .form-table .yith-plugin-fw-list-table table th {
|
2002 |
-
vertical-align: middle;
|
2003 |
}
|
2004 |
|
2005 |
.yith-plugin-ui .yith-plugin-fw-list-table-container {
|
2006 |
-
padding: 0 20px;
|
2007 |
}
|
2008 |
|
2009 |
.yith-plugin-ui #doaction, .yith-plugin-ui #doaction2,
|
2010 |
.yith-plugin-ui #post-query-submit,
|
2011 |
.yith-plugin-ui #search-submit,
|
2012 |
.yith-plugin-ui .button.filter-button {
|
2013 |
-
margin-left: 0;
|
2014 |
-
height: 33px;
|
2015 |
-
padding: 0 10px;
|
2016 |
-
line-height: 33px;
|
2017 |
}
|
2018 |
|
2019 |
.yith-plugin-ui .bulkactions {
|
2020 |
-
margin: 10px 0;
|
2021 |
}
|
2022 |
|
2023 |
.yith-plugin-ui .form-table td p.yith-section-description {
|
2024 |
-
color: #716269;
|
2025 |
-
margin-bottom: 20px;
|
2026 |
}
|
2027 |
|
2028 |
/** Time picker width*/
|
2029 |
.yith-plugin-ui input.ui-timepicker-input {
|
2030 |
-
width: 100px !important;
|
2031 |
}
|
2032 |
|
2033 |
/** date format **/
|
2034 |
.yith-plugin-ui .yith-plugin-fw-date-format code {
|
2035 |
-
margin-left: 30px;
|
2036 |
}
|
2037 |
|
2038 |
.yith-plugin-ui .yith-plugin-fw-date-format input[type=text].small-text {
|
2039 |
-
margin-left: 45px;
|
2040 |
}
|
2041 |
|
2042 |
/** checkbox columns **/
|
2043 |
.yith-plugin-ui td.forminp-checkbox.two-cols fieldset {
|
2044 |
-
width: calc(50% - 20px);
|
2045 |
-
padding-right: 20px;
|
2046 |
-
float: left;
|
2047 |
}
|
2048 |
|
2049 |
.yith-plugin-ui td.forminp-checkbox.two-cols fieldset:nth-child(2n+1) {
|
2050 |
-
clear: both;
|
2051 |
}
|
2052 |
|
2053 |
.yith-plugin-ui td.forminp-checkbox.three-cols fieldset {
|
2054 |
-
width: calc(33% - 10px);
|
2055 |
-
padding-right: 10px;
|
2056 |
-
float: left;
|
2057 |
}
|
2058 |
|
2059 |
.yith-plugin-ui td.forminp-checkbox.three-cols fieldset:nth-child(3n+1) {
|
2060 |
-
clear: both;
|
2061 |
}
|
2062 |
|
2063 |
.yith-plugin-fw-checkbox-field-wrapper {
|
2064 |
-
display: inline-block !important;
|
|
|
2065 |
}
|
2066 |
|
2067 |
.yith-plugin-fw-checkbox-field-wrapper + span.description {
|
2068 |
-
display: inline-block;
|
2069 |
-
vertical-align: middle;
|
2070 |
-
margin: 0;
|
2071 |
}
|
2072 |
|
2073 |
.yith-plugin-ui span.description {
|
2074 |
-
margin-top: 10px;
|
2075 |
-
line-height: 20px;
|
2076 |
}
|
2077 |
|
2078 |
.yith-plugin-fw-option-with-description {
|
2079 |
-
display: table-cell;
|
2080 |
-
width: auto;
|
2081 |
-
vertical-align: top;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2082 |
}
|
2083 |
|
2084 |
/** YITH PANEL **/
|
2085 |
.yith-plugin-ui #yith-plugin-fw-panel {
|
2086 |
-
margin-top: -10px;
|
2087 |
}
|
2088 |
|
2089 |
.yith-plugin-ui #plugin-fw-wc, .yith-plugin-ui #yith-plugin-fw-panel {
|
2090 |
-
padding-top: 0;
|
2091 |
}
|
2092 |
|
2093 |
.yith-plugin-ui .plugin-option tr {
|
2094 |
-
border: 0;
|
2095 |
}
|
2096 |
|
2097 |
/** MULTI SELECT **/
|
@@ -2113,69 +2103,73 @@ DATEPICKER
|
|
2113 |
min-width: auto !important;
|
2114 |
}
|
2115 |
|
2116 |
-
@media screen and (max-width: 1440px) {
|
2117 |
.yith-plugin-ui .yith-add-box,
|
2118 |
.yith-plugin-ui .yith-toggle-row:not(.fixed) {
|
2119 |
-
width: 80%;
|
2120 |
}
|
2121 |
}
|
2122 |
|
2123 |
-
@media screen and (max-width: 1024px) {
|
2124 |
.yith-plugin-ui .yith-add-box,
|
2125 |
.yith-plugin-ui .yith-toggle-row:not(.fixed) {
|
2126 |
-
width: 90%;
|
2127 |
}
|
2128 |
|
2129 |
.yith-plugin-ui td.forminp-checkbox.two-cols fieldset {
|
2130 |
-
width: 100%;
|
2131 |
-
padding-right: 20px;
|
2132 |
-
float: left;
|
2133 |
}
|
2134 |
|
2135 |
.yith-plugin-ui td.forminp-checkbox.three-cols fieldset {
|
2136 |
-
width: calc(50% - 10px);
|
2137 |
-
padding-right: 10px;
|
2138 |
-
float: left;
|
2139 |
}
|
2140 |
|
2141 |
.yith-plugin-ui td.forminp-checkbox.two-cols fieldset:nth-child(2n+1) {
|
2142 |
-
clear: both;
|
2143 |
}
|
2144 |
|
2145 |
.yith-plugin-ui td.forminp-checkbox.three-cols fieldset:nth-child(3n+1) {
|
2146 |
-
clear: initial;
|
2147 |
}
|
2148 |
}
|
2149 |
|
2150 |
-
@media screen and (max-width: 782px) {
|
2151 |
.yith-plugin-fw-banner.yith-plugin-fw-banner-free {
|
2152 |
-
height: auto;
|
2153 |
-
background-color: #a9c7d3;
|
2154 |
}
|
2155 |
|
2156 |
.yith-plugin-fw-banner.yith-plugin-fw-banner-free ul {
|
2157 |
-
width: 90%;
|
2158 |
-
text-align: center;
|
2159 |
}
|
2160 |
|
2161 |
.yith-plugin-fw-banner.yith-plugin-fw-banner-free li img {
|
2162 |
-
width: 90%;
|
2163 |
-
margin: 0 auto;
|
2164 |
}
|
2165 |
|
2166 |
.yith-plugin-fw-banner h1 {
|
2167 |
-
line-height: 1.2em;
|
2168 |
}
|
2169 |
|
2170 |
.yith-plugin-ui .yith-add-box,
|
2171 |
.yith-plugin-ui .yith-toggle-row {
|
2172 |
-
width: 100%;
|
2173 |
}
|
2174 |
|
2175 |
.yith-plugin-ui td.forminp-checkbox.two-cols fieldset,
|
2176 |
.yith-plugin-ui td.forminp-checkbox.three-cols fieldset {
|
2177 |
-
width: 100%;
|
2178 |
-
clear: initial;
|
|
|
|
|
|
|
|
|
2179 |
}
|
2180 |
|
2181 |
}
|
1 |
.yith-plugin-fw span.description {
|
2 |
+
display : block;
|
3 |
+
margin-top : 5px;
|
4 |
+
font-size : 12px;
|
5 |
+
color : #777;
|
6 |
+
font-style : italic;
|
7 |
+
clear : both;
|
8 |
}
|
9 |
|
10 |
.yith-plugin-fw span.description.inline {
|
11 |
+
display : inline-block;
|
12 |
+
margin : 0 0 0 5px;
|
13 |
}
|
14 |
|
15 |
.yith-disabled {
|
16 |
+
opacity : 0.3;
|
17 |
+
pointer-events : none;
|
18 |
}
|
19 |
|
20 |
.yith-plugin-fw-field-wrapper:not(.yith-plugin-fw-title-field-wrapper) {
|
21 |
+
display : block;
|
22 |
+
width : 100%;
|
23 |
}
|
24 |
|
25 |
.yith-plugin-fw-field-wrapper span.desc {
|
26 |
+
display : block;
|
27 |
+
width : 100%;
|
28 |
}
|
29 |
|
30 |
.yith-plugin-fw-title-field-wrapper h3.title {
|
31 |
+
width : 100%;
|
32 |
padding: 0 !important;
|
33 |
}
|
34 |
|
35 |
.the-metabox .yith-plugin-fw-title-field-wrapper h3.title {
|
36 |
+
float : left;
|
37 |
}
|
38 |
|
39 |
.yith-plugin-fw span.color-alpha {
|
40 |
+
height: 100%!important;
|
41 |
+
width: 100% !important;
|
42 |
+
border: 1px solid #d9d9d9;
|
43 |
+
margin: -1px;
|
44 |
}
|
45 |
+
|
46 |
.yith-plugin-fw .wp-color-result-text{
|
47 |
height: 100%;
|
48 |
}
|
55 |
.yith-plugin-ui input[type=password],
|
56 |
.woocommerce .yith-plugin-fw table.form-table input[type=text]:not(.select2-search__field),
|
57 |
.woocommerce .yith-plugin-fw table.form-table select {
|
58 |
+
width : 400px;
|
59 |
+
max-width : 100%;
|
60 |
+
height : 30px;
|
61 |
+
padding : 5px;
|
62 |
line-height: 1;
|
63 |
}
|
64 |
|
66 |
.woocommerce .yith-plugin-fw table.form-table input[type=text].yith-plugin-fw-colorpicker,
|
67 |
.yith-plugin-fw input[type=text].wp-color-picker,
|
68 |
.yith-plugin-fw input[type=text].yith-plugin-fw-colorpicker {
|
69 |
+
width : 6em;
|
70 |
+
max-width : none;
|
71 |
+
height : auto;
|
72 |
+
padding : 3px 5px;
|
73 |
}
|
74 |
|
75 |
.wp-core-ui .yith-plugin-fw-colorpicker-field-wrapper button{
|
78 |
|
79 |
.woocommerce .yith-plugin-fw table.form-table input[type=text].colorpick,
|
80 |
.yith-plugin-fw input[type=text].colorpick {
|
81 |
+
width : 6em;
|
82 |
+
max-width : none;
|
83 |
+
height : auto;
|
84 |
+
padding : 6px;
|
85 |
}
|
86 |
|
87 |
.yith-plugin-fw input.select2-search__field,
|
88 |
.yith-plugin-fw .select2-container .select2-search--inline .select2-search__field,
|
89 |
.woocommerce .yith-plugin-fw input.select2-search__field,
|
90 |
.woocommerce .yith-plugin-fw table.form-table input.select2-search__field {
|
91 |
+
padding : 3px;
|
92 |
}
|
93 |
|
94 |
.yith-plugin-fw .select2-container .select2-selection--single .select2-selection__rendered {
|
95 |
+
line-height : 27px;
|
96 |
}
|
97 |
|
98 |
.yith-plugin-fw textarea {
|
99 |
+
width : 400px;
|
100 |
+
max-width : 100%;
|
101 |
+
padding : 5px;
|
102 |
}
|
103 |
|
104 |
/* ------------- ICONS ------------- */
|
105 |
.yit-icons-manager-wrapper {
|
106 |
+
width : 100%;
|
107 |
+
max-width : 400px;
|
108 |
}
|
109 |
|
110 |
.yit-icons-manager-text {
|
111 |
+
width : 100%;
|
112 |
}
|
113 |
|
114 |
.yit-icons-manager-icon-text {
|
115 |
+
width : calc(100% - 35px) !important;
|
116 |
+
height : 30px;
|
117 |
+
float : left;
|
118 |
+
margin : 0;
|
119 |
}
|
120 |
|
121 |
.yit-icons-manager-icon-preview {
|
122 |
+
width : 30px;
|
123 |
+
height : 30px;
|
124 |
+
margin-right : 5px;
|
125 |
+
float : left;
|
126 |
+
padding-top : 6px;
|
127 |
+
box-sizing : border-box;
|
128 |
+
text-align : center;
|
129 |
+
background : #f1f1f1;
|
130 |
}
|
131 |
|
132 |
.yit-icons-manager-list-wrapper {
|
133 |
+
margin : 10px 0;
|
134 |
+
box-shadow : 0 0 0 1px #ddd;
|
135 |
}
|
136 |
|
137 |
ul.yit-icons-manager-list {
|
138 |
+
width : 100%;
|
139 |
+
height : 300px;
|
140 |
+
overflow-y : scroll;
|
141 |
+
margin : 0;
|
142 |
}
|
143 |
|
144 |
ul.yit-icons-manager-list li {
|
145 |
+
float : left;
|
146 |
+
width : 30px;
|
147 |
+
height : 30px;
|
148 |
+
padding-top : 6px;
|
149 |
+
box-sizing : border-box;
|
150 |
+
text-align : center;
|
151 |
+
background : #f1f1f1;
|
152 |
+
margin : 1px;
|
153 |
+
cursor : pointer;
|
154 |
}
|
155 |
|
156 |
ul.yit-icons-manager-list li:hover {
|
157 |
+
background : #c5dcf6;
|
158 |
}
|
159 |
|
160 |
ul.yit-icons-manager-list li.active {
|
161 |
+
background : #d4f0ff;
|
162 |
}
|
163 |
|
164 |
.yit-icons-manager-action-set-default {
|
165 |
+
margin-bottom : 0;
|
166 |
}
|
167 |
|
168 |
.yit-icons-manager-default-icon-preview {
|
169 |
+
height : 100%;
|
170 |
+
display : inline-block;
|
171 |
+
padding-left : 10px;
|
172 |
+
border-left : 1px solid #ccc;
|
173 |
+
margin-left : 10px;
|
174 |
}
|
175 |
|
176 |
/* ------- Text Array ------- */
|
177 |
.yith-plugin-fw-text-array-table td {
|
178 |
+
padding : 1px;
|
179 |
}
|
180 |
|
181 |
.yith-plugin-fw-text-array-table input[type=text],
|
182 |
.woocommerce table.form-table table.yith-plugin-fw-text-array-table input[type=text] {
|
183 |
+
width : 100%;
|
184 |
}
|
185 |
|
186 |
/* ------- Image Gallery ------- */
|
187 |
.yith-plugin-fw .image-gallery ul li {
|
188 |
+
display : inline-block;
|
189 |
+
width : 80px;
|
190 |
+
margin-left : 10px;
|
191 |
+
position : relative;
|
192 |
}
|
193 |
|
194 |
.yith-plugin-fw .image-gallery ul li img {
|
195 |
+
width : 80px;
|
196 |
+
border : 1px solid #ccc;
|
197 |
}
|
198 |
|
199 |
.yith-plugin-fw .image-gallery ul li ul {
|
200 |
+
position : absolute;
|
201 |
+
top : -6px;
|
202 |
+
right : -1px;
|
203 |
+
width : 20px;
|
204 |
+
height : 20px;
|
205 |
}
|
206 |
|
207 |
.yith-plugin-fw .image-gallery ul a.delete {
|
208 |
+
background : url(../images/x.png) no-repeat;
|
209 |
+
width : 20px;
|
210 |
+
height : 20px;
|
211 |
+
display : block;
|
212 |
+
text-indent : -99999px;
|
213 |
}
|
214 |
|
215 |
/* ------- OnOff ------- */
|
216 |
.yith-plugin-fw-onoff-container {
|
217 |
+
display : inline-block;
|
218 |
+
text-align : left;
|
219 |
}
|
220 |
|
221 |
.yith-plugin-fw-onoff-container input {
|
222 |
+
display : none;
|
223 |
}
|
224 |
|
225 |
.yith-plugin-fw-onoff-container input + span {
|
226 |
+
cursor : pointer;
|
227 |
+
text-indent : -9999px;
|
228 |
+
display : block;
|
229 |
+
width : 36px;
|
230 |
+
line-height : 1;
|
231 |
+
height : 20px;
|
232 |
+
background : #a4a4a4;
|
233 |
+
border-radius : 24px;
|
234 |
+
position : relative;
|
235 |
+
transition : all 0.3s;
|
236 |
}
|
237 |
|
238 |
|
239 |
.yith-plugin-fw-onoff-container input + span:before {
|
240 |
+
content : '';
|
241 |
+
background : #fff;
|
242 |
+
width : 16px;
|
243 |
+
height : 16px;
|
244 |
+
border-radius : 50%;
|
245 |
+
position : absolute;
|
246 |
+
top : 2px;
|
247 |
+
left : 2px;
|
248 |
+
transition : all 0.3s;
|
249 |
}
|
250 |
|
251 |
.yith-plugin-fw-onoff-container input:checked + span,
|
252 |
.yith-plugin-fw-onoff-container input.onoffchecked + span {
|
253 |
+
background : #0073aa;
|
254 |
}
|
255 |
|
256 |
.yith-plugin-fw-onoff-container input:checked + span:before,
|
257 |
.yith-plugin-fw-onoff-container input.onoffchecked + span:before {
|
258 |
+
left : 18px;
|
259 |
}
|
260 |
|
261 |
/* ------- Preview ------- */
|
262 |
.yith-plugin-fw-preview-field {
|
263 |
+
max-height : 200px;
|
264 |
}
|
265 |
|
266 |
/* ------- Radio ------- */
|
267 |
.yith-plugin-fw-radio input[type=radio] {
|
268 |
+
margin : 0 3px 0 0;
|
269 |
}
|
270 |
|
271 |
.yith-plugin-fw-radio__row {
|
272 |
+
margin-bottom : 8px;
|
273 |
+
}
|
274 |
+
|
275 |
+
/* ------- Checkbox Array ------- */
|
276 |
+
.yith-plugin-fw-checkbox-array input[type=checkbox] {
|
277 |
+
margin : 2px 3px 0 0;
|
278 |
+
}
|
279 |
+
|
280 |
+
.yith-plugin-fw-checkbox-array__row {
|
281 |
+
margin-bottom : 10px;
|
282 |
+
}
|
283 |
+
|
284 |
+
.yith-plugin-fw-checkbox-array__row label {
|
285 |
+
display : inline-block !important;
|
286 |
+
width : auto !important;
|
287 |
+
float : none !important;
|
288 |
+
margin : 0 !important;
|
289 |
+
padding : 0 !important;
|
290 |
+
font-weight : 400 !important;
|
291 |
}
|
292 |
|
293 |
/* ------- Sidebar Layout ------- */
|
294 |
.yith-plugin-fw-sidebar-layout input[type="radio"] {
|
295 |
+
display : none;
|
296 |
+
width : 0px;
|
297 |
}
|
298 |
|
299 |
.yith-plugin-fw-sidebar-layout input[type="radio"]:first-child {
|
300 |
+
margin-right : -2px;
|
301 |
}
|
302 |
|
303 |
.yith-plugin-fw-sidebar-layout input[type="radio"] + img {
|
304 |
+
border : 2px solid #fff;
|
305 |
+
padding : 1px;
|
306 |
}
|
307 |
|
308 |
.yith-plugin-fw-sidebar-layout input[type="radio"] + img:hover {
|
309 |
+
cursor : pointer;
|
310 |
}
|
311 |
|
312 |
.yith-plugin-fw-sidebar-layout input[checked] + img {
|
313 |
+
border : 2px solid #f2ad35;
|
314 |
+
padding : 1px;
|
315 |
}
|
316 |
|
317 |
.yith-plugin-fw-sidebar-layout select {
|
318 |
+
vertical-align : 12px;
|
319 |
}
|
320 |
|
321 |
.yit-admin-panel-content-wrap .yith-plugin-fw-sidebar-layout label {
|
322 |
+
font-weight : bold;
|
323 |
+
width : 200px;
|
324 |
+
float : left;
|
325 |
+
line-height : 23px;
|
326 |
+
margin-left : -230px;
|
327 |
}
|
328 |
|
329 |
/* ------- Slider ------- */
|
330 |
.yith-plugin-fw .slider {
|
331 |
+
padding-top : 20px;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
332 |
}
|
333 |
|
334 |
+
.yith-plugin-fw-slider-container .ui-slider .minCaption {
|
335 |
+
position : absolute;
|
336 |
+
right : 95%;
|
337 |
+
top : -6px;
|
338 |
+
margin-right : 11px;
|
|
|
|
|
339 |
}
|
340 |
|
341 |
+
.yith-plugin-fw-slider-container .ui-slider .maxCaption {
|
342 |
+
position : absolute;
|
343 |
+
left : 95%;
|
344 |
+
top : -6px;
|
345 |
+
margin-left : 20px;
|
346 |
}
|
347 |
|
348 |
+
.yith-plugin-fw-slider-container .ui-slider-horizontal .ui-slider-handle {
|
349 |
+
background : #fff;
|
350 |
+
border : 0px !important;
|
351 |
+
top : -12px !important;
|
352 |
+
border-radius : 50%;
|
353 |
+
width : 27px !important;
|
354 |
+
height : 27px !important;
|
355 |
+
box-sizing : border-box;
|
356 |
+
box-shadow : 0 1px 7px -1px rgba(0, 0, 0, 0.5);
|
357 |
+
font-size : 13px;
|
358 |
+
padding : 6px 0;
|
359 |
+
font-weight : 600;
|
360 |
+
color : #555;
|
361 |
+
text-align : center;
|
362 |
+
}
|
363 |
+
|
364 |
+
.yith-plugin-fw-slider-container .ui-slider.ui-widget-content {
|
365 |
+
background : #ccc;
|
366 |
+
border : none !important;
|
367 |
+
height : 3px !important;
|
368 |
+
border-radius : 3px !important;
|
369 |
+
width : 90%;
|
370 |
+
margin : 15px 5% 20px 5%;
|
371 |
+
}
|
372 |
+
|
373 |
+
.yith-plugin-fw-slider-container .ui-slider.ui-widget-content .ui-widget-header {
|
374 |
+
background : #4b93ff;
|
375 |
+
left : 0px !important;
|
376 |
+
-webkit-border-radius : 3px;
|
377 |
+
-moz-border-radius : 3px;
|
378 |
+
-khtml-border-radius : 3px;
|
379 |
+
border-radius : 3px;
|
380 |
}
|
381 |
|
382 |
/* ------- Select2 ------- */
|
383 |
.yith-plugin-fw-select2-wrapper {
|
384 |
+
width : 400px;
|
385 |
}
|
386 |
|
387 |
/* ------- Textarea ------- */
|
388 |
.yith-plugin-fw-textarea-editor-field-wrapper {
|
389 |
+
max-width : 1000px;
|
390 |
+
clear : both;
|
391 |
}
|
392 |
|
393 |
.yith-plugin-fw-textarea-editor-field-wrapper textarea.wp-editor-area,
|
394 |
.woocommerce table.form-table .yith-plugin-fw-textarea-editor-field-wrapper textarea.wp-editor-area {
|
395 |
+
width : 100%;
|
396 |
}
|
397 |
|
398 |
/* ------- Buttons ------- */
|
399 |
.yith-plugin-fw-buttons-field-wrapper {
|
400 |
+
margin-top : 7px;
|
401 |
}
|
402 |
|
403 |
/* ------- Select Images ------- */
|
404 |
.yith-plugin-fw-select-images__list {
|
405 |
+
margin : 0;
|
406 |
+
display : flex;
|
407 |
+
flex-wrap : wrap;
|
408 |
}
|
409 |
|
410 |
.yith-plugin-fw-select-images__item {
|
411 |
+
width : calc(20% - 10px);
|
412 |
+
min-width : 150px;
|
413 |
+
margin : 0 10px 10px 0;
|
414 |
+
padding : 10px;
|
415 |
+
box-sizing : border-box;
|
416 |
+
cursor : pointer;
|
417 |
+
transition : all .3s;
|
418 |
+
border : 2px solid #eee;
|
419 |
+
display : flex;
|
420 |
+
flex-direction : column;
|
421 |
+
justify-content : space-between;
|
422 |
}
|
423 |
|
424 |
.yith-plugin-fw-select-images__item:hover,
|
425 |
.yith-plugin-fw-select-images__item.yith-plugin-fw-select-images__item--selected {
|
426 |
+
border-color : #07bcce;
|
427 |
}
|
428 |
|
429 |
.yith-plugin-fw-select-images__item__label {
|
430 |
+
text-align : center;
|
431 |
+
font-weight : 600;
|
432 |
+
margin-bottom : 10px;
|
433 |
}
|
434 |
|
435 |
.yith-plugin-fw-select-images__item img {
|
436 |
+
display : block;
|
437 |
+
max-width : 100%;
|
438 |
+
margin : 0 auto;
|
439 |
}
|
440 |
|
441 |
/****************
|
454 |
YITH UI
|
455 |
****************/
|
456 |
@font-face {
|
457 |
+
font-family : 'yith-icon';
|
458 |
+
src : url('../fonts/yith-icon.eot?7ik896');
|
459 |
+
src : url('../fonts/yith-icon.eot?7ik896#iefix') format('embedded-opentype'),
|
460 |
url('../fonts/yith-icon.ttf?7ik896') format('truetype'),
|
461 |
url('../fonts/yith-icon.woff?7ik896') format('woff'),
|
462 |
url('../fonts/yith-icon.svg?7ik896#yith-icon') format('svg');
|
463 |
+
font-weight : normal;
|
464 |
+
font-style : normal;
|
465 |
}
|
466 |
|
467 |
[class^="icon-"], [class*=" icon-"][class^="yith-icon-"], [class*=" yith-icon-"] {
|
468 |
/* use !important to prevent issues with browser extensions that change fonts */
|
469 |
+
font-family : 'yith-icon' !important;
|
470 |
+
speak : none;
|
471 |
+
font-style : normal;
|
472 |
+
font-weight : normal;
|
473 |
+
font-variant : normal;
|
474 |
+
text-transform : none;
|
475 |
+
line-height : 1;
|
476 |
|
477 |
/* Better Font Rendering =========== */
|
478 |
+
-webkit-font-smoothing : antialiased;
|
479 |
+
-moz-osx-font-smoothing : grayscale;
|
480 |
}
|
481 |
|
482 |
.yith-icon-reply:before {
|
484 |
color: #757575;
|
485 |
}
|
486 |
.yith-icon-calendar_add:before {
|
487 |
+
content : "\e913";
|
488 |
+
color : #757575;
|
489 |
}
|
490 |
|
491 |
.yith-icon-calendar_money:before {
|
492 |
+
content : "\e914";
|
493 |
+
color : #757575;
|
494 |
}
|
495 |
|
496 |
.yith-icon-calendar2:before {
|
497 |
+
content : "\e915";
|
498 |
+
color : #757575;
|
499 |
}
|
500 |
|
501 |
.yith-icon-people:before {
|
502 |
+
content : "\e916";
|
503 |
+
color : #757575;
|
504 |
}
|
505 |
|
506 |
.yith-icon-shield_money:before {
|
507 |
+
content : "\e917";
|
508 |
+
color : #757575;
|
509 |
}
|
510 |
|
511 |
.yith-icon-time_check:before {
|
512 |
+
content : "\e918";
|
513 |
+
color : #757575;
|
514 |
}
|
515 |
|
516 |
.yith-icon-world_settings:before {
|
517 |
+
content : "\e919";
|
518 |
+
color : #757575;
|
519 |
}
|
520 |
|
521 |
.yith-icon-arrow_eye_closed:before {
|
522 |
+
content : "\e912";
|
523 |
+
color : #757575;
|
524 |
}
|
525 |
|
526 |
.yith-icon-arrow_eye:before {
|
527 |
+
content : "\e911";
|
528 |
+
color : #757575;
|
529 |
}
|
530 |
|
531 |
.yith-icon-reset:before {
|
532 |
+
content : "\e910";
|
533 |
+
color : #757575;
|
534 |
}
|
535 |
|
536 |
.yith-icon-drag:before {
|
537 |
+
content : "\e90f";
|
538 |
+
color : #757575;
|
539 |
}
|
540 |
|
541 |
.yith-icon-trash:before {
|
542 |
+
content : "\e90d";
|
543 |
+
color : #757575;
|
544 |
}
|
545 |
|
546 |
.yith-icon-info:before {
|
547 |
+
content : "\e90e";
|
548 |
+
color : #757575;
|
549 |
}
|
550 |
|
551 |
.yith-icon-arrow_down:before {
|
552 |
+
content : "\e900";
|
553 |
+
color : #757575;
|
554 |
}
|
555 |
|
556 |
.yith-icon-arrow_left:before {
|
557 |
+
content : "\e901";
|
558 |
+
color : #757575;
|
559 |
}
|
560 |
|
561 |
.yith-icon-arrow_right:before {
|
562 |
+
content : "\e902";
|
563 |
+
color : #757575;
|
564 |
}
|
565 |
|
566 |
.yith-icon-arrow_up:before {
|
567 |
+
content : "\e903";
|
568 |
+
color : #757575;
|
569 |
}
|
570 |
|
571 |
.yith-icon-calendar:before {
|
572 |
+
content : "\e904";
|
573 |
+
color : #757575;
|
574 |
}
|
575 |
|
576 |
.yith-icon-check:before {
|
577 |
+
content : "\e905";
|
578 |
+
color : #757575;
|
579 |
}
|
580 |
|
581 |
.yith-icon-close:before {
|
582 |
+
content : "\e906";
|
583 |
+
color : #757575;
|
584 |
}
|
585 |
|
586 |
.yith-icon-edit:before {
|
587 |
+
content : "\e907";
|
588 |
+
color : #757575;
|
589 |
}
|
590 |
|
591 |
.yith-icon-magnifier:before {
|
592 |
+
content : "\e908";
|
593 |
+
color : #757575;
|
594 |
}
|
595 |
|
596 |
.yith-icon-pencil:before {
|
597 |
+
content : "\e909";
|
598 |
+
color : #757575;
|
599 |
}
|
600 |
|
601 |
.yith-icon-plus:before {
|
602 |
+
content : "\e90a";
|
603 |
+
color : #757575;
|
604 |
}
|
605 |
|
606 |
.yith-icon-update:before {
|
607 |
+
content : "\e90b";
|
608 |
+
color : #757575;
|
609 |
}
|
610 |
|
611 |
.yith-icon-upload:before {
|
612 |
+
content : "\e90c";
|
613 |
+
color : #757575;
|
614 |
}
|
615 |
|
616 |
.yith-plugin-fw-banner {
|
617 |
+
width : 100%;
|
618 |
+
height : 75px;
|
619 |
+
background : url('../images/banner-premium.png');
|
620 |
}
|
621 |
|
622 |
.yith-plugin-fw-banner.yith-plugin-fw-banner-free {
|
623 |
+
height : 290px;
|
624 |
+
background : url('../images/banner-free.png') no-repeat;
|
625 |
}
|
626 |
|
627 |
.yith-plugin-fw-banner.yith-plugin-fw-banner-free h1 {
|
628 |
+
max-width : auto;
|
629 |
+
text-align : left;
|
630 |
+
padding-left : 100px;
|
631 |
+
padding-top : 15px;
|
632 |
+
padding-bottom : 8px;
|
633 |
}
|
634 |
|
635 |
.yith-plugin-fw-banner h1 {
|
636 |
+
text-transform : uppercase;
|
637 |
+
color : #0c5777;
|
638 |
+
font-size : 15px;
|
639 |
+
padding-left : 150px;
|
640 |
+
font-weight : 700;
|
641 |
+
text-align : left;
|
642 |
+
display : inline-block;
|
643 |
+
box-sizing : border-box;
|
644 |
}
|
645 |
|
646 |
.yith-plugin-fw-banner span {
|
647 |
+
font-style : italic;
|
648 |
+
display : block;
|
649 |
+
font-size : 15px;
|
650 |
+
color : #214249;
|
651 |
+
text-transform : none;
|
652 |
+
text-align : right;
|
653 |
}
|
654 |
|
655 |
.yith-plugin-fw-banner a,
|
656 |
.yith-plugin-fw-banner a:focus {
|
657 |
+
text-decoration : none;
|
658 |
+
outline : none;
|
659 |
+
box-shadow : none;
|
660 |
}
|
661 |
|
662 |
.yith-banners ul {
|
663 |
+
list-style : none;
|
664 |
+
margin-left : 10px;
|
665 |
}
|
666 |
|
667 |
.yith-banners ul li {
|
668 |
+
display : inline-block;
|
669 |
+
margin-left : 10px;
|
670 |
}
|
671 |
|
672 |
.yith-plugin-ui a {
|
673 |
+
outline : none;
|
674 |
+
box-shadow : none;
|
675 |
}
|
676 |
|
677 |
.yith-plugin-ui {
|
678 |
+
font-family : -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
|
679 |
}
|
680 |
|
681 |
.yith-plugin-ui #wpwrap h2.nav-tab-wrapper, .yith-plugin-ui #wpbody-content h2.nav-tab-wrapper {
|
682 |
+
margin-top : 10px;
|
683 |
}
|
684 |
|
685 |
.yith-plugin-ui .nav-tab {
|
686 |
+
margin-left : 0px;
|
687 |
+
margin-right : 2px;
|
688 |
+
background-color : #336374;
|
689 |
+
color : #fff;
|
690 |
+
font-size : 15px;
|
691 |
+
padding : 7px 20px;
|
692 |
+
border : 0;
|
693 |
}
|
694 |
|
695 |
.yith-plugin-ui .nav-tab:first-child {
|
696 |
+
border-left : 1px solid #d9d9d9;
|
697 |
}
|
698 |
|
699 |
.yith-plugin-ui .nav-tab.yith-premium {
|
700 |
+
background-color : #be421c;
|
701 |
}
|
702 |
|
703 |
.yith-plugin-ui .nav-tab-active {
|
704 |
+
background-color : #fff;
|
705 |
+
color : #336374;
|
706 |
+
border-bottom : 1px solid #fff;
|
707 |
}
|
708 |
|
709 |
.yith-plugin-ui .nav-tab-active.yith-premium {
|
710 |
+
background-color : #fff;
|
711 |
+
color : #be421c;
|
712 |
}
|
713 |
|
714 |
.yith-plugin-ui #plugin-fw-wc {
|
715 |
+
padding-top : 0px;
|
716 |
}
|
717 |
|
718 |
.yith-plugin-ui .form-table td {
|
719 |
+
padding : 15px 20px;
|
720 |
}
|
721 |
|
722 |
.yith-plugin-ui.metaboxes-tab label {
|
723 |
+
color : #33373b;
|
724 |
+
font-size : 14px;
|
725 |
+
margin-left : -248px;
|
726 |
}
|
727 |
|
728 |
.yith-plugin-ui.metaboxes-tab .the-metabox {
|
729 |
+
margin : 40px 0 40px 290px;
|
730 |
+
margin-left : 264px;
|
731 |
}
|
732 |
|
733 |
.yith-plugin-ui.metaboxes-tab label {
|
734 |
+
width : 200px;
|
735 |
+
font-weight : 600;
|
736 |
}
|
737 |
|
738 |
.yith-plugin-ui span.description {
|
739 |
+
color : #716269;
|
740 |
+
font-size : 14px;
|
741 |
+
font-style : normal;
|
742 |
+
font-weight : 400;
|
743 |
+
margin-top : 15px;
|
744 |
+
margin-left : 0;
|
745 |
}
|
746 |
|
747 |
#wpwrap .yith-plugin-ui h2.nav-tab-wrapper, #wpbody-content .yith-plugin-ui h2.nav-tab-wrapper {
|
748 |
+
border : 0;
|
749 |
+
border-bottom : 1px solid #ccc;
|
750 |
+
margin-right : 15px;
|
751 |
+
margin-bottom : 0;
|
752 |
+
background-color : transparent;
|
753 |
+
padding-left : 0;
|
754 |
}
|
755 |
|
756 |
.yith-plugin-ui #plugin-fw-wc table.form-table,
|
757 |
.yith-plugin-ui #yith-plugin-fw-panel table.form-table,
|
758 |
.yith-plugin-ui table.form-table {
|
759 |
+
border : 1px solid #d8d8d8;
|
760 |
+
border-top : 0;
|
761 |
+
margin-bottom : 40px;
|
762 |
}
|
763 |
|
764 |
.yith-plugin-ui #wpwrap h2.nav-tab-wrapper, .yith-plugin-ui #wpbody-content h2.nav-tab-wrapper {
|
765 |
+
background-color : transparent;
|
766 |
+
border : 0;
|
767 |
+
text-transform : none;
|
768 |
+
border-bottom : 1px solid #ddd;
|
769 |
}
|
770 |
|
771 |
.yith-plugin-ui h2 {
|
772 |
+
color : #2a8db0;
|
773 |
+
font-size : 15px;
|
774 |
+
text-transform : uppercase;
|
775 |
+
border : 1px solid #d8d8d8;
|
776 |
+
border-bottom : 0;
|
777 |
+
background-color : #fff;
|
778 |
+
padding : 35px 20px;
|
779 |
+
margin : 0px;
|
780 |
}
|
781 |
|
782 |
.yith-plugin-ui .yith-plugin-fw-custom-tab h2 {
|
783 |
+
border : 0px solid #d8d8d8;
|
784 |
+
padding-left : 0;
|
785 |
}
|
786 |
|
787 |
.yith-plugin-ui #plugin-fw-wc table.form-table th, #yith-plugin-fw-panel table.form-table th.titledesc, .yith-plugin-ui #plugin-fw-wc table.form-table td, #yith-plugin-fw-panel table.form-table td.forminp {
|
788 |
+
padding : 30px 20px;
|
789 |
}
|
790 |
.yith-plugin-ui #plugin-fw-wc table.form-table tr.toggle-element-fixed td, #yith-plugin-fw-panel table.form-table tr.toggle-element-fixed td.forminp {
|
791 |
padding: 0 20px 30px;
|
792 |
}
|
793 |
.yith-plugin-ui #plugin-fw-wc h2 + div {
|
794 |
+
background : #fff;
|
795 |
+
border-left : 1px solid #d9d9d9;
|
796 |
+
border-right : 1px solid #d9d9d9;
|
797 |
+
margin : -20px 0 0 0;
|
798 |
+
padding-left : 20px;
|
799 |
+
padding-bottom : 5px;
|
800 |
}
|
801 |
|
802 |
.yith-plugin-ui #plugin-fw-wc h2 + div p, .yith-plugin-ui p.info-box {
|
803 |
+
background : #f1f1f1;
|
804 |
+
font-size : 14px;
|
805 |
+
font-weight : 700;
|
806 |
+
width : 40%;
|
807 |
+
display : block;
|
808 |
+
padding : 15px;
|
809 |
+
margin-bottom : 0;
|
810 |
}
|
811 |
|
812 |
.yith-plugin-ui #plugin-fw-wc h2 + div p:before, .yith-plugin-ui p.info-box:before {
|
813 |
+
content : "\e90e";
|
814 |
+
font-family : yith-icon;
|
815 |
+
font-size : 30px;
|
816 |
+
font-weight : normal;
|
817 |
+
display : block;
|
818 |
+
margin-top : -5px;
|
819 |
+
float : left;
|
820 |
+
margin-right : 15px;
|
821 |
}
|
822 |
|
823 |
.yith-plugin-ui h2:first-child {
|
824 |
+
border-top : 0;
|
825 |
}
|
826 |
|
827 |
/*** Icon ***/
|
828 |
.yith-plugin-ui span.yith-icon {
|
829 |
+
margin-left : -36px;
|
830 |
+
line-height : 36px;
|
831 |
+
font-size : 20px;
|
832 |
}
|
833 |
|
834 |
/*** General Input Style ***/
|
849 |
.woocommerce .yith-plugin-fw table.form-table input[type=password],
|
850 |
.woocommerce.yith-plugin-fw-panel .yith-plugin-ui table.form-table input[type=number],
|
851 |
.woocommerce.yith-plugin-fw-panel .yith-plugin-ui table.form-table input[type=text] {
|
852 |
+
border : 1px solid #d8d8d8;
|
853 |
+
border-radius : 8px;
|
854 |
+
padding : 8px 10px;
|
855 |
+
height : 38px;
|
856 |
+
min-width : 90px;
|
857 |
+
box-shadow : none;
|
858 |
+
color : #716269;
|
859 |
}
|
860 |
|
861 |
.yith-plugin-ui textarea,
|
862 |
.woocommerce.yith-plugin-fw-panel .yith-plugin-ui table.form-table textarea {
|
863 |
+
height : auto;
|
864 |
}
|
865 |
|
866 |
+
.yith-plugin-ui input[type=text]:not(.select2-search__field).wp-color-picker,
|
867 |
.yith-plugin-ui table.form-table input[type=text].wp-color-picker,
|
868 |
.woocommerce.yith-plugin-fw-panel .yith-plugin-ui table.form-table input[type=text].wp-color-picker {
|
869 |
+
border: 0;
|
870 |
+
height: 30px;
|
871 |
+
max-width: 121px;
|
872 |
+
font-size: 11px;
|
873 |
+
padding: 0;
|
|
|
874 |
}
|
875 |
|
876 |
.yith-plugin-ui .search-box input[name="s"] {
|
877 |
+
height : 35px;
|
878 |
}
|
879 |
|
880 |
.woocommerce.yith-plugin-fw-panel .yith-plugin-ui table.form-table input[type=text].small-text,
|
881 |
.yith-plugin-ui input[type=text].small-text {
|
882 |
+
width : 100px;
|
883 |
+
height : 25px;
|
884 |
+
border : 1px solid #d9d9d9;
|
885 |
}
|
886 |
|
887 |
.yith-plugin-ui textarea {
|
888 |
+
height : auto;
|
889 |
+
padding : 8px;
|
890 |
}
|
891 |
|
892 |
.yith-plugin-ui select:focus,
|
893 |
.yith-plugin-ui input:focus {
|
894 |
+
border-color : #a7d9ec !important;
|
895 |
}
|
896 |
|
897 |
.woocommerce .yith-plugin-ui table.form-table select,
|
898 |
.yith-plugin-ui select {
|
899 |
+
-webkit-appearance : none;
|
900 |
+
line-height : 1.2em;
|
901 |
+
min-height : 35px;
|
902 |
+
background : url("../images/arrow_down.svg") no-repeat right center;
|
903 |
+
background-size : 35px 13px;
|
904 |
+
border-radius : 8px;
|
905 |
+
padding-left : 10px;
|
906 |
}
|
907 |
|
908 |
.yith-plugin-ui .form-table th {
|
909 |
+
width : 200px;
|
910 |
+
padding-right : 50px;
|
911 |
}
|
912 |
|
913 |
/** BUTTONS **/
|
921 |
.yith-plugin-ui .yith-plugin-fw-deselect-all,
|
922 |
.yith-plugin-ui .yith-plugin-fw-upload-button,
|
923 |
.yith-plugin-ui .yith-plugin-fw-upload-button-reset {
|
924 |
+
border-radius : 3px;
|
925 |
+
text-transform : uppercase;
|
926 |
+
box-shadow : none;
|
927 |
+
border : 0;
|
928 |
+
font-weight : 700;
|
929 |
+
font-size : 11px;
|
930 |
+
padding : 0px 14px;
|
931 |
+
outline : none;
|
932 |
+
height : auto;
|
933 |
+
transition : all ease 0.3s;
|
934 |
+
background-color : #d6d6d6;
|
935 |
+
color : #656565;
|
936 |
+
text-shadow : none;
|
937 |
+
vertical-align : middle;
|
938 |
+
line-height : 26px;
|
939 |
+
display : inline-block;
|
940 |
+
text-decoration : none;
|
941 |
+
cursor : pointer;
|
942 |
}
|
943 |
|
944 |
.wp-core-ui .yith-plugin-ui .button-secondary.yith-plugin-fw-upload-button-reset,
|
946 |
.yith-plugin-ui .yith-plugin-fw-upload-button-reset,
|
947 |
.yith-plugin-ui .button-secondary.yith-plugin-fw-upload-button-reset,
|
948 |
.yith-plugin-ui .button-secondary.yith-plugin-fw-upload-button {
|
949 |
+
height : 38px;
|
950 |
}
|
951 |
|
952 |
.wp-core-ui .yith-plugin-ui .button:focus,
|
956 |
.yith-plugin-ui .yith-edit-button:focus,
|
957 |
.yith-plugin-ui .yith-update-button:focus,
|
958 |
.wp-core-ui .yith-plugin-ui .button-secondary:focus {
|
959 |
+
outline : none;
|
960 |
+
box-shadow : none;
|
961 |
}
|
962 |
|
963 |
.wp-core-ui .yith-plugin-ui .button-xl {
|
964 |
+
padding : 0px 20px;
|
965 |
+
font-size : 14px;
|
966 |
+
line-height : 38px;
|
967 |
+
display : inline-block;
|
968 |
+
font-weight : 600;
|
969 |
}
|
970 |
|
971 |
/** button with inside a span with icon class */
|
972 |
.yith-plugin-ui .button-secondary span.yith-icon {
|
973 |
+
margin-left : 0px;
|
974 |
+
margin-right : 10px;
|
975 |
+
line-height : normal;
|
976 |
}
|
977 |
|
978 |
.yith-plugin-ui .button-secondary span.yith-icon:before {
|
979 |
+
color : #656565;
|
980 |
+
font-size : 15px;
|
981 |
}
|
982 |
|
983 |
|
986 |
.yith-plugin-ui .yith-save-button:hover,
|
987 |
.wp-core-ui .yith-plugin-ui .button-secondary:hover,
|
988 |
.yith-plugin-ui .yith-plugin-fw-upload-button-reset:hover {
|
989 |
+
background-color : #cacaca;
|
990 |
+
color : #515151;
|
991 |
}
|
992 |
|
993 |
.wp-core-ui .yith-plugin-ui .button-primary,
|
994 |
.yith-plugin-ui .button-secondary.yith-plugin-fw-select-all,
|
995 |
.yith-plugin-ui .button-secondary.yith-plugin-fw-upload-button {
|
996 |
+
background-color : #007694;
|
997 |
+
color : #fff;
|
998 |
}
|
999 |
|
1000 |
|
1001 |
.yith-plugin-ui .yith-add-button,
|
1002 |
.wp-core-ui .yith-plugin-ui .button-primary:focus,
|
1003 |
.wp-core-ui .yith-plugin-ui .button-primary:hover {
|
1004 |
+
background-color : #375f6b;
|
1005 |
+
color : #fff;
|
1006 |
+
cursor : pointer;
|
1007 |
}
|
1008 |
|
1009 |
|
1012 |
.yith-plugin-ui .button-secondary.yith-plugin-fw-select-all:hover,
|
1013 |
.yith-plugin-ui .button-secondary.yith-plugin-fw-select-all:focus,
|
1014 |
.yith-plugin-ui .yith-plugin-fw-upload-button:hover {
|
1015 |
+
border-color : #007694;
|
1016 |
+
background : #007694;
|
1017 |
+
color : #fff;
|
1018 |
+
line-height : 26px;
|
1019 |
+
margin-left : 0;
|
1020 |
}
|
1021 |
|
1022 |
.yith-plugin-ui .button-primary:before,
|
1025 |
.yith-plugin-ui .yith-edit-button:before,
|
1026 |
.yith-plugin-ui .yith-update-button:before,
|
1027 |
.yith-plugin-ui .button-secondary:before {
|
1028 |
+
font-family : 'yith-icon';
|
1029 |
+
font-size : 10px;
|
1030 |
+
font-weight : 700;
|
1031 |
+
margin-right : 10px;
|
1032 |
+
vertical-align : bottom;
|
1033 |
+
display : inline-block;
|
1034 |
}
|
1035 |
|
1036 |
/** yith-edit-button **/
|
1037 |
.yith-plugin-ui .yith-edit-button {
|
1038 |
+
background-color : #7f9298;
|
1039 |
+
color : #fff;
|
1040 |
}
|
1041 |
|
1042 |
.yith-plugin-ui .yith-edit-button:focus,
|
1043 |
.yith-plugin-ui .yith-edit-button:hover {
|
1044 |
+
background-color : #718085;
|
1045 |
+
color : #fff;
|
1046 |
}
|
1047 |
|
1048 |
.yith-plugin-ui .yith-edit-button:before {
|
1049 |
+
content : "\e907";
|
1050 |
}
|
1051 |
|
1052 |
/** yith-update-button **/
|
1053 |
.yith-plugin-ui .yith-update-button {
|
1054 |
+
background-color : #94aa09;
|
1055 |
+
color : #fff;
|
1056 |
}
|
1057 |
|
1058 |
.yith-plugin-ui .yith-update-button:focus,
|
1059 |
.yith-plugin-ui .yith-update-button:hover {
|
1060 |
+
background-color : #7a9009;
|
1061 |
+
color : #fff;
|
1062 |
}
|
1063 |
|
1064 |
.yith-plugin-ui .yith-update-button:before {
|
1065 |
+
content : "\e90b";
|
1066 |
+
font-size : 15px;
|
1067 |
}
|
1068 |
|
1069 |
/** yith-save-button **/
|
1070 |
|
1071 |
.yith-plugin-ui .yith-save-button {
|
1072 |
+
background-color : #267390;
|
1073 |
+
color : #fff;
|
1074 |
}
|
1075 |
|
1076 |
.yith-plugin-ui .yith-save-button:focus,
|
1077 |
.yith-plugin-ui .yith-save-button:hover {
|
1078 |
+
background-color : #1c4863;
|
1079 |
+
color : #fff;
|
1080 |
}
|
1081 |
|
1082 |
|
1083 |
/** yith-remove-button **/
|
1084 |
|
1085 |
.yith-plugin-ui .button-secondary.yith-remove-button:before {
|
1086 |
+
content : "\e90d";
|
1087 |
+
font-size : 15px;
|
1088 |
}
|
1089 |
|
1090 |
|
1091 |
/** yith-add-button **/
|
1092 |
.yith-plugin-ui .yith-add-button:before {
|
1093 |
+
content : "\e90a";
|
1094 |
}
|
1095 |
|
1096 |
.yith-plugin-ui .yith-add-button.closed {
|
1097 |
+
background-color : #fff;
|
1098 |
+
color : #375f6b;
|
1099 |
+
border : 1px solid #375f6b;
|
1100 |
}
|
1101 |
|
1102 |
.yith-plugin-ui .yith-add-button.closed:before {
|
1103 |
+
content : "\e906";
|
1104 |
}
|
1105 |
|
1106 |
|
1107 |
/** yith-plugin-fw-upload-button **/
|
1108 |
.yith-plugin-ui button.yith-plugin-fw-upload-button:before {
|
1109 |
+
content : "\e90c";
|
1110 |
+
font-family : 'yith-icon';
|
1111 |
+
font-size : 19px;
|
1112 |
+
font-weight : 400;
|
1113 |
+
margin-right : 10px;
|
1114 |
+
vertical-align : middle;
|
1115 |
+
display : inline-block;
|
1116 |
}
|
1117 |
|
1118 |
/** SELECT 2 **/
|
1119 |
.yith-plugin-ui .select2-container,
|
1120 |
.yith-plugin-ui .select2-selection--single {
|
1121 |
+
height : auto;
|
1122 |
+
padding : 2px;
|
1123 |
+
outline : none;
|
1124 |
}
|
1125 |
|
1126 |
.yith-plugin-ui .select2-selection--single {
|
1127 |
+
margin : 0;
|
1128 |
+
border : 0;
|
1129 |
}
|
1130 |
|
1131 |
/* old panel*/
|
1132 |
|
1133 |
+
.yith-plugin-ui span.select2.select2-container.select2-container--default,
|
1134 |
+
span.select2.select2-container.select2-container--default.yith-plugin-fw-select2-container {
|
1135 |
+
border : 1px solid #d8d8d8;
|
1136 |
+
border-radius : 8px;
|
1137 |
}
|
1138 |
|
1139 |
.yith-plugin-ui span.select2.select2-container.select2-container--default:hover,
|
1140 |
.yith-plugin-ui span.select2.select2-container.select2-container--default:active,
|
1141 |
.yith-plugin-ui span.select2.select2-container.select2-container--default:focus {
|
1142 |
+
border-color : #a7d9ec;
|
1143 |
}
|
1144 |
|
1145 |
.yith-plugin-ui .select2-container--default .select2-selection--multiple .select2-selection__choice__remove {
|
1146 |
+
color : #fff;
|
1147 |
}
|
1148 |
|
1149 |
.woocommerce.yith-plugin-fw-panel .yith-plugin-ui table.form-table input[type=text].select2-search__field,
|
1150 |
.yith-plugin-ui .yith-plugin-fw table.form-table input.select2-search__field {
|
1151 |
+
border : 0;
|
1152 |
+
padding : 0;
|
1153 |
+
height : initial;
|
1154 |
}
|
1155 |
|
1156 |
.yith-plugin-ui .select2-container--default .select2-selection--multiple .select2-selection__choice,
|
1157 |
.yith-plugin-ui .select2-selection__choice {
|
1158 |
+
color : #fff;
|
1159 |
+
background-color : #4e8ba2;
|
1160 |
+
border-radius : 12px;
|
1161 |
+
padding : 3px 11px;
|
1162 |
+
border-color : #4e8ba2;
|
1163 |
+
font-size : 13px;
|
1164 |
}
|
1165 |
|
1166 |
.yith-plugin-ui .select2-container--default .select2-selection--single .select2-selection__arrow:before {
|
1167 |
+
content : "\e900";
|
1168 |
+
font-family : 'yith-icon' !important;
|
1169 |
+
line-height : 36px;
|
1170 |
+
color : #d9d9d9;
|
1171 |
}
|
1172 |
|
1173 |
.yith-plugin-ui .select2-container--default .select2-selection--single .select2-selection__arrow b {
|
1174 |
+
display : none;
|
1175 |
+
}
|
1176 |
+
|
1177 |
+
.yith-plugin-fw-select2-container.select2-container--open .select2-dropdown--below,
|
1178 |
+
.yith-plugin-fw-select2-container.select2-container--open .select2-dropdown--above {
|
1179 |
+
margin-top : 10px;
|
1180 |
+
border-radius : 8px;
|
1181 |
+
box-shadow : 0 2px 4px 0 rgba(0, 0, 0, 0.12), 0 2px 10px 0 rgba(0, 0, 0, 0.12) !important;
|
1182 |
}
|
1183 |
|
1184 |
+
.yith-plugin-fw-select2-container.select2-container--open .select2-dropdown--above {
|
1185 |
+
margin-top : -10px;
|
|
|
|
|
|
|
|
|
|
|
1186 |
}
|
1187 |
|
1188 |
+
.yith-plugin-fw-select2-container.select2-container--default.select2-container--open.select2-container--below .select2-selection--single,
|
1189 |
+
.yith-plugin-fw-select2-container.select2-container--default.select2-container--open.select2-container--above .select2-selection--single {
|
1190 |
+
border-radius : 8px;
|
1191 |
}
|
1192 |
|
1193 |
+
.yith-plugin-fw-select2-container .select2-results .select2-results__group, .select2-results .select2-results__option:first-child {
|
1194 |
+
border-top-left-radius : 8px;
|
1195 |
+
border-top-right-radius : 8px;
|
|
|
|
|
1196 |
}
|
1197 |
|
1198 |
+
.yith-plugin-fw-select2-container .select2-results .select2-results__group,
|
1199 |
+
.yith-plugin-fw-select2-container .select2-results .select2-results__option:last-child {
|
1200 |
+
border-bottom-left-radius : 8px;
|
1201 |
+
border-bottom-right-radius : 8px;
|
1202 |
}
|
1203 |
+
|
1204 |
+
.yith-plugin-fw-select2-container .select2-dropdown {
|
1205 |
+
border : 0;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1206 |
}
|
1207 |
|
1208 |
+
.yith-plugin-fw-select2-container.select2-container--default .select2-results__option[data-selected=true] {
|
1209 |
+
background-color : #fff;
|
1210 |
+
outline : none;
|
1211 |
}
|
1212 |
+
|
1213 |
+
.yith-plugin-fw-select2-container.select2-container--default .select2-results__option--highlighted[aria-selected] {
|
1214 |
+
background-color : #e8eff1;
|
1215 |
+
color : #4e8ba2;
|
1216 |
+
outline : none;
|
|
|
|
|
|
|
|
|
|
|
|
|
1217 |
}
|
1218 |
|
1219 |
.yith-plugin-ui .select2-container--default .select2-selection--multiple .select2-selection__choice__remove,
|
1220 |
.yith-plugin-fw-panel .select2-container--default .select2-selection--multiple .select2-selection__choice__remove {
|
1221 |
+
float : right;
|
1222 |
+
padding-left : 15px;
|
1223 |
+
text-indent : -9999px;
|
1224 |
}
|
1225 |
|
1226 |
|
1227 |
.select2-container--default .select2-selection--multiple .select2-selection__choice__remove:after,
|
1228 |
.woocommerce .yith-plugin-ui .select2-container--default .select2-selection--multiple .select2-selection__choice__remove:after,
|
1229 |
.yith-plugin-ui .select2-container--default .select2-selection--multiple .select2-selection__choice__remove:after {
|
1230 |
+
float : right;
|
1231 |
+
color : #fff;
|
1232 |
+
content : "\e906";
|
1233 |
+
font-family : 'yith-icon' !important;
|
1234 |
+
font-size : 9px;
|
1235 |
+
line-height : 21px;
|
1236 |
+
text-indent : 0;
|
1237 |
}
|
1238 |
|
1239 |
.select2-container--default .select2-selection--multiple .select2-selection__choice__remove:after {
|
1240 |
+
color : #000;
|
1241 |
}
|
1242 |
|
1243 |
.yith-plugin-ui .select2-container--default .select2-selection--multiple .select2-selection__choice__remove:after
|
1244 |
.yith-plugin-fw-panel .select2-container--default .select2-selection--multiple .select2-selection__choice__remove:after {
|
1245 |
+
color : #000;
|
1246 |
}
|
1247 |
|
1248 |
.yith-plugin-ui .select2-container .select2-selection--multiple,
|
1249 |
.yith-plugin-ui .select2-container--default.select2-container--focus .select2-selection--multiple {
|
1250 |
+
border : 0;
|
1251 |
}
|
1252 |
|
1253 |
.yith-plugin-fw .select2-search input[type=text] {
|
1254 |
+
border : 0;
|
1255 |
+
padding : 0;
|
1256 |
+
height : auto;
|
1257 |
}
|
1258 |
|
1259 |
.yith-plugin-ui .yith-plugin-fw-select-field-wrapper span.yith-icon.yith-icon-magnifier,
|
1260 |
.yith-plugin-fw-panel .yith-plugin-fw-select-field-wrapper span.yith-icon.yith-icon-magnifier {
|
1261 |
+
position : absolute;
|
1262 |
+
padding-top : 5px;
|
1263 |
}
|
1264 |
|
1265 |
.yith-plugin-ui input[type=text].select2-search__field {
|
1266 |
+
border : 0;
|
1267 |
+
padding : 0;
|
1268 |
+
height : 30px;
|
1269 |
}
|
1270 |
|
1271 |
.yith-plugin-ui .select2-container--default .select2-search--dropdown .select2-search__field,
|
1272 |
.yith-plugin-fw-panel .select2-container--default .select2-search--dropdown .select2-search__field {
|
1273 |
+
border : 1px solid #d9d9d9;
|
1274 |
+
border-radius : 8px;
|
1275 |
+
box-shadow : none;
|
1276 |
}
|
1277 |
|
1278 |
.yith-plugin-ui .select2-dropdown,
|
1279 |
.yith-plugin-fw-panel .select2-dropdown {
|
1280 |
+
border : 1px solid #d9d9d9;
|
1281 |
}
|
1282 |
|
1283 |
/** RADIO BUTTON **/
|
1284 |
.yith-plugin-ui [type="radio"]:checked,
|
1285 |
.yith-plugin-ui [type="radio"]:not(:checked) {
|
1286 |
+
position : absolute;
|
1287 |
+
left : -9999px;
|
1288 |
}
|
1289 |
|
1290 |
.yith-plugin-ui [type="radio"]:checked + label,
|
1291 |
.yith-plugin-ui [type="radio"]:not(:checked) + label {
|
1292 |
+
position : relative;
|
1293 |
+
padding-left : 35px;
|
1294 |
+
cursor : pointer;
|
1295 |
+
line-height : 20px;
|
1296 |
+
display : inline-block;
|
1297 |
+
color : #716269;
|
1298 |
+
font-size : 14px;
|
1299 |
}
|
1300 |
|
1301 |
.yith-plugin-ui [type="radio"]:checked + label:before,
|
1302 |
.yith-plugin-ui [type="radio"]:not(:checked) + label:before {
|
1303 |
+
content : '';
|
1304 |
+
position : absolute;
|
1305 |
+
left : 0;
|
1306 |
+
top : 0;
|
1307 |
+
width : 19px;
|
1308 |
+
height : 19px;
|
1309 |
+
border : 1px solid #d8d8d8;
|
1310 |
+
border-radius : 100%;
|
1311 |
+
background : #fff;
|
1312 |
}
|
1313 |
|
1314 |
.yith-plugin-ui [type="radio"]:checked + label:after,
|
1315 |
.yith-plugin-ui [type="radio"]:not(:checked) + label:after {
|
1316 |
+
content : '';
|
1317 |
+
width : 13px;
|
1318 |
+
height : 13px;
|
1319 |
+
background : #4e8ba2;
|
1320 |
+
position : absolute;
|
1321 |
+
top : 4px;
|
1322 |
+
left : 4px;
|
1323 |
+
border-radius : 100%;
|
1324 |
+
-webkit-transition : all 0.2s ease;
|
1325 |
+
transition : all 0.2s ease;
|
1326 |
}
|
1327 |
|
1328 |
.yith-plugin-ui [type="radio"]:not(:checked) + label:after {
|
1329 |
+
opacity : 0;
|
1330 |
+
-webkit-transform : scale(0);
|
1331 |
+
transform : scale(0);
|
1332 |
}
|
1333 |
|
1334 |
.yith-plugin-ui [type="radio"]:checked + label:after {
|
1335 |
+
opacity : 1;
|
1336 |
+
-webkit-transform : scale(1);
|
1337 |
+
transform : scale(1);
|
1338 |
}
|
1339 |
|
1340 |
/** CHECKBOX **/
|
1341 |
.yith-plugin-ui input[type="checkbox"] {
|
1342 |
+
-webkit-appearance : none;
|
1343 |
+
background-color : #fff;
|
1344 |
+
border : 1px solid #d8d8d8;
|
1345 |
+
box-shadow : none;
|
1346 |
+
width : 18px;
|
1347 |
+
height : 18px;
|
1348 |
+
border-radius : 3px;
|
1349 |
+
display : inline-block;
|
1350 |
+
position : relative;
|
|
|
1351 |
}
|
1352 |
|
1353 |
.yith-plugin-ui input[type="checkbox"]:checked {
|
1354 |
+
background-color : #4e8ba2;
|
1355 |
+
border-color : #488197;
|
1356 |
}
|
1357 |
|
1358 |
.yith-plugin-ui .forminp-checkbox span.description.inline {
|
1359 |
+
margin-left : 10px;
|
1360 |
}
|
1361 |
|
1362 |
.yith-plugin-ui input[type="checkbox"]:checked:before {
|
1363 |
+
display : none;
|
1364 |
}
|
1365 |
|
1366 |
.yith-plugin-ui input[type="checkbox"]:checked:after {
|
1367 |
+
content : "\e905";
|
1368 |
+
font-family : 'yith-icon';
|
1369 |
+
font-size : 15px;
|
1370 |
+
position : absolute;
|
1371 |
+
top : 8px;
|
1372 |
+
left : 1px;
|
1373 |
+
color : #fff;
|
1374 |
}
|
1375 |
|
1376 |
/** ONOFF **/
|
1377 |
.yith-plugin-ui .yith-plugin-fw-onoff-container input[type="checkbox"] {
|
1378 |
+
display : none;
|
1379 |
}
|
1380 |
|
1381 |
.yith-plugin-ui .yith-plugin-fw-onoff-container input + span {
|
1382 |
+
border : 1px solid #d8d8d8;
|
1383 |
+
background-color : #fff;
|
1384 |
+
width : 60px;
|
1385 |
+
height : 24px;
|
1386 |
}
|
1387 |
|
1388 |
.yith-plugin-ui .yith-plugin-fw-onoff-container input + span:before {
|
1389 |
+
background-color : #d8d8d8;
|
1390 |
}
|
1391 |
|
1392 |
.yith-plugin-ui .yith-plugin-fw-onoff-container input + span:before {
|
1393 |
+
width : 14px;
|
1394 |
+
height : 14px;
|
1395 |
+
top : 5px;
|
1396 |
+
left : 6px;
|
1397 |
+
background-color : #d8d8d8;
|
1398 |
}
|
1399 |
|
1400 |
.yith-plugin-ui .yith-plugin-fw-onoff-container input + span:after {
|
1401 |
+
content : 'OFF';
|
1402 |
+
width : 14px;
|
1403 |
+
height : 14px;
|
1404 |
+
font-size : 13px;
|
1405 |
+
font-weight : 600;
|
1406 |
+
padding-left : 27px;
|
1407 |
+
color : #979797;
|
1408 |
+
margin-top : 5px;
|
1409 |
+
display : inline-block;
|
1410 |
+
white-space : nowrap;
|
1411 |
}
|
1412 |
|
1413 |
.yith-plugin-ui .yith-plugin-fw-onoff-container input:checked + span,
|
1414 |
.yith-plugin-ui .yith-plugin-fw-onoff-container input.onoffchecked + span {
|
1415 |
+
background-color : #fff;
|
1416 |
+
border-color : #98aa36;
|
1417 |
}
|
1418 |
|
1419 |
.yith-plugin-ui .yith-plugin-fw-onoff-container input:checked + span:before,
|
1420 |
.yith-plugin-ui.yith-plugin-fw-onoff-container input.onoffchecked + span:before {
|
1421 |
+
background-color : #98aa36;
|
1422 |
+
left : 41px;
|
1423 |
}
|
1424 |
|
1425 |
.yith-plugin-ui .yith-plugin-fw-onoff-container input:checked + span:after,
|
1426 |
.yith-plugin-ui.yith-plugin-fw-onoff-container input.onoffchecked + span:after {
|
1427 |
+
content : 'ON';
|
1428 |
+
color : #98aa36;
|
1429 |
+
width : 14px;
|
1430 |
+
height : 14px;
|
1431 |
+
display : inline-block;
|
1432 |
+
font-size : 13px;
|
1433 |
+
font-weight : 600;
|
1434 |
+
padding : 0 10px;
|
1435 |
+
margin-top : 5px;
|
1436 |
+
white-space : nowrap;
|
1437 |
}
|
1438 |
|
1439 |
.yith-plugin-ui .yith-plugin-fw-onoff-container input + span {
|
1440 |
+
text-indent : 0;
|
1441 |
}
|
1442 |
|
1443 |
|
1444 |
/**
|
1445 |
DATEPICKER
|
1446 |
*/
|
1447 |
+
div#ui-datepicker-div.yith-plugin-fw-datepicker-div {
|
1448 |
+
border : 0;
|
1449 |
+
box-shadow : 0 2px 4px 0 rgba(0, 0, 0, 0.12), 0 2px 10px 0 rgba(0, 0, 0, 0.12) !important;
|
|
|
1450 |
}
|
1451 |
|
1452 |
+
#ui-datepicker-div.yith-plugin-fw-datepicker-div .ui-datepicker-header.ui-widget-header {
|
1453 |
+
background : #4e8ba2;
|
1454 |
+
color : #fff;
|
1455 |
+
font-size : 11px;
|
1456 |
+
line-height : 25px;
|
1457 |
+
border : 0;
|
1458 |
+
min-height : 25px;
|
1459 |
+
}
|
1460 |
+
|
1461 |
+
#ui-datepicker-div.yith-plugin-fw-datepicker-div .ui-datepicker-title {
|
1462 |
+
line-height : 25px;
|
1463 |
+
}
|
1464 |
+
|
1465 |
+
#ui-datepicker-div.yith-plugin-fw-datepicker-div.ui-datepicker th {
|
1466 |
+
color : #716269;
|
1467 |
+
}
|
1468 |
+
|
1469 |
+
#ui-datepicker-div.yith-plugin-fw-datepicker-div .ui-widget-header .ui-icon,
|
1470 |
+
#ui-datepicker-div.yith-plugin-fw-datepicker-div .ui-widget-header .ui-state-hover,
|
1471 |
+
#ui-datepicker-div.yith-plugin-fw-datepicker-div.ui-datepicker .ui-datepicker-prev,
|
1472 |
+
#ui-datepicker-div.yith-plugin-fw-datepicker-div.ui-datepicker .ui-datepicker-next,
|
1473 |
+
#ui-datepicker-div.yith-plugin-fw-datepicker-div .ui-icon.ui-icon-circle-triangle-w,
|
1474 |
+
#ui-datepicker-div.yith-plugin-fw-datepicker-div .ui-icon.ui-icon-circle-triangle-e {
|
1475 |
+
background : none;
|
1476 |
+
content : "";
|
1477 |
+
border : 0;
|
1478 |
+
text-indent : 0;
|
1479 |
+
width : 15px;
|
1480 |
+
height : 20px;
|
1481 |
+
display : block;
|
1482 |
+
overflow : hidden;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1483 |
}
|
1484 |
|
1485 |
.yith-plugin-ui .yith-password-wrapper {
|
1486 |
+
display : inline-block;
|
1487 |
+
width : auto;
|
1488 |
+
position : relative;
|
1489 |
}
|
1490 |
|
1491 |
.yith-plugin-ui .yith-password-wrapper .yith-password-eye-closed:before,
|
1492 |
.yith-plugin-ui .yith-password-wrapper .yith-password-eye:before {
|
1493 |
+
content : '\e911';
|
1494 |
+
color : #999;
|
1495 |
+
font-family : 'yith-icon';
|
1496 |
+
font-size : 20px;
|
1497 |
+
font-weight : normal;
|
1498 |
+
width : 15px;
|
1499 |
+
display : block;
|
1500 |
+
position : absolute;
|
1501 |
+
right : 13px;
|
1502 |
+
top : 0;
|
1503 |
+
line-height : 38px;
|
1504 |
+
bottom : 0;
|
1505 |
+
cursor : pointer;
|
1506 |
}
|
1507 |
|
1508 |
.yith-plugin-ui .yith-password-wrapper .yith-password-eye-closed:before {
|
1509 |
+
content : '\e912';
|
1510 |
}
|
1511 |
|
1512 |
+
#ui-datepicker-div.yith-plugin-fw-datepicker-div .ui-icon.ui-icon-circle-triangle-w:before {
|
1513 |
+
content : "\e901";
|
1514 |
+
color : #fff;
|
1515 |
+
font-family : 'yith-icon';
|
1516 |
+
font-size : 12px;
|
1517 |
+
font-weight : normal;
|
1518 |
+
width : 15px;
|
1519 |
+
display : block;
|
|
|
1520 |
}
|
1521 |
|
1522 |
+
#ui-datepicker-div.yith-plugin-fw-datepicker-div .ui-icon.ui-icon-circle-triangle-e:before {
|
1523 |
+
content : "\e902";
|
1524 |
+
color : #fff;
|
1525 |
+
text-indent : 0;
|
1526 |
+
font-family : 'yith-icon';
|
1527 |
+
font-size : 12px;
|
1528 |
+
font-weight : normal;
|
1529 |
+
width : 15px;
|
1530 |
+
display : block;
|
|
|
1531 |
}
|
1532 |
|
1533 |
/* arrow */
|
1534 |
+
#ui-datepicker-div.yith-plugin-fw-datepicker-div.ui-datepicker .ui-datepicker-prev,
|
1535 |
+
#ui-datepicker-div.yith-plugin-fw-datepicker-div.ui-datepicker .ui-datepicker-next,
|
1536 |
+
#ui-datepicker-div.yith-plugin-fw-datepicker-div .ui-datepicker-prev.ui-datepicker-prev-hover,
|
1537 |
+
#ui-datepicker-div.yith-plugin-fw-datepicker-div .ui-datepicker-prev.ui-datepicker-next-hover {
|
1538 |
+
top : 1px;
|
1539 |
+
cursor : pointer;
|
1540 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1541 |
|
1542 |
+
#ui-datepicker-div.yith-plugin-fw-datepicker-div .ui-datepicker-prev.ui-datepicker-prev,
|
1543 |
+
#ui-datepicker-div.yith-plugin-fw-datepicker-div .ui-datepicker-prev.ui-datepicker-prev-hover {
|
1544 |
+
left : 5px;
|
1545 |
}
|
1546 |
|
1547 |
+
#ui-datepicker-div.yith-plugin-fw-datepicker-div.ui-datepicker .ui-datepicker-next,
|
1548 |
+
#ui-datepicker-div.yith-plugin-fw-datepicker-div .ui-datepicker-next.ui-datepicker-next-hover {
|
1549 |
+
right : 1px;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1550 |
}
|
1551 |
|
1552 |
+
#ui-datepicker-div.yith-plugin-fw-datepicker-div.ui-datepicker table {
|
1553 |
+
font-size : 10px;
|
1554 |
+
}
|
1555 |
+
|
1556 |
+
#ui-datepicker-div.yith-plugin-fw-datepicker-div .ui-state-default,
|
1557 |
+
#ui-datepicker-div.yith-plugin-fw-datepicker-div.ui-widget-content .ui-state-default,
|
1558 |
+
#ui-datepicker-div.yith-plugin-fw-datepicker-div .ui-widget-header .ui-state-default {
|
1559 |
+
background : #fff;
|
1560 |
+
border : 1px solid #d9d9d9;
|
1561 |
+
|
1562 |
+
}
|
1563 |
+
|
1564 |
+
#ui-datepicker-div.yith-plugin-fw-datepicker-div .ui-state-hover,
|
1565 |
+
#ui-datepicker-div.yith-plugin-fw-datepicker-div.ui-widget-content .ui-state-hover,
|
1566 |
+
#ui-datepicker-div.yith-plugin-fw-datepicker-div a.ui-state-default:focus,
|
1567 |
+
#ui-datepicker-div.yith-plugin-fw-datepicker-div.ui-widget-content .ui-state-focus,
|
1568 |
+
#ui-datepicker-div.yith-plugin-fw-datepicker-div .ui-widget-header .ui-state-focus {
|
1569 |
+
background : #ebf1f3;
|
1570 |
+
border : 1px solid #bfd5dd;
|
1571 |
+
outline : none;
|
1572 |
+
box-shadow : none;
|
1573 |
+
}
|
1574 |
+
|
1575 |
+
#ui-datepicker-div.yith-plugin-fw-datepicker-div .ui-widget-header .ui-state-hover,
|
1576 |
+
.woocommerce #ui-datepicker-div.yith-plugin-fw-datepicker-div .ui-state-focus {
|
1577 |
+
background : none;
|
1578 |
+
border : 0;
|
1579 |
}
|
1580 |
|
1581 |
/** colorpicker **/
|
1582 |
+
.yith-plugin-ui .iris-slider-offset.ui-slider.ui-widget-content {
|
1583 |
+
background : transparent !important;
|
1584 |
+
height : auto !important;
|
1585 |
+
}
|
1586 |
+
|
1587 |
.yith-plugin-ui .yith-plugin-fw-field-wrapper .yith-colorpicker-group:not(:first-child) {
|
1588 |
+
margin-top : 20px;
|
1589 |
}
|
1590 |
|
1591 |
.yith-plugin-ui .yith-plugin-fw-field-wrapper .iris-picker,
|
1592 |
.yith-plugin-ui .yith-plugin-fw-field-wrapper .wp-picker-holder {
|
1593 |
+
display : none !important;
|
1594 |
}
|
1595 |
|
1596 |
.yith-plugin-ui .yith-plugin-fw-field-wrapper .wp-picker-input-wrap,
|
1601 |
|
1602 |
.yith-plugin-ui .yith-plugin-fw-field-wrapper .wp-picker-active .iris-picker,
|
1603 |
.yith-plugin-ui .yith-plugin-fw-field-wrapper .wp-picker-active .wp-picker-holder {
|
1604 |
+
display : block !important;
|
1605 |
}
|
1606 |
|
1607 |
.woocommerce .yith-plugin-ui .iris-picker {
|
1608 |
+
border : 0;
|
1609 |
+
margin-top : 20px;
|
1610 |
}
|
1611 |
|
1612 |
.yith-plugin-ui .yith-plugin-fw input[type=text].wp-color-picker {
|
1613 |
+
border : 0;
|
1614 |
+
padding : 2px 5px;
|
1615 |
+
height : 30px;
|
1616 |
}
|
1617 |
|
1618 |
.yith-plugin-ui .wp-color-result-text {
|
1619 |
+
display : none;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1620 |
}
|
1621 |
|
1622 |
.yith-plugin-ui .wp-picker-container .wp-color-result.button {
|
1623 |
+
width : 30px;
|
1624 |
+
height : 30px;
|
1625 |
+
box-shadow : none;
|
1626 |
+
border : 1px solid #d9d9d9;
|
1627 |
+
margin-bottom : 0;
|
1628 |
+
padding : 0;
|
1629 |
+
display : inline-block;
|
1630 |
+
vertical-align : middle;
|
1631 |
+
box-sizing : content-box;
|
1632 |
}
|
1633 |
|
1634 |
.yith-plugin-ui .wp-picker-default-custom {
|
1635 |
+
cursor : pointer;
|
1636 |
+
width : 25px;
|
1637 |
+
padding : 0 5px;
|
1638 |
+
display : inline-block;
|
1639 |
+
vertical-align : middle;
|
1640 |
+
position : relative;
|
1641 |
}
|
1642 |
|
1643 |
.yith-plugin-ui .wp-picker-default-custom input.button {
|
1644 |
+
opacity : 0;
|
1645 |
+
margin : 0;
|
1646 |
+
padding : 0;
|
1647 |
+
position : absolute;
|
1648 |
+
top : 0;
|
1649 |
+
right : 0;
|
1650 |
+
left : 0;
|
1651 |
+
bottom : 0;
|
1652 |
+
z-index : 2;
|
1653 |
}
|
1654 |
|
1655 |
.yith-plugin-ui .wp-picker-default-custom:before {
|
1656 |
content: "\e91a";
|
1657 |
+
text-indent : 0;
|
1658 |
+
font-family : 'yith-icon';
|
1659 |
+
font-size : 20px;
|
1660 |
+
color : #d8d8d8;
|
1661 |
+
font-weight : normal;
|
1662 |
+
width : 15px;
|
1663 |
+
display : block;
|
1664 |
+
background : none;
|
1665 |
+
line-height : 20px;
|
1666 |
+
margin-left : 8px;
|
1667 |
}
|
1668 |
|
1669 |
.yith-plugin-ui .wp-picker-container {
|
1670 |
+
width : auto;
|
1671 |
+
display : inline-block;
|
1672 |
+
border : 1px solid #d9d9d9;
|
1673 |
+
border-radius : 8px;
|
1674 |
+
padding : 5px;
|
1675 |
}
|
1676 |
|
1677 |
.yith-plugin-ui .iris-picker .iris-square-inner {
|
1678 |
+
box-shadow : none;
|
1679 |
+
border : 1px solid #d9d9d9;
|
1680 |
}
|
1681 |
|
1682 |
.yith-plugin-ui .yith-single-colorpicker {
|
1683 |
+
display : inline-block;
|
1684 |
+
width : 220px;
|
1685 |
}
|
1686 |
|
1687 |
.yith-plugin-ui .yith-single-colorpicker > label {
|
1688 |
+
display : block;
|
1689 |
+
font-size : 11px;
|
1690 |
+
font-weight : 600;
|
1691 |
+
margin : 0 0 10px 0;
|
1692 |
}
|
1693 |
|
1694 |
/* RANGE SLIDER */
|
1695 |
+
.yith-plugin-ui .yith-plugin-fw-slider-container .ui-slider-horizontal .ui-slider-handle {
|
1696 |
+
top : -45px !important;
|
1697 |
+
}
|
1698 |
+
|
1699 |
+
.yith-plugin-ui .yith-plugin-fw-slider-container .ui-slider-horizontal .ui-slider-handle {
|
1700 |
+
position : absolute;
|
1701 |
+
top : -33px;
|
1702 |
+
left : 0;
|
1703 |
+
width : auto !important;
|
1704 |
+
height : auto !important;
|
1705 |
+
padding : 2px 8px;
|
1706 |
+
margin-left : -15px;
|
1707 |
+
font-size : 12px;
|
1708 |
+
line-height : 20px;
|
1709 |
+
color : #4e8ba2;
|
1710 |
+
text-align : center;
|
1711 |
+
background-color : #fff;
|
1712 |
+
border : 1px solid #fff;
|
1713 |
+
border-radius : 3px;
|
1714 |
+
-webkit-transition : opacity .3s ease-in-out 0s;
|
1715 |
+
transition : opacity .3s ease-in-out 0s;
|
1716 |
+
box-shadow : 0px 1px 7px 0px rgba(1, 1, 1, 0.13);
|
1717 |
+
}
|
1718 |
+
|
1719 |
+
.yith-plugin-ui .yith-plugin-fw-slider-container .ui-slider-horizontal .ui-slider-handle:before {
|
1720 |
+
position : absolute;
|
1721 |
+
bottom : -3px;
|
1722 |
+
left : 50%;
|
1723 |
+
display : inline-block;
|
1724 |
+
width : 6px;
|
1725 |
+
height : 6px;
|
1726 |
+
margin-left : -3px;
|
1727 |
+
content : "";
|
1728 |
+
background-color : #fff;
|
1729 |
+
-webkit-transform : rotate(-45deg);
|
1730 |
+
-ms-transform : rotate(-45deg);
|
1731 |
+
transform : rotate(-45deg);
|
1732 |
+
}
|
1733 |
+
|
1734 |
+
.yith-plugin-ui .yith-plugin-fw-slider-container .ui-slider.ui-widget-content .ui-widget-header {
|
1735 |
+
background : #4e8ba2;
|
1736 |
+
}
|
1737 |
+
|
1738 |
+
.yith-plugin-ui .yith-plugin-fw-slider-container .ui-slider-horizontal .ui-slider-handle:after {
|
1739 |
+
content : '';
|
1740 |
+
width : 17px;
|
1741 |
+
height : 17px;
|
1742 |
+
display : block;
|
1743 |
+
position : absolute;
|
1744 |
+
background : #fff;
|
1745 |
+
top : 37px;
|
1746 |
+
border-radius : 50%;
|
1747 |
+
box-shadow : 0px 1px 6px 0px rgba(1, 1, 1, 0.25);
|
1748 |
+
}
|
1749 |
+
|
1750 |
+
.yith-plugin-ui .yith-plugin-fw-slider-container .ui-slider.ui-widget-content {
|
1751 |
+
height : 5px !important;
|
1752 |
+
}
|
1753 |
+
|
1754 |
+
.yith-plugin-ui .yith-plugin-fw-slider-container .ui-slider .minCaption,
|
1755 |
+
.yith-plugin-ui .yith-plugin-fw-slider-container .ui-slider .maxCaption {
|
1756 |
+
font-weight : 700;
|
1757 |
+
font-size : 12px;
|
1758 |
}
|
1759 |
|
1760 |
|
1761 |
/* ADD_BOX AND TOGGLE */
|
1762 |
.yith-plugin-ui .yith-add-box,
|
1763 |
.yith-plugin-ui .yith-toggle-row {
|
1764 |
+
width : 70%;
|
1765 |
+
border : 1px solid #d9d9d9;
|
1766 |
+
box-shadow : none;
|
1767 |
+
border-radius : 4px;
|
1768 |
+
margin : 20px 0;
|
1769 |
+
padding : 10px;
|
1770 |
+
box-sizing : border-box;
|
1771 |
+
background : white;
|
1772 |
}
|
1773 |
|
1774 |
.yith-plugin-ui .yith-toggle-row {
|
1775 |
+
cursor : pointer;
|
1776 |
+
transition : all ease 0.5s;
|
1777 |
}
|
1778 |
.yith-plugin-ui .yith-toggle-row.fixed {
|
1779 |
margin: 0;
|
1780 |
}
|
1781 |
.yith-plugin-ui .yith-toggle-row.highlight {
|
1782 |
+
transition : all ease 0.5s;
|
1783 |
/*box-shadow: 0 0 7px rgb(81, 117, 129);*/
|
1784 |
+
box-shadow : 0 0 7px rgb(30, 140, 190);
|
1785 |
|
1786 |
+
display : block;
|
1787 |
}
|
1788 |
|
1789 |
.yith-plugin-ui .yith-add-box {
|
1790 |
+
padding : 25px;
|
1791 |
+
display : none;
|
1792 |
}
|
1793 |
|
1794 |
.yith-plugin-ui .yith-toggle-title {
|
1795 |
+
position : relative;
|
1796 |
}
|
1797 |
|
1798 |
.yith-plugin-ui #plugin-fw-wc .yith-toggle-title h3,
|
1799 |
+
.yith-plugin-ui.metaboxes-tab h3,
|
1800 |
.yith-plugin-ui .yith-toggle-title h3 {
|
1801 |
+
padding : 0px 20px 0px 25px;
|
1802 |
+
margin : 3px 0;
|
1803 |
|
1804 |
+
display : inline-block;
|
1805 |
+
position : relative;
|
1806 |
+
min-width : 173px;
|
1807 |
+
box-sizing : border-box;
|
1808 |
+
font-weight : 600;
|
1809 |
+
font-size : 15px;
|
1810 |
+
color : #23282d;
|
1811 |
+
text-transform : inherit;
|
1812 |
}
|
1813 |
|
1814 |
.yith-plugin-ui .yith-toggle-title .subtitle {
|
1815 |
+
padding-left : 0;
|
1816 |
+
padding-top : 8px;
|
1817 |
+
font-size : 12px;
|
1818 |
}
|
1819 |
|
1820 |
.yith-plugin-ui .yith-toggle {
|
1821 |
+
position : absolute;
|
1822 |
+
width : 30px;
|
1823 |
+
cursor : pointer;
|
1824 |
+
left : 0;
|
1825 |
+
top : 0;
|
1826 |
+
bottom : 0;
|
1827 |
+
margin : auto;
|
1828 |
+
display : flex;
|
1829 |
+
align-items : center;
|
1830 |
}
|
1831 |
|
1832 |
.yith-plugin-ui .yith-toggle > span:before {
|
1833 |
+
color : #405e69;
|
1834 |
}
|
1835 |
|
1836 |
.yith-plugin-ui .yith-toggle > span {
|
1837 |
+
position : absolute;
|
1838 |
+
right : 50%;
|
1839 |
+
transition : transform .3s;
|
1840 |
+
line-height : 1;
|
1841 |
}
|
1842 |
|
1843 |
|
1844 |
.yith-plugin-ui .yith-toggle-row-opened .yith-toggle span {
|
1845 |
+
transform : rotateZ(90deg);
|
1846 |
}
|
1847 |
|
1848 |
.yith-plugin-ui .yith-toggle-content {
|
1849 |
+
display : none;
|
1850 |
+
position : relative;
|
1851 |
+
padding : 30px 25px;
|
1852 |
}
|
1853 |
|
1854 |
.yith-plugin-ui .yith-toggle-row-opened .yith-toggle-content {
|
1857 |
|
1858 |
.yith-plugin-ui .yith-add-box-row,
|
1859 |
.yith-plugin-ui .yith-toggle-row-opened .yith-toggle-content .yith-toggle-content-row {
|
1860 |
+
display : table;
|
1861 |
+
margin-bottom : 40px;
|
1862 |
}
|
1863 |
|
1864 |
.yith-plugin-ui .yith-add-box-row label,
|
1865 |
.yith-plugin-ui .yith-toggle-row-opened .yith-toggle-content .yith-toggle-content-row > label {
|
1866 |
+
display : table-cell;
|
1867 |
+
width : 200px;
|
1868 |
+
padding-right : 21px;
|
1869 |
+
color : #33373b;
|
1870 |
+
font-size : 14px;
|
1871 |
+
vertical-align : top;
|
1872 |
+
font-weight : 600;
|
|
|
|
|
|
|
1873 |
}
|
1874 |
+
|
1875 |
.yith-plugin-ui .yith-add-box-row .yith-plugin-fw-field-wrapper:not(.yith-plugin-fw-title-field-wrapper),
|
1876 |
.yith-plugin-ui .yith-toggle-row-opened .yith-plugin-fw-field-wrapper:not(.yith-plugin-fw-title-field-wrapper) {
|
1877 |
+
/* display: table-cell;*/
|
1878 |
+
width : auto;
|
1879 |
+
float : none;
|
1880 |
+
vertical-align : middle;
|
1881 |
+
position : relative;
|
1882 |
}
|
1883 |
|
1884 |
.yith-plugin-ui .yith-add-box-row span.yith-icon,
|
1885 |
.yith-plugin-ui .yith-toggle-row-opened .yith-toggle-content .yith-toggle-content-row span.yith-icon {
|
1886 |
+
position : absolute;
|
1887 |
+
right : 15px;
|
1888 |
+
top : 0;
|
1889 |
+
bottom : 0;
|
1890 |
}
|
1891 |
|
1892 |
.yith-plugin-ui .yith-add-box-buttons,
|
1893 |
.yith-plugin-ui .yith-toggle-content-buttons {
|
1894 |
+
text-align : right;
|
1895 |
}
|
1896 |
|
1897 |
.yith-plugin-ui .yith-toggle-onoff {
|
1898 |
+
position : absolute;
|
1899 |
+
cursor : pointer;
|
1900 |
+
right : 0;
|
1901 |
}
|
1902 |
|
1903 |
.yith-plugin-ui .yith-toggle_wrapper.ui-sortable .yith-toggle-onoff {
|
1904 |
+
right : 30px;
|
1905 |
}
|
1906 |
|
1907 |
.yith-plugin-ui .yith-toggle-row .yith-icon-drag {
|
1908 |
+
position : absolute;
|
1909 |
+
right : 0;
|
1910 |
+
top : 25%;
|
1911 |
+
bottom : 0;
|
1912 |
+
line-height : 1;
|
1913 |
}
|
1914 |
|
1915 |
.yith-plugin-ui .yith-toggle-row.with-subtitle .yith-toggle-onoff {
|
1916 |
+
top : 25%;
|
1917 |
}
|
1918 |
|
1919 |
/** SPINNER **/
|
1920 |
.yith-plugin-ui .spinner {
|
1921 |
+
vertical-align : -5px;
|
1922 |
+
float : none;
|
1923 |
}
|
1924 |
|
1925 |
.yith-plugin-ui .spinner.show {
|
1926 |
+
visibility : visible;
|
1927 |
}
|
1928 |
|
1929 |
/* LIST TABLE */
|
1930 |
.yith-plugin-ui .form-table .list-table td {
|
1931 |
+
padding : 15px 0px;
|
1932 |
}
|
1933 |
|
1934 |
.woocommerce.yith-plugin-fw-panel .yith-plugin-ui table.form-table .bulkactions select {
|
1935 |
+
border : 1px solid #d8d8d8;
|
1936 |
+
max-width : 200px;
|
1937 |
+
max-height : 30px;
|
1938 |
+
padding : 0 10px;
|
|
|
1939 |
}
|
1940 |
|
1941 |
.yith-plugin-ui .form-table .list-table th {
|
1942 |
+
width : initial;
|
1943 |
+
}
|
1944 |
+
|
1945 |
+
.yith-plugin-ui #plugin-fw-wc table.form-table th.check-column {
|
1946 |
+
padding-left : 3px;
|
1947 |
}
|
1948 |
|
1949 |
.yith-plugin-ui #plugin-fw-wc table.wp-list-table tbody td {
|
1950 |
+
padding-left : 20px;
|
1951 |
}
|
1952 |
|
1953 |
.yith-plugin-ui #plugin-fw-wc table.wp-list-table th,
|
1954 |
.yith-plugin-ui #plugin-fw-wc table.wp-list-table td {
|
1955 |
+
padding : 15px 20px 15px 20px;
|
1956 |
}
|
1957 |
|
1958 |
.yith-plugin-ui #plugin-fw-wc table.wp-list-table thead td,
|
1959 |
.yith-plugin-ui #plugin-fw-wc table.wp-list-table thead th,
|
1960 |
.yith-plugin-ui #plugin-fw-wc table.wp-list-table tfoot td,
|
1961 |
.yith-plugin-ui #plugin-fw-wc table.wp-list-table tfoot th {
|
1962 |
+
padding : 3px 20px;
|
1963 |
}
|
1964 |
|
1965 |
.yith-plugin-ui #plugin-fw-wc table.wp-list-table thead a,
|
1966 |
.yith-plugin-ui #plugin-fw-wc table.wp-list-table tfoot a {
|
1967 |
+
padding-left : 0;
|
1968 |
}
|
1969 |
|
1970 |
.yith-plugin-ui .yith-plugin-fw-list-table h2 {
|
1971 |
+
border : 0;
|
1972 |
+
padding : 35px 0 15px;
|
1973 |
+
display : inline-block;
|
1974 |
+
margin-right : 10px;
|
1975 |
}
|
1976 |
|
1977 |
.yith-plugin-ui .form-table .yith-plugin-fw-list-table table th {
|
1978 |
+
vertical-align : middle;
|
1979 |
}
|
1980 |
|
1981 |
.yith-plugin-ui .yith-plugin-fw-list-table-container {
|
1982 |
+
padding : 0 20px;
|
1983 |
}
|
1984 |
|
1985 |
.yith-plugin-ui #doaction, .yith-plugin-ui #doaction2,
|
1986 |
.yith-plugin-ui #post-query-submit,
|
1987 |
.yith-plugin-ui #search-submit,
|
1988 |
.yith-plugin-ui .button.filter-button {
|
1989 |
+
margin-left : 0;
|
1990 |
+
height : 33px;
|
1991 |
+
padding : 0 10px;
|
1992 |
+
line-height : 33px;
|
1993 |
}
|
1994 |
|
1995 |
.yith-plugin-ui .bulkactions {
|
1996 |
+
margin : 10px 0;
|
1997 |
}
|
1998 |
|
1999 |
.yith-plugin-ui .form-table td p.yith-section-description {
|
2000 |
+
color : #716269;
|
2001 |
+
margin-bottom : 20px;
|
2002 |
}
|
2003 |
|
2004 |
/** Time picker width*/
|
2005 |
.yith-plugin-ui input.ui-timepicker-input {
|
2006 |
+
width : 100px !important;
|
2007 |
}
|
2008 |
|
2009 |
/** date format **/
|
2010 |
.yith-plugin-ui .yith-plugin-fw-date-format code {
|
2011 |
+
margin-left : 30px;
|
2012 |
}
|
2013 |
|
2014 |
.yith-plugin-ui .yith-plugin-fw-date-format input[type=text].small-text {
|
2015 |
+
margin-left : 45px;
|
2016 |
}
|
2017 |
|
2018 |
/** checkbox columns **/
|
2019 |
.yith-plugin-ui td.forminp-checkbox.two-cols fieldset {
|
2020 |
+
width : calc(50% - 20px);
|
2021 |
+
padding-right : 20px;
|
2022 |
+
float : left;
|
2023 |
}
|
2024 |
|
2025 |
.yith-plugin-ui td.forminp-checkbox.two-cols fieldset:nth-child(2n+1) {
|
2026 |
+
clear : both;
|
2027 |
}
|
2028 |
|
2029 |
.yith-plugin-ui td.forminp-checkbox.three-cols fieldset {
|
2030 |
+
width : calc(33% - 10px);
|
2031 |
+
padding-right : 10px;
|
2032 |
+
float : left;
|
2033 |
}
|
2034 |
|
2035 |
.yith-plugin-ui td.forminp-checkbox.three-cols fieldset:nth-child(3n+1) {
|
2036 |
+
clear : both;
|
2037 |
}
|
2038 |
|
2039 |
.yith-plugin-fw-checkbox-field-wrapper {
|
2040 |
+
display : inline-block !important;
|
2041 |
+
margin-right : 10px;
|
2042 |
}
|
2043 |
|
2044 |
.yith-plugin-fw-checkbox-field-wrapper + span.description {
|
2045 |
+
display : inline-block;
|
2046 |
+
vertical-align : middle;
|
2047 |
+
margin : 0;
|
2048 |
}
|
2049 |
|
2050 |
.yith-plugin-ui span.description {
|
2051 |
+
margin-top : 10px;
|
2052 |
+
line-height : 20px;
|
2053 |
}
|
2054 |
|
2055 |
.yith-plugin-fw-option-with-description {
|
2056 |
+
display : table-cell;
|
2057 |
+
width : auto;
|
2058 |
+
vertical-align : top;
|
2059 |
+
}
|
2060 |
+
|
2061 |
+
|
2062 |
+
/**
|
2063 |
+
* Required
|
2064 |
+
*/
|
2065 |
+
.yith-plugin-fw-panel-wc-row.yith-plugin-fw--required th.titledesc > label:after,
|
2066 |
+
.yith-plugin-fw-metabox-field-row.yith-plugin-fw--required label:first-child:after,
|
2067 |
+
.yith-plugin-fw-toggle-element-field-wrapper .yith-plugin-fw--required > label:first-child:after {
|
2068 |
+
content : '*';
|
2069 |
+
color : #ea0034;
|
2070 |
+
font-weight : 800;
|
2071 |
+
margin-left : 4px;
|
2072 |
}
|
2073 |
|
2074 |
/** YITH PANEL **/
|
2075 |
.yith-plugin-ui #yith-plugin-fw-panel {
|
2076 |
+
margin-top : -10px;
|
2077 |
}
|
2078 |
|
2079 |
.yith-plugin-ui #plugin-fw-wc, .yith-plugin-ui #yith-plugin-fw-panel {
|
2080 |
+
padding-top : 0;
|
2081 |
}
|
2082 |
|
2083 |
.yith-plugin-ui .plugin-option tr {
|
2084 |
+
border : 0;
|
2085 |
}
|
2086 |
|
2087 |
/** MULTI SELECT **/
|
2103 |
min-width: auto !important;
|
2104 |
}
|
2105 |
|
2106 |
+
@media screen and (max-width : 1440px) {
|
2107 |
.yith-plugin-ui .yith-add-box,
|
2108 |
.yith-plugin-ui .yith-toggle-row:not(.fixed) {
|
2109 |
+
width : 80%;
|
2110 |
}
|
2111 |
}
|
2112 |
|
2113 |
+
@media screen and (max-width : 1024px) {
|
2114 |
.yith-plugin-ui .yith-add-box,
|
2115 |
.yith-plugin-ui .yith-toggle-row:not(.fixed) {
|
2116 |
+
width : 90%;
|
2117 |
}
|
2118 |
|
2119 |
.yith-plugin-ui td.forminp-checkbox.two-cols fieldset {
|
2120 |
+
width : 100%;
|
2121 |
+
padding-right : 20px;
|
2122 |
+
float : left;
|
2123 |
}
|
2124 |
|
2125 |
.yith-plugin-ui td.forminp-checkbox.three-cols fieldset {
|
2126 |
+
width : calc(50% - 10px);
|
2127 |
+
padding-right : 10px;
|
2128 |
+
float : left;
|
2129 |
}
|
2130 |
|
2131 |
.yith-plugin-ui td.forminp-checkbox.two-cols fieldset:nth-child(2n+1) {
|
2132 |
+
clear : both;
|
2133 |
}
|
2134 |
|
2135 |
.yith-plugin-ui td.forminp-checkbox.three-cols fieldset:nth-child(3n+1) {
|
2136 |
+
clear : initial;
|
2137 |
}
|
2138 |
}
|
2139 |
|
2140 |
+
@media screen and (max-width : 782px) {
|
2141 |
.yith-plugin-fw-banner.yith-plugin-fw-banner-free {
|
2142 |
+
height : auto;
|
2143 |
+
background-color : #a9c7d3;
|
2144 |
}
|
2145 |
|
2146 |
.yith-plugin-fw-banner.yith-plugin-fw-banner-free ul {
|
2147 |
+
width : 90%;
|
2148 |
+
text-align : center;
|
2149 |
}
|
2150 |
|
2151 |
.yith-plugin-fw-banner.yith-plugin-fw-banner-free li img {
|
2152 |
+
width : 90%;
|
2153 |
+
margin : 0 auto;
|
2154 |
}
|
2155 |
|
2156 |
.yith-plugin-fw-banner h1 {
|
2157 |
+
line-height : 1.2em;
|
2158 |
}
|
2159 |
|
2160 |
.yith-plugin-ui .yith-add-box,
|
2161 |
.yith-plugin-ui .yith-toggle-row {
|
2162 |
+
width : 100%;
|
2163 |
}
|
2164 |
|
2165 |
.yith-plugin-ui td.forminp-checkbox.two-cols fieldset,
|
2166 |
.yith-plugin-ui td.forminp-checkbox.three-cols fieldset {
|
2167 |
+
width : 100%;
|
2168 |
+
clear : initial;
|
2169 |
+
}
|
2170 |
+
|
2171 |
+
.yith-plugin-ui .wp-picker-container .wp-color-result.button {
|
2172 |
+
padding: 0;
|
2173 |
}
|
2174 |
|
2175 |
}
|
plugin-fw/assets/js/metabox.js
CHANGED
@@ -6,96 +6,109 @@
|
|
6 |
* It is also available through the world-wide-web at this URL:
|
7 |
* http://www.gnu.org/licenses/gpl-3.0.txt
|
8 |
*/
|
9 |
-
(function ($) {
|
10 |
|
11 |
-
$('.metaboxes-tab').each(function () {
|
12 |
-
$('.tabs-panel', this).hide();
|
13 |
|
14 |
-
var active_tab = wpCookies.get('active_metabox_tab');
|
15 |
-
if (active_tab == null) {
|
16 |
-
active_tab = $('ul.metaboxes-tabs li:first-child a', this).attr('href');
|
17 |
} else {
|
18 |
active_tab = '#' + active_tab;
|
19 |
}
|
20 |
|
21 |
-
$(active_tab).show();
|
22 |
|
23 |
-
$('.metaboxes-tabs a', this).click(function (e) {
|
24 |
-
if ($(this).parent().hasClass('tabs')) {
|
25 |
e.preventDefault();
|
26 |
return;
|
27 |
}
|
28 |
|
29 |
-
var t = $(this).attr('href');
|
30 |
-
$(this).parent().addClass('tabs').siblings('li').removeClass('tabs');
|
31 |
-
$(this).closest('.metaboxes-tab').find('.tabs-panel').hide();
|
32 |
-
$(t).show();
|
33 |
|
34 |
return false;
|
35 |
-
});
|
36 |
-
});
|
37 |
|
38 |
-
var act_page_option = $('#_active_page_options-container').parent().html();
|
39 |
-
$('#_active_page_options-container').parent().remove();
|
40 |
-
$(act_page_option).insertAfter('#yit-post-setting .handlediv');
|
41 |
-
$(act_page_option).insertAfter('#yit-page-setting .handlediv');
|
42 |
|
43 |
|
44 |
-
$('#_active_page_options-container').on('click', function(){
|
45 |
-
if( $('#_active_page_options').is(":checked") ){
|
46 |
-
$('#yit-page-setting .inside .metaboxes-tab, #yit-post-setting .inside .metaboxes-tab').css( {
|
47 |
-
|
48 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
49 |
}
|
50 |
-
}).click();
|
51 |
|
52 |
|
53 |
//dependencies handler
|
54 |
-
$(
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
dep = '#' + t.data('dep-id'),
|
59 |
-
value = t.data('dep-value'),
|
60 |
-
type = t.data('dep-type');
|
61 |
|
|
|
|
|
|
|
|
|
62 |
|
63 |
-
dependencies_handler( field, dep, value.toString(), type );
|
64 |
|
65 |
-
$(dep).on('change', function(){
|
66 |
dependencies_handler( field, dep, value.toString(), type );
|
67 |
-
|
68 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
69 |
|
70 |
//Handle dependencies.
|
71 |
-
function dependencies_handler
|
72 |
var result = true;
|
73 |
|
74 |
|
75 |
//Single dependency
|
76 |
-
if( typeof( deps ) == 'string' ) {
|
77 |
-
if( deps.substr( 0, 6 ) == ':radio' )
|
78 |
-
|
|
|
79 |
|
80 |
var val = $( deps ).val();
|
81 |
|
82 |
-
if( $(deps).attr('type') == 'checkbox'){
|
83 |
-
var thisCheck = $(deps);
|
84 |
-
if ( thisCheck.is
|
85 |
val = 'yes';
|
86 |
-
}
|
87 |
-
else {
|
88 |
val = 'no';
|
89 |
}
|
90 |
}
|
91 |
|
92 |
values = values.split( ',' );
|
93 |
|
94 |
-
for( var i = 0; i < values.length; i++ ) {
|
95 |
-
if( val != values[i] )
|
96 |
-
|
97 |
-
else
|
98 |
-
|
|
|
|
|
99 |
}
|
100 |
}
|
101 |
|
@@ -134,5 +147,5 @@
|
|
134 |
}
|
135 |
}
|
136 |
}
|
137 |
-
|
138 |
-
})(jQuery);
|
6 |
* It is also available through the world-wide-web at this URL:
|
7 |
* http://www.gnu.org/licenses/gpl-3.0.txt
|
8 |
*/
|
9 |
+
( function ( $ ) {
|
10 |
|
11 |
+
$( '.metaboxes-tab' ).each( function () {
|
12 |
+
$( '.tabs-panel', this ).hide();
|
13 |
|
14 |
+
var active_tab = wpCookies.get( 'active_metabox_tab' );
|
15 |
+
if ( active_tab == null ) {
|
16 |
+
active_tab = $( 'ul.metaboxes-tabs li:first-child a', this ).attr( 'href' );
|
17 |
} else {
|
18 |
active_tab = '#' + active_tab;
|
19 |
}
|
20 |
|
21 |
+
$( active_tab ).show();
|
22 |
|
23 |
+
$( '.metaboxes-tabs a', this ).click( function ( e ) {
|
24 |
+
if ( $( this ).parent().hasClass( 'tabs' ) ) {
|
25 |
e.preventDefault();
|
26 |
return;
|
27 |
}
|
28 |
|
29 |
+
var t = $( this ).attr( 'href' );
|
30 |
+
$( this ).parent().addClass( 'tabs' ).siblings( 'li' ).removeClass( 'tabs' );
|
31 |
+
$( this ).closest( '.metaboxes-tab' ).find( '.tabs-panel' ).hide();
|
32 |
+
$( t ).show();
|
33 |
|
34 |
return false;
|
35 |
+
} );
|
36 |
+
} );
|
37 |
|
38 |
+
var act_page_option = $( '#_active_page_options-container' ).parent().html();
|
39 |
+
$( '#_active_page_options-container' ).parent().remove();
|
40 |
+
$( act_page_option ).insertAfter( '#yit-post-setting .handlediv' );
|
41 |
+
$( act_page_option ).insertAfter( '#yit-page-setting .handlediv' );
|
42 |
|
43 |
|
44 |
+
$( '#_active_page_options-container' ).on( 'click', function () {
|
45 |
+
if ( $( '#_active_page_options' ).is( ":checked" ) ) {
|
46 |
+
$( '#yit-page-setting .inside .metaboxes-tab, #yit-post-setting .inside .metaboxes-tab' ).css( {
|
47 |
+
'opacity' : 1,
|
48 |
+
'pointer-events': 'auto'
|
49 |
+
} );
|
50 |
+
} else {
|
51 |
+
$( '#yit-page-setting .inside .metaboxes-tab, #yit-post-setting .inside .metaboxes-tab' ).css( {
|
52 |
+
'opacity' : 0.5,
|
53 |
+
'pointer-events': 'none'
|
54 |
+
} );
|
55 |
}
|
56 |
+
} ).click();
|
57 |
|
58 |
|
59 |
//dependencies handler
|
60 |
+
$( document.body ).on( 'yith-plugin-fw-metabox-init-deps', function () {
|
61 |
+
$( document.body ).trigger( 'yith-plugin-fw-init-radio' );
|
62 |
+
$( '.metaboxes-tab [data-dep-target]:not(.yith-plugin-fw-metabox-deps-initialized)' ).each( function () {
|
63 |
+
var t = $( this );
|
|
|
|
|
|
|
64 |
|
65 |
+
var field = '#' + t.data( 'dep-target' ),
|
66 |
+
dep = '#' + t.data( 'dep-id' ),
|
67 |
+
value = t.data( 'dep-value' ),
|
68 |
+
type = t.data( 'dep-type' );
|
69 |
|
|
|
70 |
|
|
|
71 |
dependencies_handler( field, dep, value.toString(), type );
|
72 |
+
|
73 |
+
$( dep ).on( 'change', function () {
|
74 |
+
dependencies_handler( field, dep, value.toString(), type );
|
75 |
+
} ).change();
|
76 |
+
|
77 |
+
t.addClass( 'yith-plugin-fw-metabox-deps-initialized' );
|
78 |
+
} );
|
79 |
+
} ).trigger( 'yith-plugin-fw-metabox-init-deps' );
|
80 |
|
81 |
//Handle dependencies.
|
82 |
+
function dependencies_handler( id, deps, values, type ) {
|
83 |
var result = true;
|
84 |
|
85 |
|
86 |
//Single dependency
|
87 |
+
if ( typeof ( deps ) == 'string' ) {
|
88 |
+
if ( deps.substr( 0, 6 ) == ':radio' ) {
|
89 |
+
deps = deps + ':checked';
|
90 |
+
}
|
91 |
|
92 |
var val = $( deps ).val();
|
93 |
|
94 |
+
if ( $( deps ).attr( 'type' ) == 'checkbox' ) {
|
95 |
+
var thisCheck = $( deps );
|
96 |
+
if ( thisCheck.is( ':checked' ) ) {
|
97 |
val = 'yes';
|
98 |
+
} else {
|
|
|
99 |
val = 'no';
|
100 |
}
|
101 |
}
|
102 |
|
103 |
values = values.split( ',' );
|
104 |
|
105 |
+
for ( var i = 0; i < values.length; i++ ) {
|
106 |
+
if ( val != values[ i ] ) {
|
107 |
+
result = false;
|
108 |
+
} else {
|
109 |
+
result = true;
|
110 |
+
break;
|
111 |
+
}
|
112 |
}
|
113 |
}
|
114 |
|
147 |
}
|
148 |
}
|
149 |
}
|
150 |
+
|
151 |
+
} )( jQuery );
|
plugin-fw/assets/js/metabox.min.js
CHANGED
@@ -4,4 +4,4 @@ $jscomp.polyfill("Array.prototype.find",function(a){return a?a:function(a,c){ret
|
|
4 |
(function(a){function e(b,d,c,e){var f=!0;if("string"==typeof d){":radio"==d.substr(0,6)&&(d+=":checked");var g=a(d).val();"checkbox"==a(d).attr("type")&&(g=a(d).is(":checked")?"yes":"no");c=c.split(",");for(d=0;d<c.length;d++)if(g!=c[d])f=!1;else{f=!0;break}}c=a(b);b=a(b+"-container").parent();e=e.split("-");for(var h in e)if(g=e[h],f)switch(g){case "disable":b.removeClass("yith-disabled");c.attr("disabled",!1);break;case "hideme":c.show();break;default:b.show()}else switch(g){case "disable":b.addClass("yith-disabled");
|
5 |
c.attr("disabled",!0);break;case "hideme":c.hide();break;default:b.hide()}}a(".metaboxes-tab").each(function(){a(".tabs-panel",this).hide();var b=wpCookies.get("active_metabox_tab");b=null==b?a("ul.metaboxes-tabs li:first-child a",this).attr("href"):"#"+b;a(b).show();a(".metaboxes-tabs a",this).click(function(b){if(a(this).parent().hasClass("tabs"))b.preventDefault();else return b=a(this).attr("href"),a(this).parent().addClass("tabs").siblings("li").removeClass("tabs"),a(this).closest(".metaboxes-tab").find(".tabs-panel").hide(),
|
6 |
a(b).show(),!1})});var c=a("#_active_page_options-container").parent().html();a("#_active_page_options-container").parent().remove();a(c).insertAfter("#yit-post-setting .handlediv");a(c).insertAfter("#yit-page-setting .handlediv");a("#_active_page_options-container").on("click",function(){a("#_active_page_options").is(":checked")?a("#yit-page-setting .inside .metaboxes-tab, #yit-post-setting .inside .metaboxes-tab").css({opacity:1,"pointer-events":"auto"}):a("#yit-page-setting .inside .metaboxes-tab, #yit-post-setting .inside .metaboxes-tab").css({opacity:.5,
|
7 |
-
"pointer-events":"none"})}).click();a(".metaboxes-tab [data-dep-target]").each(function(){var b=a(this),c="#"+b.data("dep-target"),f="#"+b.data("dep-id"),h=b.data("dep-value"),k=b.data("dep-type");e(c,f,h.toString(),k);a(f).on("change",function(){e(c,f,h.toString(),k)}).change()})})(jQuery);
|
4 |
(function(a){function e(b,d,c,e){var f=!0;if("string"==typeof d){":radio"==d.substr(0,6)&&(d+=":checked");var g=a(d).val();"checkbox"==a(d).attr("type")&&(g=a(d).is(":checked")?"yes":"no");c=c.split(",");for(d=0;d<c.length;d++)if(g!=c[d])f=!1;else{f=!0;break}}c=a(b);b=a(b+"-container").parent();e=e.split("-");for(var h in e)if(g=e[h],f)switch(g){case "disable":b.removeClass("yith-disabled");c.attr("disabled",!1);break;case "hideme":c.show();break;default:b.show()}else switch(g){case "disable":b.addClass("yith-disabled");
|
5 |
c.attr("disabled",!0);break;case "hideme":c.hide();break;default:b.hide()}}a(".metaboxes-tab").each(function(){a(".tabs-panel",this).hide();var b=wpCookies.get("active_metabox_tab");b=null==b?a("ul.metaboxes-tabs li:first-child a",this).attr("href"):"#"+b;a(b).show();a(".metaboxes-tabs a",this).click(function(b){if(a(this).parent().hasClass("tabs"))b.preventDefault();else return b=a(this).attr("href"),a(this).parent().addClass("tabs").siblings("li").removeClass("tabs"),a(this).closest(".metaboxes-tab").find(".tabs-panel").hide(),
|
6 |
a(b).show(),!1})});var c=a("#_active_page_options-container").parent().html();a("#_active_page_options-container").parent().remove();a(c).insertAfter("#yit-post-setting .handlediv");a(c).insertAfter("#yit-page-setting .handlediv");a("#_active_page_options-container").on("click",function(){a("#_active_page_options").is(":checked")?a("#yit-page-setting .inside .metaboxes-tab, #yit-post-setting .inside .metaboxes-tab").css({opacity:1,"pointer-events":"auto"}):a("#yit-page-setting .inside .metaboxes-tab, #yit-post-setting .inside .metaboxes-tab").css({opacity:.5,
|
7 |
+
"pointer-events":"none"})}).click();a(document.body).on("yith-plugin-fw-metabox-init-deps",function(){a(document.body).trigger("yith-plugin-fw-init-radio");a(".metaboxes-tab [data-dep-target]:not(.yith-plugin-fw-metabox-deps-initialized)").each(function(){var b=a(this),c="#"+b.data("dep-target"),f="#"+b.data("dep-id"),h=b.data("dep-value"),k=b.data("dep-type");e(c,f,h.toString(),k);a(f).on("change",function(){e(c,f,h.toString(),k)}).change();b.addClass("yith-plugin-fw-metabox-deps-initialized")})}).trigger("yith-plugin-fw-metabox-init-deps")})(jQuery);
|
plugin-fw/assets/js/multisite-updater.min.js
CHANGED
@@ -1 +1,8 @@
|
|
1 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.findInternal=function(a,g,b){a instanceof String&&(a=String(a));for(var d=a.length,e=0;e<d;e++){var h=a[e];if(g.call(b,h,e,a))return{i:e,v:h}}return{i:-1,v:void 0}};$jscomp.ASSUME_ES5=!1;$jscomp.ASSUME_NO_NATIVE_MAP=!1;$jscomp.ASSUME_NO_NATIVE_SET=!1;$jscomp.defineProperty=$jscomp.ASSUME_ES5||"function"==typeof Object.defineProperties?Object.defineProperty:function(a,g,b){a!=Array.prototype&&a!=Object.prototype&&(a[g]=b.value)};
|
2 |
+
$jscomp.getGlobal=function(a){return"undefined"!=typeof window&&window===a?a:"undefined"!=typeof global&&null!=global?global:a};$jscomp.global=$jscomp.getGlobal(this);$jscomp.polyfill=function(a,g,b,d){if(g){b=$jscomp.global;a=a.split(".");for(d=0;d<a.length-1;d++){var e=a[d];e in b||(b[e]={});b=b[e]}a=a[a.length-1];d=b[a];g=g(d);g!=d&&null!=g&&$jscomp.defineProperty(b,a,{configurable:!0,writable:!0,value:g})}};
|
3 |
+
$jscomp.polyfill("Array.prototype.find",function(a){return a?a:function(a,b){return $jscomp.findInternal(this,a,b).v}},"es6","es3");
|
4 |
+
(function(a){function g(a,b,d){this.php_js=this.php_js||{};this.php_js.ENV=this.php_js.ENV||{};var c=0,g=0,f=0,e={dev:-6,alpha:-5,a:-5,beta:-4,b:-4,RC:-3,rc:-3,"#":-2,p:1,pl:1};c=function(a){a=(""+a).replace(/[_\-+]/g,".");a=a.replace(/([^.\d]+)/g,".$1.").replace(/\.{2,}/g,".");return a.length?a.split("."):[-8]};numVersion=function(a){return a?isNaN(a)?e[a]||-7:parseInt(a,10):0};a=c(a);b=c(b);g=Math.max(a.length,b.length);for(c=0;c<g;c++)if(a[c]!=b[c])if(a[c]=numVersion(a[c]),b[c]=numVersion(b[c]),
|
5 |
+
a[c]<b[c]){f=-1;break}else if(a[c]>b[c]){f=1;break}if(!d)return f;switch(d){case ">":case "gt":return 0<f;case ">=":case "ge":return 0<=f;case "<=":case "le":return 0>=f;case "==":case "=":case "eq":return 0===f;case "<>":case "!=":case "ne":return 0!==f;case "":case "<":case "lt":return 0>f;default:return null}}var b=a("#menu-plugins"),d=b.find(".update-plugins").find(".update-count").text(),e=plugins.registered,h=plugins.activated;if(0==d||""==d)d=0,b.find(".wp-menu-name").append('<span class="update-plugins"><span class="plugin-count"></span></span>');
|
6 |
+
(function(b,d,e,c){for(var h in b){var f=b[h],k;for(k in f)if("slug"!=k&&!g(f[k].Version,f[k].Latest,"=")){e=parseInt(e)+1;a(".plugin-count").empty().html(e);var m=""+f[k].Name,n='*[data-slug="'+m.replace(/ /g,"-").trim().toLowerCase()+'"]';a(n).addClass("update");var l='<tr class="plugin-update-tr"><td colspan="3" class="plugin-update colspanchange"><div class="update-message notice inline notice-warning notice-alt">'+c.strings.new_version.replace("%plugin_name%",m)+'<a class="thickbox open-plugin-details-modal" href="'+
|
7 |
+
c.details_url[h]+'">'+c.strings.latest.replace("%latest%",f[k].Latest)+"</a>";l="undefined"==typeof d[h]?l+" <em>"+c.strings.unavailable+"</em>"+c.strings.activate.replace("%activate_link%",c.licence_activation_url).replace("%plugin_name%",m):l+'. <a href="'+c.update_url[h]+'">'+c.strings.update_now+"</a>";g(f[k].Version,f[k].Latest,">")&&(l+=c.strings.version_issue.replace("%plugin_name%",m));l+="</div></td></tr>";a(l).insertAfter(n)}}})(e,h,d,plugins);a("body").on("click",".yit-changelog-button",
|
8 |
+
function(){a("#TB_window").remove()})})(jQuery);
|
plugin-fw/assets/js/wp-pages.js
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/**
|
2 |
+
* This file belongs to the YIT Plugin Framework.
|
3 |
+
*
|
4 |
+
* This source file is subject to the GNU GENERAL PUBLIC LICENSE (GPL 3.0)
|
5 |
+
* that is bundled with this package in the file LICENSE.txt.
|
6 |
+
* It is also available through the world-wide-web at this URL:
|
7 |
+
* http://www.gnu.org/licenses/gpl-3.0.txt
|
8 |
+
*/
|
9 |
+
|
10 |
+
jQuery( function ( $ ) {
|
11 |
+
var wrap = $( '.yith-plugin-fw-wp-page-wrapper' ),
|
12 |
+
notices = $( 'div.updated, div.error, div.notice' );
|
13 |
+
|
14 |
+
// prevents the WC message for changes when leaving the panel page
|
15 |
+
$( '.yith-plugin-fw-wp-page-wrapper .woo-nav-tab-wrapper' ).removeClass( 'woo-nav-tab-wrapper' ).addClass( 'yith-nav-tab-wrapper' );
|
16 |
+
|
17 |
+
// prevent moving notices withing the tab in WP Pages and move them into the wrapper
|
18 |
+
notices.addClass( 'inline' );
|
19 |
+
if ( wrap.length ) {
|
20 |
+
wrap.prepend( notices );
|
21 |
+
}
|
22 |
+
|
23 |
+
} );
|
plugin-fw/assets/js/wp-pages.min.js
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
jQuery(function(a){var b=a(".yith-plugin-fw-wp-page-wrapper"),c=a("div.updated, div.error, div.notice");a(".yith-plugin-fw-wp-page-wrapper .woo-nav-tab-wrapper").removeClass("woo-nav-tab-wrapper").addClass("yith-nav-tab-wrapper");c.addClass("inline");b.length&&b.prepend(c)});
|
plugin-fw/assets/js/yit-cpt-unlimited.min.js
CHANGED
@@ -1,2 +1,2 @@
|
|
1 |
-
(function(c){c(".wrap h1, .wrap h2").on("click","a.multi-uploader",function(f){f.preventDefault();var a=c(this),d=!1;a.next("span.spinner").css("display","inline-block");if(!b){var b=wp.media.frames.file_frame=wp.media({title:a.data("uploader_title"),button:{text:a.data("uploader_button_text")},library:{type:"image"},multiple:!0});b.on("select",function(){var e=[];b.state().get("selection").map(function(a){a=a.toJSON();e.push({id:a.id,url:a.url,title:a.title})});c.post(ajaxurl,
|
2 |
-
|
1 |
+
(function(c){c(".wrap h1, .wrap h2").on("click","a.multi-uploader",function(f){f.preventDefault();var a=c(this),d=!1;a.next("span.spinner").css("display","inline-block");if(!b){var b=wp.media.frames.file_frame=wp.media({title:a.data("uploader_title"),button:{text:a.data("uploader_button_text")},library:{type:"image"},multiple:!0});b.on("select",function(){var e=[];b.state().get("selection").map(function(a){a=a.toJSON();e.push({id:a.id,url:a.url,title:a.title})});console.log(a.data("nonce"));c.post(ajaxurl,
|
2 |
+
{images:e,post_type:typenow,action:"yit_cptu_multiuploader",_ajax_nonce:a.data("nonce")},function(a){location.reload()});a.next("span.spinner").css("display","inline-block");d=!0});b.on("close",function(){d||a.next("span.spinner").hide()})}b.open()})})(jQuery);
|
plugin-fw/assets/js/yith-dashboard.min.js
CHANGED
@@ -1,2 +1,2 @@
|
|
1 |
(function(a){a(".yith-last-changelog").click(function(b){b.preventDefault();b=a(this).data("changelogid");var c=a("#"+b);b=a(this).data("plugininfo");var d={};d[yith_dashboard.buttons.close]=function(){a(this).dialog("close")};c.dialog({title:b,dialogClass:"wp-dialog",autoOpen:!1,draggable:!1,width:"auto",modal:!0,resizable:!1,closeOnEscape:!0,position:{my:"center",at:"center",of:window},buttons:d,show:{effect:"blind",duration:1E3},open:function(){a(".ui-widget-overlay").bind("click",function(){c.dialog("close")})},
|
2 |
-
|
1 |
(function(a){a(".yith-last-changelog").click(function(b){b.preventDefault();b=a(this).data("changelogid");var c=a("#"+b);b=a(this).data("plugininfo");var d={};d[yith_dashboard.buttons.close]=function(){a(this).dialog("close")};c.dialog({title:b,dialogClass:"wp-dialog",autoOpen:!1,draggable:!1,width:"auto",modal:!0,resizable:!1,closeOnEscape:!0,position:{my:"center",at:"center",of:window},buttons:d,show:{effect:"blind",duration:1E3},open:function(){a(".ui-widget-overlay").bind("click",function(){c.dialog("close")})},
|
2 |
+
create:function(){a(".ui-dialog-titlebar-close").addClass("ui-button")}});c.dialog("open")})})(jQuery);
|
plugin-fw/assets/js/yith-enhanced-select.min.js
CHANGED
@@ -1 +1,10 @@
|
|
1 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.findInternal=function(a,f,c){a instanceof String&&(a=String(a));for(var d=a.length,e=0;e<d;e++){var b=a[e];if(f.call(c,b,e,a))return{i:e,v:b}}return{i:-1,v:void 0}};$jscomp.ASSUME_ES5=!1;$jscomp.ASSUME_NO_NATIVE_MAP=!1;$jscomp.ASSUME_NO_NATIVE_SET=!1;$jscomp.defineProperty=$jscomp.ASSUME_ES5||"function"==typeof Object.defineProperties?Object.defineProperty:function(a,f,c){a!=Array.prototype&&a!=Object.prototype&&(a[f]=c.value)};
|
2 |
+
$jscomp.getGlobal=function(a){return"undefined"!=typeof window&&window===a?a:"undefined"!=typeof global&&null!=global?global:a};$jscomp.global=$jscomp.getGlobal(this);$jscomp.polyfill=function(a,f,c,d){if(f){c=$jscomp.global;a=a.split(".");for(d=0;d<a.length-1;d++){var e=a[d];e in c||(c[e]={});c=c[e]}a=a[a.length-1];d=c[a];f=f(d);f!=d&&null!=f&&$jscomp.defineProperty(c,a,{configurable:!0,writable:!0,value:f})}};
|
3 |
+
$jscomp.polyfill("Array.prototype.find",function(a){return a?a:function(a,c){return $jscomp.findInternal(this,a,c).v}},"es6","es3");
|
4 |
+
jQuery(document).ready(function(a){a(document.body).on("yith-framework-enhanced-select-init",function(){a(".yith-post-search").filter(":not(.enhanced)").each(function(){var f=a.extend({action:"yith_plugin_fw_json_search_posts",security:yith_framework_enhanced_select_params.search_posts_nonce,post_type:"post"},a(this).data()),c={allowClear:a(this).data("allow_clear")?!0:!1,placeholder:a(this).data("placeholder"),minimumInputLength:a(this).data("minimum_input_length")?a(this).data("minimum_input_length"):
|
5 |
+
"3",escapeMarkup:function(a){return a},ajax:{url:ajaxurl,dataType:"json",quietMillis:250,data:function(b){return a.extend({term:b.term},f)},processResults:function(b){var c=[];b&&a.each(b,function(a,b){c.push({id:a,text:b})});return{results:c}},cache:!0}};a(this).select2(c).addClass("enhanced");if(a(this).data("sortable")){var d=a(this),e=a(this).next(".select2-container").find("ul.select2-selection__rendered");e.sortable({placeholder:"ui-state-highlight select2-selection__choice",forcePlaceholderSize:!0,
|
6 |
+
items:"li:not(.select2-search__field)",tolerance:"pointer",stop:function(){a(e.find(".select2-selection__choice").get().reverse()).each(function(){var b=a(this).data("data").id;b=d.find('option[value="'+b+'"]')[0];d.prepend(b)})}})}});a(".yith-customer-search").filter(":not(.enhanced)").each(function(){var f=a.extend({action:"woocommerce_json_search_customers",security:yith_framework_enhanced_select_params.search_customers_nonce},a(this).data()),c={allowClear:a(this).data("allow_clear")?!0:!1,placeholder:a(this).data("placeholder"),
|
7 |
+
minimumInputLength:a(this).data("minimum_input_length")?a(this).data("minimum_input_length"):"3",escapeMarkup:function(a){return a},ajax:{url:ajaxurl,dataType:"json",quietMillis:250,data:function(b){return a.extend({term:b.term},f)},processResults:function(b){var c=[];b&&a.each(b,function(a,b){c.push({id:a,text:b})});return{results:c}},cache:!0}};a(this).select2(c).addClass("enhanced");if(a(this).data("sortable")){var d=a(this),e=a(this).next(".select2-container").find("ul.select2-selection__rendered");
|
8 |
+
e.sortable({placeholder:"ui-state-highlight select2-selection__choice",forcePlaceholderSize:!0,items:"li:not(.select2-search__field)",tolerance:"pointer",stop:function(){a(e.find(".select2-selection__choice").get().reverse()).each(function(){var b=a(this).data("data").id;b=d.find('option[value="'+b+'"]')[0];d.prepend(b)})}})}});a(".yith-term-search").filter(":not(.enhanced)").each(function(){var f=a.extend({action:"yith_plugin_fw_json_search_terms",security:yith_framework_enhanced_select_params.search_terms_nonce,
|
9 |
+
taxonomy:"category"},a(this).data()),c={allowClear:a(this).data("allow_clear")?!0:!1,placeholder:a(this).data("placeholder"),minimumInputLength:a(this).data("minimum_input_length")?a(this).data("minimum_input_length"):"3",escapeMarkup:function(a){return a},ajax:{url:ajaxurl,dataType:"json",quietMillis:250,data:function(b){return a.extend({term:b.term},f)},processResults:function(b){var c=[];b&&a.each(b,function(a,b){c.push({id:a,text:b})});return{results:c}},cache:!0}};a(this).select2(c).addClass("enhanced");
|
10 |
+
if(a(this).data("sortable")){var d=a(this),e=a(this).next(".select2-container").find("ul.select2-selection__rendered");e.sortable({placeholder:"ui-state-highlight select2-selection__choice",forcePlaceholderSize:!0,items:"li:not(.select2-search__field)",tolerance:"pointer",stop:function(){a(e.find(".select2-selection__choice").get().reverse()).each(function(){var b=a(this).data("data").id;b=d.find('option[value="'+b+'"]')[0];d.prepend(b)})}})}})}).trigger("yith-framework-enhanced-select-init")});
|
plugin-fw/assets/js/yith-fields.js
CHANGED
@@ -1,5 +1,4 @@
|
|
1 |
-
|
2 |
-
jQuery( function ( $ ) {
|
3 |
|
4 |
/* global yith_framework_fw_fields*/
|
5 |
|
@@ -27,6 +26,16 @@ jQuery( function ( $ ) {
|
|
27 |
/* Datepicker */
|
28 |
$datepicker.each( function () {
|
29 |
var args = $( this ).data();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
30 |
$( this ).datepicker( args );
|
31 |
} );
|
32 |
|
@@ -408,7 +417,7 @@ jQuery( function ( $ ) {
|
|
408 |
$( document.body ).trigger( 'yith-framework-enhanced-select-init' );
|
409 |
};
|
410 |
|
411 |
-
yith_fields_init();
|
412 |
|
413 |
/* on-off */
|
414 |
$( document ).on( 'click', '.yith-plugin-fw-onoff-container span', function () {
|
@@ -438,7 +447,7 @@ jQuery( function ( $ ) {
|
|
438 |
id = wrapper.attr( 'id' ),
|
439 |
current_tab = $.urlParam( 'tab' );
|
440 |
|
441 |
-
formdata.append( 'security', wrapper.data('nonce') );
|
442 |
|
443 |
if ( typeof array_keys != 'undefined' && array_keys.length > 0 ) {
|
444 |
formdata.append( 'yith_toggle_elements_order_keys', array_keys );
|
@@ -464,7 +473,7 @@ jQuery( function ( $ ) {
|
|
464 |
spinner.removeClass( 'show' );
|
465 |
}
|
466 |
|
467 |
-
$( document ).trigger( 'yith_save_toggle_element_done', [
|
468 |
}
|
469 |
} );
|
470 |
};
|
@@ -523,7 +532,7 @@ jQuery( function ( $ ) {
|
|
523 |
toggle_el.find( '.subtitle' ).html( subtitle );
|
524 |
}
|
525 |
|
526 |
-
$( document ).trigger( 'yith-toggle-element-item-title', [
|
527 |
};
|
528 |
|
529 |
$.urlParam = function ( name ) {
|
@@ -553,25 +562,25 @@ jQuery( function ( $ ) {
|
|
553 |
/**Add new box toggle**/
|
554 |
$( document ).on( 'click', '.yith-add-box-button', function ( event ) {
|
555 |
event.preventDefault();
|
556 |
-
var $this
|
557 |
-
target_id
|
558 |
-
closed_label
|
559 |
-
label
|
560 |
-
id
|
561 |
-
|
562 |
|
563 |
if ( '' !== target_id ) {
|
564 |
$( '#' + target_id ).html( template( { index: 'box_id' } ) ).slideToggle();
|
565 |
-
if (closed_label !== '') {
|
566 |
-
if ($this.html() === closed_label) {
|
567 |
-
$this.html(label).removeClass('closed');
|
568 |
} else {
|
569 |
-
$this.html(closed_label).addClass('closed');
|
570 |
}
|
571 |
}
|
572 |
|
573 |
-
|
574 |
-
$( document ).trigger( 'yith-add-box-button-toggle', [
|
575 |
}
|
576 |
} );
|
577 |
|
@@ -588,7 +597,7 @@ jQuery( function ( $ ) {
|
|
588 |
|
589 |
hidden_obj.val( counter );
|
590 |
|
591 |
-
$( document ).trigger( 'yith-toggle-change-counter', [
|
592 |
|
593 |
counter = hidden_obj.val();
|
594 |
var template = wp.template( 'yith-toggle-element-item-' + id ),
|
@@ -626,29 +635,28 @@ jQuery( function ( $ ) {
|
|
626 |
|
627 |
$( toggle_el ).formatToggleTitle();
|
628 |
var form_is_valid = $( '<input type="hidden">' ).val( 'yes' );
|
629 |
-
$( document ).trigger( 'yith-toggle-element-item-before-add', [
|
630 |
|
631 |
-
var delayInMilliseconds =1000; //1 second
|
632 |
-
setTimeout(function() {
|
633 |
if ( form_is_valid.val() === 'yes' ) {
|
634 |
$( toggle_element ).find( '.yith-toggle-elements' ).append( toggle_el );
|
635 |
$( add_box ).find( '.yith-plugin-fw-datepicker' ).datepicker( 'destroy' );
|
636 |
$( add_box ).html( '' );
|
637 |
-
$( add_box ).prev('.yith-add-box-button').trigger('click');
|
638 |
toggle_element.saveToggleElement();
|
639 |
|
640 |
-
var delayInMilliseconds =2000; //1 second
|
641 |
-
setTimeout(function() {
|
642 |
-
$( toggle_element ).find('.highlight').removeClass('highlight');
|
643 |
-
}, delayInMilliseconds);
|
644 |
|
645 |
|
646 |
-
|
647 |
}
|
648 |
}, delayInMilliseconds );
|
649 |
|
650 |
|
651 |
-
|
652 |
} );
|
653 |
|
654 |
$( document ).on( 'click', '.yith-toggle-row .yith-save-button', function ( event ) {
|
@@ -656,10 +664,10 @@ jQuery( function ( $ ) {
|
|
656 |
var toggle = $( this ).closest( '.toggle-element' ),
|
657 |
toggle_row = $( this ).closest( '.yith-toggle-row' ),
|
658 |
spinner = toggle_row.find( '.spinner' );
|
659 |
-
|
660 |
|
661 |
var form_is_valid = $( '<input type="hidden">' ).val( 'yes' );
|
662 |
-
$( document ).trigger( 'yith-toggle-element-item-before-update', [
|
663 |
if ( form_is_valid.val() === 'yes' ) {
|
664 |
spinner.addClass( 'show' );
|
665 |
toggle.saveToggleElement( spinner );
|
@@ -687,20 +695,32 @@ jQuery( function ( $ ) {
|
|
687 |
$( this ).closest( '.yith-plugin-fw-radio' ).val( $( this ).val() ).trigger( 'change' );
|
688 |
} );
|
689 |
|
690 |
-
$(document).on('click', '.yith-password-eye', function () {
|
691 |
-
var $this = $(this),
|
692 |
-
inp
|
693 |
-
if (inp.attr('type') === "password") {
|
694 |
-
inp.attr('type', 'text');
|
695 |
-
$this.addClass('yith-password-eye-closed');
|
696 |
} else {
|
697 |
-
inp.attr('type', 'password');
|
698 |
-
$this.removeClass('yith-password-eye-closed');
|
699 |
}
|
700 |
-
});
|
701 |
|
702 |
-
$( '
|
703 |
-
$(
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
704 |
} );
|
705 |
|
706 |
-
} );
|
1 |
+
( function ( $ ) {
|
|
|
2 |
|
3 |
/* global yith_framework_fw_fields*/
|
4 |
|
26 |
/* Datepicker */
|
27 |
$datepicker.each( function () {
|
28 |
var args = $( this ).data();
|
29 |
+
|
30 |
+
// set animation to false to prevent style 'glitches' when removing class on closing
|
31 |
+
args.showAnim = false;
|
32 |
+
args.beforeShow = function ( input, instance ) {
|
33 |
+
instance.dpDiv.addClass( 'yith-plugin-fw-datepicker-div' );
|
34 |
+
};
|
35 |
+
args.onClose = function ( selectedDate, instance ) {
|
36 |
+
instance.dpDiv.removeClass( 'yith-plugin-fw-datepicker-div' );
|
37 |
+
};
|
38 |
+
|
39 |
$( this ).datepicker( args );
|
40 |
} );
|
41 |
|
417 |
$( document.body ).trigger( 'yith-framework-enhanced-select-init' );
|
418 |
};
|
419 |
|
420 |
+
$( document ).on( 'yith_fields_init', yith_fields_init ).trigger( 'yith_fields_init' );
|
421 |
|
422 |
/* on-off */
|
423 |
$( document ).on( 'click', '.yith-plugin-fw-onoff-container span', function () {
|
447 |
id = wrapper.attr( 'id' ),
|
448 |
current_tab = $.urlParam( 'tab' );
|
449 |
|
450 |
+
formdata.append( 'security', wrapper.data( 'nonce' ) );
|
451 |
|
452 |
if ( typeof array_keys != 'undefined' && array_keys.length > 0 ) {
|
453 |
formdata.append( 'yith_toggle_elements_order_keys', array_keys );
|
473 |
spinner.removeClass( 'show' );
|
474 |
}
|
475 |
|
476 |
+
$( document ).trigger( 'yith_save_toggle_element_done', [result, toggle] );
|
477 |
}
|
478 |
} );
|
479 |
};
|
532 |
toggle_el.find( '.subtitle' ).html( subtitle );
|
533 |
}
|
534 |
|
535 |
+
$( document ).trigger( 'yith-toggle-element-item-title', [toggle_el] );
|
536 |
};
|
537 |
|
538 |
$.urlParam = function ( name ) {
|
562 |
/**Add new box toggle**/
|
563 |
$( document ).on( 'click', '.yith-add-box-button', function ( event ) {
|
564 |
event.preventDefault();
|
565 |
+
var $this = $( this ),
|
566 |
+
target_id = $this.data( 'box_id' ),
|
567 |
+
closed_label = $this.data( 'closed_label' ),
|
568 |
+
label = $this.data( 'opened_label' ),
|
569 |
+
id = $this.closest( '.yith-toggle_wrapper' ).attr( 'id' );
|
570 |
+
template = wp.template( 'yith-toggle-element-add-box-content-' + id );
|
571 |
|
572 |
if ( '' !== target_id ) {
|
573 |
$( '#' + target_id ).html( template( { index: 'box_id' } ) ).slideToggle();
|
574 |
+
if ( closed_label !== '' ) {
|
575 |
+
if ( $this.html() === closed_label ) {
|
576 |
+
$this.html( label ).removeClass( 'closed' );
|
577 |
} else {
|
578 |
+
$this.html( closed_label ).addClass( 'closed' );
|
579 |
}
|
580 |
}
|
581 |
|
582 |
+
$( document ).trigger( 'yith_fields_init' );
|
583 |
+
$( document ).trigger( 'yith-add-box-button-toggle', [$this] );
|
584 |
}
|
585 |
} );
|
586 |
|
597 |
|
598 |
hidden_obj.val( counter );
|
599 |
|
600 |
+
$( document ).trigger( 'yith-toggle-change-counter', [hidden_obj, add_box] );
|
601 |
|
602 |
counter = hidden_obj.val();
|
603 |
var template = wp.template( 'yith-toggle-element-item-' + id ),
|
635 |
|
636 |
$( toggle_el ).formatToggleTitle();
|
637 |
var form_is_valid = $( '<input type="hidden">' ).val( 'yes' );
|
638 |
+
$( document ).trigger( 'yith-toggle-element-item-before-add', [add_box, toggle_el, form_is_valid] );
|
639 |
|
640 |
+
var delayInMilliseconds = 1000; //1 second
|
641 |
+
setTimeout( function () {
|
642 |
if ( form_is_valid.val() === 'yes' ) {
|
643 |
$( toggle_element ).find( '.yith-toggle-elements' ).append( toggle_el );
|
644 |
$( add_box ).find( '.yith-plugin-fw-datepicker' ).datepicker( 'destroy' );
|
645 |
$( add_box ).html( '' );
|
646 |
+
$( add_box ).prev( '.yith-add-box-button' ).trigger( 'click' );
|
647 |
toggle_element.saveToggleElement();
|
648 |
|
649 |
+
var delayInMilliseconds = 2000; //1 second
|
650 |
+
setTimeout( function () {
|
651 |
+
$( toggle_element ).find( '.highlight' ).removeClass( 'highlight' );
|
652 |
+
}, delayInMilliseconds );
|
653 |
|
654 |
|
655 |
+
$( document ).trigger( 'yith_fields_init' );
|
656 |
}
|
657 |
}, delayInMilliseconds );
|
658 |
|
659 |
|
|
|
660 |
} );
|
661 |
|
662 |
$( document ).on( 'click', '.yith-toggle-row .yith-save-button', function ( event ) {
|
664 |
var toggle = $( this ).closest( '.toggle-element' ),
|
665 |
toggle_row = $( this ).closest( '.yith-toggle-row' ),
|
666 |
spinner = toggle_row.find( '.spinner' );
|
667 |
+
toggle_row.formatToggleTitle();
|
668 |
|
669 |
var form_is_valid = $( '<input type="hidden">' ).val( 'yes' );
|
670 |
+
$( document ).trigger( 'yith-toggle-element-item-before-update', [toggle, toggle_row, form_is_valid] );
|
671 |
if ( form_is_valid.val() === 'yes' ) {
|
672 |
spinner.addClass( 'show' );
|
673 |
toggle.saveToggleElement( spinner );
|
695 |
$( this ).closest( '.yith-plugin-fw-radio' ).val( $( this ).val() ).trigger( 'change' );
|
696 |
} );
|
697 |
|
698 |
+
$( document ).on( 'click', '.yith-password-eye', function () {
|
699 |
+
var $this = $( this ),
|
700 |
+
inp = $( this ).closest( '.yith-password-wrapper' ).find( 'input' );
|
701 |
+
if ( inp.attr( 'type' ) === "password" ) {
|
702 |
+
inp.attr( 'type', 'text' );
|
703 |
+
$this.addClass( 'yith-password-eye-closed' );
|
704 |
} else {
|
705 |
+
inp.attr( 'type', 'password' );
|
706 |
+
$this.removeClass( 'yith-password-eye-closed' );
|
707 |
}
|
708 |
+
} );
|
709 |
|
710 |
+
$( document.body ).on( 'yith-plugin-fw-init-radio', function () {
|
711 |
+
$( '.yith-plugin-fw-radio:not(.yith-plugin-fw-radio--initialized)' ).each( function () {
|
712 |
+
$( this ).val( $( this ).attr( 'value' ) );
|
713 |
+
$( this ).addClass( 'yith-plugin-fw-radio--initialized' );
|
714 |
+
} );
|
715 |
+
} ).trigger( 'yith-plugin-fw-init-radio' );
|
716 |
+
|
717 |
+
/**
|
718 |
+
* Select2 - add class to stylize it with the new plugin-fw style
|
719 |
+
*/
|
720 |
+
$( document ).on( 'select2:open', function ( e ) {
|
721 |
+
if ( $( e.target ).closest( '.yith-plugin-ui' ).length ) {
|
722 |
+
$( '.select2-results' ).closest( '.select2-container' ).addClass( 'yith-plugin-fw-select2-container' );
|
723 |
+
}
|
724 |
} );
|
725 |
|
726 |
+
} )( jQuery );
|
plugin-fw/assets/js/yith-fields.min.js
CHANGED
@@ -1,25 +1,29 @@
|
|
1 |
-
|
2 |
-
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
|
|
|
|
|
|
|
1 |
+
var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.findInternal=function(a,b,c){a instanceof String&&(a=String(a));for(var d=a.length,e=0;e<d;e++){var g=a[e];if(b.call(c,g,e,a))return{i:e,v:g}}return{i:-1,v:void 0}};$jscomp.ASSUME_ES5=!1;$jscomp.ASSUME_NO_NATIVE_MAP=!1;$jscomp.ASSUME_NO_NATIVE_SET=!1;$jscomp.defineProperty=$jscomp.ASSUME_ES5||"function"==typeof Object.defineProperties?Object.defineProperty:function(a,b,c){a!=Array.prototype&&a!=Object.prototype&&(a[b]=c.value)};
|
2 |
+
$jscomp.getGlobal=function(a){return"undefined"!=typeof window&&window===a?a:"undefined"!=typeof global&&null!=global?global:a};$jscomp.global=$jscomp.getGlobal(this);$jscomp.polyfill=function(a,b,c,d){if(b){c=$jscomp.global;a=a.split(".");for(d=0;d<a.length-1;d++){var e=a[d];e in c||(c[e]={});c=c[e]}a=a[a.length-1];d=c[a];b=b(d);b!=d&&null!=b&&$jscomp.defineProperty(c,a,{configurable:!0,writable:!0,value:b})}};
|
3 |
+
$jscomp.polyfill("Array.prototype.find",function(a){return a?a:function(a,c){return $jscomp.findInternal(this,a,c).v}},"es6","es3");
|
4 |
+
(function(a){a(document).on("yith_fields_init",function(){var b=a(".yith-plugin-fw-datepicker"),c=a(".yith-plugin-fw-colorpicker"),d=a(".yith-plugin-fw-upload-img-url"),e=a(".add_media"),g=a(".yith-plugin-fw .image-gallery ul.slides-wrapper"),h=a(".yith-plugin-fw-sidebar-layout"),k=a(".yith-plugin-fw .yith-plugin-fw-slider-container .ui-slider-horizontal"),l=a(".codemirror"),m=a(".yit-icons-manager-wrapper");a(".yith-plugin-ui td.forminp-checkbox");b.each(function(){var b=a(this).data();b.showAnim=
|
5 |
+
!1;b.beforeShow=function(a,b){b.dpDiv.addClass("yith-plugin-fw-datepicker-div")};b.onClose=function(a,b){b.dpDiv.removeClass("yith-plugin-fw-datepicker-div")};a(this).datepicker(b)});c.wpColorPicker({palettes:!1,width:200,mode:"hsl",clear:function(){var b=a(this);b.val(b.data("default-color"));b.change()}});c.each(function(){var b=a(this).data("variations-label"),f=a(this).closest(".yith-plugin-fw-colorpicker-field-wrapper"),c=a(this).closest(".yith-single-colorpicker"),d=f.find(".wp-picker-input-wrap"),
|
6 |
+
e=c.find(".wp-picker-input-wrap");d.length&&f.find("a.wp-color-result").attr("title",b);c.length&&c.find("a.wp-color-result").attr("title",b);d.find(".wp-picker-clear-custom").length||(b=a("<span/>").attr({class:"wp-picker-default-custom"}),d.find(".wp-picker-default").wrap(b));e.find(".wp-picker-clear-custom").length||(b=a("<span/>").attr({class:"wp-picker-default-custom"}),e.find(".wp-picker-default").wrap(b))});"undefined"!==typeof wp&&"undefined"!==typeof wp.media&&(d.change(function(){var b=
|
7 |
+
a(this).val(),f=a(this).parent().find(".yith-plugin-fw-upload-img-preview").first();1>f.length&&(f=a(this).parent().parent().find(".yith-plugin-fw-upload-img-preview").first());/(http|ftp|https):\/\/[a-zA-Z0-9@?^=%&:/~+#-_.]*.(gif|jpg|jpeg|png|ico)/.test(b)?f.html('<img src="'+b+'" style="max-width:100px; max-height:100px;" />'):f.html("")}).trigger("change"),a(document).on("click",".yith-plugin-fw-upload-button",function(b){b.preventDefault();var f=a(this).attr("id").replace(/-button$/,"");if(!c){b=
|
8 |
+
[new wp.media.controller.Library({library:wp.media.query(),multiple:!1,title:"Choose Image",priority:20,filterable:"uploaded"})];var c=wp.media.frames.downloadable_file=wp.media({title:"Choose Image",library:{type:""},button:{text:"Choose Image"},multiple:!1,states:b});c.on("select",function(){var b=c.state().get("selection").first().toJSON();a("#"+f).val(b.url);a("#"+f+"-yith-attachment-id")&&a("#"+f+"-yith-attachment-id").val(b.id);d.trigger("change")})}c.open()}),a(document).on("click",".yith-plugin-fw-upload-button-reset",
|
9 |
+
function(b){var f=a(this);b=f.attr("id");f=f.attr("id").replace(/-button-reset$/,"");b=a("#"+b).data("default");a("#"+f).val(b);d.trigger("change")}));e.on("click",function(){});"undefined"!==typeof wp&&"undefined"!==typeof wp.media&&(a(document).on("click",".yith-plugin-fw .image-gallery-button",function(b){var f=a(this);b=f.closest(".image-gallery");var c=b.find(".image_gallery_ids"),d=c.val(),e=b.find("ul.slides-wrapper"),n=wp.media.frames.image_gallery=wp.media({title:f.data("choose"),button:{text:f.data("update")},
|
10 |
+
states:[new wp.media.controller.Library({title:f.data("choose"),filterable:"all",multiple:!0})]});n.on("select",function(){n.state().get("selection").map(function(a){a=a.toJSON();a.id&&(d=d?d+","+a.id:a.id,e.append('<li class="image" data-attachment_id="'+a.id+'"><img src="'+a.sizes.thumbnail.url+'"/><ul class="actions"><li><a href="#" class="delete" title="'+f.data("delete")+'">x</a></li></ul></li>'))});c.val(d)});n.open()}),g.each(function(){var b=a(this);b.sortable({items:"li.image",cursor:"move",
|
11 |
+
scrollSensitivity:40,forcePlaceholderSize:!0,forceHelperSize:!1,helper:"clone",opacity:.65,start:function(a,b){b.item.css("background-color","#f6f6f6")},stop:function(a,b){b.item.removeAttr("style")},update:function(c,d){var f="";b.find("li.image").css("cursor","default").each(function(){var b=a(this).attr("data-attachment_id");f=f+b+","});b.closest(".image-gallery").find(".image_gallery_ids").val(f)}})}),g.on("click","a.delete",function(){var b=a(this).closest(".image-gallery"),c=a(this).closest(".image-gallery ul.slides-wrapper");
|
12 |
+
b=b.find(".image_gallery_ids");var d="";a(this).closest("li.image").remove();c.find("li.image").css("cursor","default").each(function(){var b=a(this).attr("data-attachment_id");d=d+b+","});b.val(d)}));h.each(function(){a(this).find("img").on("click",function(){var b=a(this).closest(".yith-plugin-fw-sidebar-layout"),c=b.find(".yith-plugin-fw-sidebar-layout-sidebar-left-container");b=b.find(".yith-plugin-fw-sidebar-layout-sidebar-right-container");var d=a(this).data("type");a(this).parent().children(":radio").attr("checked",
|
13 |
+
!1);a(this).prev(":radio").attr("checked",!0);if("undefined"!=typeof d)switch(d){case "left":c.show();b.hide();break;case "right":b.show();c.hide();break;case "double":c.show();b.show();break;default:c.hide(),b.hide()}})});k.each(function(){var b=a(this).data("val"),c=a(this).data("min"),d=a(this).data("max"),e=a(this).data("step"),g=a(this).data("labels");a(this).slider({value:b,min:c,max:d,range:"min",step:e,create:function(){a(this).find(".ui-slider-handle").text(a(this).slider("value"))},slide:function(b,
|
14 |
+
c){a(this).find("input").val(c.value);a(this).find(".ui-slider-handle").text(c.value);a(this).siblings(".feedback").find("strong").text(c.value+g)}})});l.each(function(b,c){b=CodeMirror.fromTextArea(c,{lineNumbers:1,mode:"javascript",showCursorWhenSelecting:!0});a(c).data("codemirrorInstance",b)});a(document).on("click",".yith-plugin-fw-select-all",function(){a("#"+a(this).data("select-id")).find("option").prop("selected",!0).trigger("change")});a(document).on("click",".yith-plugin-fw-deselect-all",
|
15 |
+
function(){a("#"+a(this).data("select-id")).find("option").prop("selected",!1).trigger("change")});m.each(function(){var b=a(this),c=b.find(".yit-icons-manager-icon-preview").first(),d=b.find(".yit-icons-manager-icon-text");b.on("click",".yit-icons-manager-list li",function(e){e=a(e.target).closest("li");var f=e.data("font"),g=e.data("icon"),h=e.data("key"),k=e.data("name");c.attr("data-font",f);c.attr("data-icon",g);c.attr("data-key",h);c.attr("data-name",k);d.val(f+":"+k);b.find(".yit-icons-manager-list li").removeClass("active");
|
16 |
+
e.addClass("active")});b.on("click",".yit-icons-manager-action-set-default",function(){b.find(".yit-icons-manager-list li.default").trigger("click")})});a(document).on("click",".yith-plugin-fw-select-images__item",function(){var b=a(this),c=b.data("key"),d=b.closest(".yith-plugin-fw-select-images__wrapper"),e=d.find(".yith-plugin-fw-select-images__item");d=d.find("select").first();d.length&&(d.val(c),e.removeClass("yith-plugin-fw-select-images__item--selected"),b.addClass("yith-plugin-fw-select-images__item--selected"))});
|
17 |
+
a(document.body).trigger("wc-enhanced-select-init");a(document).find(".ui-sortable .yith-toggle-elements").sortable({cursor:"move",axis:"y",scrollSensitivity:40,forcePlaceholderSize:!0,helper:"clone",stop:function(b,c){b=jQuery(".ui-sortable-handle");var d=[];for(c=0;c<b.length;c++)d[c]=a(b[c]).data("item_key");0<d.length&&a(this).closest(".toggle-element").saveToggleElement(null,d)}});a(document.body).trigger("yith-framework-enhanced-select-init")}).trigger("yith_fields_init");a(document).on("click",
|
18 |
+
".yith-plugin-fw-onoff-container span",function(){var b=a(this).prev("input");b.prop("checked")?b.prop("checked",!1).attr("value","no").removeClass("onoffchecked"):b.prop("checked",!0).attr("value","yes").addClass("onoffchecked");b.change()});a.fn.saveToggleElement=function(b,c){var d=a(this),e="yith_plugin_fw_save_toggle_element",g=d.serializeToggleElement(),h=d.find(".yith-toggle_wrapper"),k=h.attr("id"),l=a.urlParam("tab");g.append("security",h.data("nonce"));"undefined"!=typeof c&&0<c.length&&
|
19 |
+
g.append("yith_toggle_elements_order_keys",c);d.closest(".metaboxes-tab.yith-plugin-ui").length?(e="yith_plugin_fw_save_toggle_element_metabox",post_id=a(this).closest("form#post").find("#post_ID").val(),yit_metaboxes_nonce=a(this).closest("form#post").find("#yit_metaboxes_nonce").val(),url=yith_framework_fw_fields.ajax_url+"?action="+e+"&post_ID="+post_id+"&yit_metaboxes_nonce="+yit_metaboxes_nonce+"&toggle_id="+k):url=yith_framework_fw_fields.admin_url+"?action="+e+"&tab="+l+"&toggle_id="+k;a.ajax({type:"POST",
|
20 |
+
url:url,data:g,contentType:!1,processData:!1,success:function(c){b&&b.removeClass("show");a(document).trigger("yith_save_toggle_element_done",[c,d])}})};a.fn.serializeToggleElement=function(){var b=a(this),c=new FormData;b=a(b).find(":input").serializeArray();a.each(b,function(a,b){el_name=b.name;c.append(b.name,b.value)});return c};a.fn.formatToggleTitle=function(){var b=a(this),c=b.find(":input"),d=b.find("span.title").data("title_format"),e=b.find(".subtitle").data("subtitle_format"),g=/[^%%]+(?=[%%])/g;
|
21 |
+
if("undefined"!=typeof d)var h=d.match(g);if("undefined"!=typeof e)var k=e.match(g);a.each(c,function(b,c){"undefined"!=typeof a(c).attr("id")&&($field_id=a(c).attr("id"),$field_array=$field_id.split("_"),$field_array.pop(),$field_id=$field_array.join("_"),$field_val=a(c).val(),null!=h&&"undefined"!=typeof h&&-1!==h.indexOf($field_id)&&(d=d.replace("%%"+$field_id+"%%",$field_val)),null!=k&&"undefined"!=typeof k&&-1!==k.indexOf($field_id)&&(e=e.replace("%%"+$field_id+"%%",$field_val)))});""!==d&&b.find("span.title").html(d);
|
22 |
+
""!==e&&b.find(".subtitle").html(e);a(document).trigger("yith-toggle-element-item-title",[b])};a.urlParam=function(a){a=(new RegExp("[?&]"+a+"=([^&#]*)")).exec(window.location.search);return null!==a?a[1]||0:!1};a(document).on("click",".yith-toggle-title",function(b){b=a(b.target);var c=b.closest(".yith-toggle-row"),d=c.find(".yith-toggle-content");if(b.hasClass("yith-plugin-fw-onoff")||b.hasClass("yith-icon-drag"))return!1;c.is(".yith-toggle-row-opened")?d.slideUp(400):d.slideDown(400);c.toggleClass("yith-toggle-row-opened")});
|
23 |
+
a(document).on("click",".yith-add-box-button",function(b){b.preventDefault();b=a(this);var c=b.data("box_id"),d=b.data("closed_label"),e=b.data("opened_label"),g=b.closest(".yith-toggle_wrapper").attr("id");template=wp.template("yith-toggle-element-add-box-content-"+g);""!==c&&(a("#"+c).html(template({index:"box_id"})).slideToggle(),""!==d&&(b.html()===d?b.html(e).removeClass("closed"):b.html(d).addClass("closed")),a(document).trigger("yith_fields_init"),a(document).trigger("yith-add-box-button-toggle",
|
24 |
+
[b]))});a(document).on("click",".yith-add-box-buttons .yith-save-button",function(b){b.preventDefault();var c=a(this).parents(".yith-add-box"),d=a(this).closest(".yith-toggle_wrapper").attr("id");b=c.find(".spinner");var e=a(this).parents(".toggle-element"),g=c.find(":input"),h=e.find(".yith-toggle-row").length,k=a('<input type="hidden">');k.val(h);a(document).trigger("yith-toggle-change-counter",[k,c]);h=k.val();d=wp.template("yith-toggle-element-item-"+d);var l=a(d({index:h}));b.addClass("show");
|
25 |
+
a.each(g,function(b,c){"undefined"!=typeof a(c).attr("id")&&($field_id=a(c).attr("id"),$field_val=a(c).val(),"radio"==a(c).attr("type")?($field_id=$field_id.replace("new_",""),$field_id=$field_id.replace("-"+$field_val,""),$field_id=$field_id+"_dataindex-"+$field_val):$field_id=$field_id.replace("new_","")+"_"+h,a(c).is(":checked")&&a(l).find("#"+$field_id).prop("checked",!0),(a(c).hasClass("yith-post-search")||a(c).hasClass("yith-term-search"))&&a(l).find("#"+$field_id).html(a("#"+a(c).attr("id")).html()),
|
26 |
+
a(l).find("#"+$field_id).val($field_val))});a(l).formatToggleTitle();var m=a('<input type="hidden">').val("yes");a(document).trigger("yith-toggle-element-item-before-add",[c,l,m]);setTimeout(function(){"yes"===m.val()&&(a(e).find(".yith-toggle-elements").append(l),a(c).find(".yith-plugin-fw-datepicker").datepicker("destroy"),a(c).html(""),a(c).prev(".yith-add-box-button").trigger("click"),e.saveToggleElement(),setTimeout(function(){a(e).find(".highlight").removeClass("highlight")},2E3),a(document).trigger("yith_fields_init"))},
|
27 |
+
1E3)});a(document).on("click",".yith-toggle-row .yith-save-button",function(b){b.preventDefault();b=a(this).closest(".toggle-element");var c=a(this).closest(".yith-toggle-row"),d=c.find(".spinner");c.formatToggleTitle();var e=a('<input type="hidden">').val("yes");a(document).trigger("yith-toggle-element-item-before-update",[b,c,e]);"yes"===e.val()&&(d.addClass("show"),b.saveToggleElement(d))});a(document).on("click",".yith-toggle-row .yith-delete-button",function(b){b.preventDefault();b=a(this).closest(".toggle-element");
|
28 |
+
a(this).closest(".yith-toggle-row").remove();b.saveToggleElement()});a(document).on("click",".yith-toggle-onoff",function(b){b.preventDefault();a(this).closest(".toggle-element").saveToggleElement()});a(document).on("click",".yith-plugin-fw-radio input[type=radio]",function(){a(this).closest(".yith-plugin-fw-radio").val(a(this).val()).trigger("change")});a(document).on("click",".yith-password-eye",function(){var b=a(this),c=a(this).closest(".yith-password-wrapper").find("input");"password"===c.attr("type")?
|
29 |
+
(c.attr("type","text"),b.addClass("yith-password-eye-closed")):(c.attr("type","password"),b.removeClass("yith-password-eye-closed"))});a(document.body).on("yith-plugin-fw-init-radio",function(){a(".yith-plugin-fw-radio:not(.yith-plugin-fw-radio--initialized)").each(function(){a(this).val(a(this).attr("value"));a(this).addClass("yith-plugin-fw-radio--initialized")})}).trigger("yith-plugin-fw-init-radio");a(document).on("select2:open",function(b){a(b.target).closest(".yith-plugin-ui").length&&a(".select2-results").closest(".select2-container").addClass("yith-plugin-fw-select2-container")})})(jQuery);
|
plugin-fw/assets/js/yith-gutenberg.min.js
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
-
(function(f){function k(e,a,d){var g="";g="";if("undefined"!=typeof a.callback&&"function"==typeof f[a.callback])g=f[a.callback](e,a);else{var b="["+a.shortcode_name;f.each(e.attributes,function(c,l){"className"!=c&&(b+=" "+c+"=",b=1==a.attributes[c].remove_quotes?b+l:b+('"'+l+'"'))});b+="]";e=md5(b);g='<span class="yith_block_'+e+'">'+b+"</span>";"edit"==d&&0!=a.do_shortcode&&function(c){var a=null;f(document).trigger("yith_plugin_fw_gutenberg_before_do_shortcode",[b,c]);f.ajax({async:!0,url:yith_gutenberg_ajax.ajaxurl,
|
2 |
-
method:"post",data:{action:"yith_plugin_fw_gutenberg_do_shortcode",shortcode:b},success:function(d){a=d;""!=a&&(f(".yith_block_"+c).html(a),f(document).trigger("yith_plugin_fw_gutenberg_success_do_shortcode",[b,c,a]))}});f(document).trigger("yith_plugin_fw_gutenberg_after_do_shortcode",[b,c,a]);return a}(e);g=h(n,null,g)}return g}function m(e,a,d,g){var b={};if("colorpicker"==g||"color"==g)e=e.hex;b[a]=e;d.setAttributes(b);return d}var h=wp.element.createElement,p=wp.element.Fragment,q=wp.blocks.registerBlockType,
|
3 |
-
r=wp.editor.InspectorControls,n=wp.element.RawHTML,t=wp.components.SelectControl,u=wp.components.ToggleControl,v=wp.components.CheckboxControl,w=wp.components.RangeControl,x=wp.components.ColorPicker,y=wp.components.RadioControl,z=wp.components.TextControl,A=wp.components.TextareaControl,B=h("svg",{width:22,height:22},h("path",{d:"M 18.24 7.628 C 17.291 8.284 16.076 8.971 14.587 9.688 C 15.344 7.186 15.765 4.851 15.849 2.684 C 15.912 0.939 15.133 0.045 13.514 0.003 C 11.558 -0.06 10.275 1.033 9.665 3.284 C 10.007 3.137 10.359 3.063 10.723 3.063 C 11.021 3.063 11.267 3.184 11.459 3.426 C 11.651 3.668 11.736 3.947 11.715 4.262 C 11.695 5.082 11.276 5.961 10.46 6.896 C 9.644 7.833 8.918 8.3 8.282 8.3 C 7.837 8.3 7.625 7.922 7.646 7.165 C 7.667 6.765 7.804 5.955 8.056 4.735 C 8.287 3.579 8.403 2.801 8.403 2.401 C 8.403 1.707 8.224 1.144 7.867 0.713 C 7.509 0.282 6.994 0.098 6.321 0.161 C 5.858 0.203 5.175 0.624 4.27 1.422 C 3.596 2.035 2.923 2.644 2.25 3.254 L 2.976 4.106 C 3.564 3.664 3.922 3.443 4.048 3.443 C 4.448 3.443 4.637 3.717 4.617 4.263 C 4.617 4.306 4.427 4.968 4.049 6.251 C 3.671 7.534 3.471 8.491 3.449 9.122 C 3.407 9.985 3.565 10.647 3.924 11.109 C 4.367 11.677 5.106 11.919 6.142 11.835 C 7.366 11.751 8.591 11.298 9.816 10.479 C 10.323 10.142 10.808 9.753 11.273 9.311 C 11.105 10.153 10.905 10.868 10.673 11.457 C 8.402 12.487 6.762 13.37 5.752 14.107 C 4.321 15.137 3.554 16.241 3.449 17.419 C 3.259 19.459 4.29 20.479 6.541 20.479 C 8.055 20.479 9.517 19.554 10.926 17.703 C 12.125 16.126 13.166 14.022 14.049 11.394 C 15.578 10.635 16.87 9.892 17.928 9.164 C 17.894 9.409 18.319 7.308 18.24 7.628 Z M 7.393 16.095 C 7.056 16.095 6.898 15.947 6.919 15.653 C 6.961 15.106 7.908 14.38 9.759 13.476 C 8.791 15.221 8.002 16.095 7.393 16.095 Z"}));
|
4 |
-
f.each(yith_gutenberg,function(e,a){q("yith/"+e,{title:a.title,description:a.description,category:a.category,attributes:a.attributes,icon:"undefined"!=typeof a.icon?a.icon:B,keywords:a.keywords,edit:function(d){var g=[];f.each(a.attributes,function(a,c){var b=null,e=c.blocktype;if("undefined"!=typeof e){switch(e){case "select":b=t;break;case "text":b=z;break;case "textarea":b=A;break;case "toggle":b=u;break;case "checkbox":b=v;break;case "number":case "range":b=w;break;case "color":case "colorpicker":b=
|
5 |
-
x;break;case "radio":b=y}if(null!=b){var f=helpMessageUncheked="";"undefined"!=typeof c.helps&&"undefined"!=typeof c.helps.checked&&"undefined"!=typeof c.helps.unchecked?(f=c.helps.checked,helpMessageUncheked=c.helps.unchecked):"undefined"!=typeof c.help&&(f=helpMessageUncheked=c.help);g.push(h(b,{value:d.attributes[a],options:c.options,label:c.label,checked:d.attributes[a],selected:d.attributes[a],help:d.attributes[a]?f:helpMessageUncheked,disableAlpha:c.disableAlpha,min:c.min,max:c.max,multiple:c.multiple,
|
6 |
-
onChange:function(b,c){c=void 0===c?a:c;d=m(b,c,d,e)},onChangeComplete:function(c,b){b=void 0===b?a:b;d=m(c,b,d,e)}}))}}});sc=k(d,a,"edit");return[h(p,null,h(r,null,g),sc)]},save:function(d){return k(d,a,"save")}})})})(jQuery);
|
1 |
+
(function(f){function k(e,a,d){var g="";g="";if("undefined"!=typeof a.callback&&"function"==typeof f[a.callback])g=f[a.callback](e,a);else{var b="["+a.shortcode_name;f.each(e.attributes,function(c,l){"className"!=c&&(b+=" "+c+"=",b=1==a.attributes[c].remove_quotes?b+l:b+('"'+l+'"'))});b+="]";e=md5(b);g='<span class="yith_block_'+e+'">'+b+"</span>";"edit"==d&&0!=a.do_shortcode&&function(c){var a=null;f(document).trigger("yith_plugin_fw_gutenberg_before_do_shortcode",[b,c]);f.ajax({async:!0,url:yith_gutenberg_ajax.ajaxurl,
|
2 |
+
method:"post",data:{action:"yith_plugin_fw_gutenberg_do_shortcode",shortcode:b},success:function(d){a=d;""!=a&&(f(".yith_block_"+c).html(a),f(document).trigger("yith_plugin_fw_gutenberg_success_do_shortcode",[b,c,a]))}});f(document).trigger("yith_plugin_fw_gutenberg_after_do_shortcode",[b,c,a]);return a}(e);g=h(n,null,g)}return g}function m(e,a,d,g){var b={};if("colorpicker"==g||"color"==g)e=e.hex;b[a]=e;d.setAttributes(b);return d}var h=wp.element.createElement,p=wp.element.Fragment,q=wp.blocks.registerBlockType,
|
3 |
+
r=wp.editor.InspectorControls,n=wp.element.RawHTML,t=wp.components.SelectControl,u=wp.components.ToggleControl,v=wp.components.CheckboxControl,w=wp.components.RangeControl,x=wp.components.ColorPicker,y=wp.components.RadioControl,z=wp.components.TextControl,A=wp.components.TextareaControl,B=h("svg",{width:22,height:22},h("path",{d:"M 18.24 7.628 C 17.291 8.284 16.076 8.971 14.587 9.688 C 15.344 7.186 15.765 4.851 15.849 2.684 C 15.912 0.939 15.133 0.045 13.514 0.003 C 11.558 -0.06 10.275 1.033 9.665 3.284 C 10.007 3.137 10.359 3.063 10.723 3.063 C 11.021 3.063 11.267 3.184 11.459 3.426 C 11.651 3.668 11.736 3.947 11.715 4.262 C 11.695 5.082 11.276 5.961 10.46 6.896 C 9.644 7.833 8.918 8.3 8.282 8.3 C 7.837 8.3 7.625 7.922 7.646 7.165 C 7.667 6.765 7.804 5.955 8.056 4.735 C 8.287 3.579 8.403 2.801 8.403 2.401 C 8.403 1.707 8.224 1.144 7.867 0.713 C 7.509 0.282 6.994 0.098 6.321 0.161 C 5.858 0.203 5.175 0.624 4.27 1.422 C 3.596 2.035 2.923 2.644 2.25 3.254 L 2.976 4.106 C 3.564 3.664 3.922 3.443 4.048 3.443 C 4.448 3.443 4.637 3.717 4.617 4.263 C 4.617 4.306 4.427 4.968 4.049 6.251 C 3.671 7.534 3.471 8.491 3.449 9.122 C 3.407 9.985 3.565 10.647 3.924 11.109 C 4.367 11.677 5.106 11.919 6.142 11.835 C 7.366 11.751 8.591 11.298 9.816 10.479 C 10.323 10.142 10.808 9.753 11.273 9.311 C 11.105 10.153 10.905 10.868 10.673 11.457 C 8.402 12.487 6.762 13.37 5.752 14.107 C 4.321 15.137 3.554 16.241 3.449 17.419 C 3.259 19.459 4.29 20.479 6.541 20.479 C 8.055 20.479 9.517 19.554 10.926 17.703 C 12.125 16.126 13.166 14.022 14.049 11.394 C 15.578 10.635 16.87 9.892 17.928 9.164 C 17.894 9.409 18.319 7.308 18.24 7.628 Z M 7.393 16.095 C 7.056 16.095 6.898 15.947 6.919 15.653 C 6.961 15.106 7.908 14.38 9.759 13.476 C 8.791 15.221 8.002 16.095 7.393 16.095 Z"}));
|
4 |
+
f.each(yith_gutenberg,function(e,a){q("yith/"+e,{title:a.title,description:a.description,category:a.category,attributes:a.attributes,icon:"undefined"!=typeof a.icon?a.icon:B,keywords:a.keywords,edit:function(d){var g=[];f.each(a.attributes,function(a,c){var b=null,e=c.blocktype;if("undefined"!=typeof e){switch(e){case "select":b=t;break;case "text":b=z;break;case "textarea":b=A;break;case "toggle":b=u;break;case "checkbox":b=v;break;case "number":case "range":b=w;break;case "color":case "colorpicker":b=
|
5 |
+
x;break;case "radio":b=y}if(null!=b){var f=helpMessageUncheked="";"undefined"!=typeof c.helps&&"undefined"!=typeof c.helps.checked&&"undefined"!=typeof c.helps.unchecked?(f=c.helps.checked,helpMessageUncheked=c.helps.unchecked):"undefined"!=typeof c.help&&(f=helpMessageUncheked=c.help);g.push(h(b,{value:d.attributes[a],options:c.options,label:c.label,checked:d.attributes[a],selected:d.attributes[a],help:d.attributes[a]?f:helpMessageUncheked,disableAlpha:c.disableAlpha,min:c.min,max:c.max,multiple:c.multiple,
|
6 |
+
onChange:function(b,c){c=void 0===c?a:c;d=m(b,c,d,e)},onChangeComplete:function(c,b){b=void 0===b?a:b;d=m(c,b,d,e)}}))}}});sc=k(d,a,"edit");return[h(p,null,h(r,null,g),sc)]},save:function(d){return k(d,a,"save")}})})})(jQuery);
|
plugin-fw/assets/js/yith-promo.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
(function(c){c(document).on("click",".notice-dismiss",function(){var a=c(this).parent("div.yith-notice-is-dismissible"),b=a.attr("id");"undefined"!=typeof b&&(b="hide_"+b,a=a.data("expiry"),a=new Date(a),a.setUTCHours(23),a.setUTCMinutes(59),a.setUTCSeconds(59),document.cookie=b+"=yes;expires="+a.toUTCString()+";path=/")})})(jQuery);
|
1 |
+
(function(c){c(document).on("click",".notice-dismiss",function(){var a=c(this).parent("div.yith-notice-is-dismissible"),b=a.attr("id");"undefined"!=typeof b&&(b="hide_"+b,a=a.data("expiry"),a=new Date(a),a.setUTCHours(23),a.setUTCMinutes(59),a.setUTCSeconds(59),document.cookie=b+"=yes;expires="+a.toUTCString()+";path=/")})})(jQuery);
|
plugin-fw/assets/js/yith-system-info.min.js
CHANGED
@@ -1,13 +1 @@
|
|
1 |
-
(function
|
2 |
-
$(document).on('click', '.notice-dismiss', function () {
|
3 |
-
var t = $(this),
|
4 |
-
wrapper_id = t.parent().attr('id');
|
5 |
-
|
6 |
-
if (wrapper_id === 'yith-system-alert') {
|
7 |
-
var cname = 'hide_yith_system_alert',
|
8 |
-
cvalue = 'yes';
|
9 |
-
|
10 |
-
document.cookie = cname + "=" + cvalue + ";path=/";
|
11 |
-
}
|
12 |
-
});
|
13 |
-
})(jQuery);
|
1 |
+
(function(a){a(document).on("click",".notice-dismiss",function(){"yith-system-alert"===a(this).parent().attr("id")&&(document.cookie="hide_yith_system_alert=yes;path=/")})})(jQuery);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
plugin-fw/assets/js/yith-update-plugins.min.js
CHANGED
@@ -1,2 +1,2 @@
|
|
1 |
(function(b){b(document).on("click","a.yith-update-link",function(e){var a=b(this),c=a.parent("p");e.preventDefault();b.ajax({type:"POST",url:yith_plugin_fw.ajaxurl,data:{action:"update-plugin",plugin:a.data("plugin"),slug:a.data("slug"),name:a.data("name"),_ajax_nonce:yith_plugin_fw.ajax_nonce},beforeSend:function(){c.text(yith_plugin_fw.l10n.updating.replace("%s",a.data("name")));c.addClass("yith-updating")},success:function(b){c.removeClass("yith-updating").addClass("yith-updated");var d=c.parent("div");
|
2 |
-
|
1 |
(function(b){b(document).on("click","a.yith-update-link",function(e){var a=b(this),c=a.parent("p");e.preventDefault();b.ajax({type:"POST",url:yith_plugin_fw.ajaxurl,data:{action:"update-plugin",plugin:a.data("plugin"),slug:a.data("slug"),name:a.data("name"),_ajax_nonce:yith_plugin_fw.ajax_nonce},beforeSend:function(){c.text(yith_plugin_fw.l10n.updating.replace("%s",a.data("name")));c.addClass("yith-updating")},success:function(b){c.removeClass("yith-updating").addClass("yith-updated");var d=c.parent("div");
|
2 |
+
d.removeClass("notice-warning");result_text="";!0===b.success?(d.addClass("notice-success updated-message").removeClass("update-message"),result_text=yith_plugin_fw.l10n.updated):(d.addClass("notice-error"),result_text=yith_plugin_fw.l10n.failed);c.text(result_text.replace("%s",a.data("name")))}})})})(jQuery);
|
plugin-fw/init.php
CHANGED
@@ -1,13 +1,13 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
* Framework Name: YIT Plugin Framework
|
4 |
-
* Version: 3.3
|
5 |
* Author: YITHEMES
|
6 |
* Text Domain: yith-plugin-fw
|
7 |
* Domain Path: /languages/
|
8 |
*
|
9 |
* @author Your Inspiration Themes
|
10 |
-
* @version 3.
|
11 |
*/
|
12 |
/**
|
13 |
* This file belongs to the YIT Plugin Framework.
|
@@ -55,12 +55,6 @@ if ( ! function_exists ( 'yit_maybe_plugin_fw_loader' ) ) {
|
|
55 |
$plugin_fw_data = array ( $framework_data[ 'Version' ] => $plugin_fw_main_file );
|
56 |
}
|
57 |
|
58 |
-
if ( ! defined( 'YITH_PLUGIN_FW_VERSION' ) ) {
|
59 |
-
$keys = array_keys( $plugin_fw_data );
|
60 |
-
$version = empty( $plugin_fw_data ) ? '1.0.0' : array_pop( $keys );
|
61 |
-
define( 'YITH_PLUGIN_FW_VERSION', $version );
|
62 |
-
}
|
63 |
-
|
64 |
//Check for license & upgrade classes
|
65 |
$upgrade_fw_init_file = $plugin_path . 'plugin-upgrade/init.php';
|
66 |
$framework_data = file_exists( $upgrade_fw_init_file ) ? get_file_data( $upgrade_fw_init_file, $default_headers ) : $framework_data;
|
1 |
<?php
|
2 |
/**
|
3 |
* Framework Name: YIT Plugin Framework
|
4 |
+
* Version: 3.4.3
|
5 |
* Author: YITHEMES
|
6 |
* Text Domain: yith-plugin-fw
|
7 |
* Domain Path: /languages/
|
8 |
*
|
9 |
* @author Your Inspiration Themes
|
10 |
+
* @version 3.4.0
|
11 |
*/
|
12 |
/**
|
13 |
* This file belongs to the YIT Plugin Framework.
|
55 |
$plugin_fw_data = array ( $framework_data[ 'Version' ] => $plugin_fw_main_file );
|
56 |
}
|
57 |
|
|
|
|
|
|
|
|
|
|
|
|
|
58 |
//Check for license & upgrade classes
|
59 |
$upgrade_fw_init_file = $plugin_path . 'plugin-upgrade/init.php';
|
60 |
$framework_data = file_exists( $upgrade_fw_init_file ) ? get_file_data( $upgrade_fw_init_file, $default_headers ) : $framework_data;
|
plugin-fw/lib/promo/yith-promo.php
CHANGED
@@ -18,10 +18,25 @@ add_action( 'admin_enqueue_scripts', 'yith_plugin_fw_notice_dismiss', 20 );
|
|
18 |
|
19 |
if( ! function_exists( 'yith_plugin_fw_promo_notices' ) ){
|
20 |
function yith_plugin_fw_promo_notices(){
|
21 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
22 |
return false;
|
23 |
}
|
24 |
|
|
|
|
|
|
|
|
|
25 |
$base_url = apply_filters( 'yith_plugin_fw_promo_base_url', YIT_CORE_PLUGIN_URL . '/lib/promo/' );
|
26 |
$xml = apply_filters( 'yith_plugin_fw_promo_xml_url', YIT_CORE_PLUGIN_PATH . '/lib/promo/yith-promo.xml' );
|
27 |
$transient = "yith_promo_message";
|
@@ -196,9 +211,10 @@ if( ! function_exists( 'yith_plugin_fw_get_promo_transient_expiry_date' ) ){
|
|
196 |
|
197 |
if( ! function_exists( 'yith_plugin_fw_regenerate_transient' ) ){
|
198 |
function yith_plugin_fw_regenerate_transient(){
|
199 |
-
if( false === get_option( '
|
|
|
200 |
delete_site_transient( 'yith_promo_message' );
|
201 |
-
update_option( '
|
202 |
}
|
203 |
}
|
204 |
}
|
18 |
|
19 |
if( ! function_exists( 'yith_plugin_fw_promo_notices' ) ){
|
20 |
function yith_plugin_fw_promo_notices(){
|
21 |
+
global $pagenow;
|
22 |
+
$not_administrator = function_exists( 'current_user_can' ) && ! current_user_can( 'administrator' );
|
23 |
+
$is_dashboard = 'index.php' == $pagenow;
|
24 |
+
$is_wc_pages = '';
|
25 |
+
$is_plugin_page = 'plugins.php' == $pagenow || 'plugin-install.php' == $pagenow && 'plugin-editor.php' == $pagenow;
|
26 |
+
$wc_post_types = array( 'shop_order', 'shop_coupon', );
|
27 |
+
$is_wc_post_types = isset( $_GET['post_type'] ) && in_array( $_GET['post_type'], $wc_post_types );
|
28 |
+
$wc_pages = array( 'wc-reports', 'wc-settings', 'wc-status', 'wc-addons' );
|
29 |
+
$is_wc_pages = isset( $_GET['page'] ) && in_array( $_GET['page'], $wc_pages );
|
30 |
+
$is_yith_page = isset( $_GET['page'] ) && false !== strstr( $_GET['page'], 'yith' ) ;
|
31 |
+
|
32 |
+
if( $not_administrator ){
|
33 |
return false;
|
34 |
}
|
35 |
|
36 |
+
if( ! $is_plugin_page && ! $is_wc_pages && ! $is_wc_post_types && ! $is_yith_page ){
|
37 |
+
return false;
|
38 |
+
}
|
39 |
+
|
40 |
$base_url = apply_filters( 'yith_plugin_fw_promo_base_url', YIT_CORE_PLUGIN_URL . '/lib/promo/' );
|
41 |
$xml = apply_filters( 'yith_plugin_fw_promo_xml_url', YIT_CORE_PLUGIN_PATH . '/lib/promo/yith-promo.xml' );
|
42 |
$transient = "yith_promo_message";
|
211 |
|
212 |
if( ! function_exists( 'yith_plugin_fw_regenerate_transient' ) ){
|
213 |
function yith_plugin_fw_regenerate_transient(){
|
214 |
+
if( false === get_option( 'yith_plugin_fw_promo_2019_bis', false ) ){
|
215 |
+
delete_option( 'yith_plugin_fw_promo_2019' );
|
216 |
delete_site_transient( 'yith_promo_message' );
|
217 |
+
update_option( 'yith_plugin_fw_promo_2019_bis', true );
|
218 |
}
|
219 |
}
|
220 |
}
|
plugin-fw/lib/promo/yith-promo.xml
CHANGED
@@ -4,50 +4,11 @@
|
|
4 |
|
5 |
<promotions>
|
6 |
<expiry_date>2019-12-10</expiry_date>
|
7 |
-
<promo>
|
8 |
-
<promo_id>yithhalloween2019</promo_id>
|
9 |
-
<banner>halloween.jpg</banner>
|
10 |
-
<title><![CDATA[<strong>YITH Halloween</strong>]]></title>
|
11 |
-
<description><![CDATA[
|
12 |
-
Don't miss our <strong>30% discount</strong> on all our products! No coupon needed in cart. Valid only on <strong>31st October</strong>.
|
13 |
-
]]></description>
|
14 |
-
<link>
|
15 |
-
<label>Get your deals now!</label>
|
16 |
-
<url><![CDATA[https://yithemes.com]]></url>
|
17 |
-
</link>
|
18 |
-
<style>
|
19 |
-
<image_bg_color>#005c7d</image_bg_color>
|
20 |
-
<border_color>#ea5105</border_color>
|
21 |
-
<background_color>#ffffff</background_color>
|
22 |
-
</style>
|
23 |
-
<start_date>2019-10-30 16:00:00</start_date>
|
24 |
-
<end_date>2019-11-01 08:00:00</end_date>
|
25 |
-
</promo>
|
26 |
-
<promo>
|
27 |
-
<promo_id>yithcybermonday2019</promo_id>
|
28 |
-
<banner>cyber.jpg</banner>
|
29 |
-
<title><![CDATA[<strong>YITH Cyber Monday</strong>]]></title>
|
30 |
-
<description><![CDATA[
|
31 |
-
Don't miss our <strong>30% discount</strong> on all our products! No coupon needed in cart. Valid from <strong>1st December</strong> to <strong>2nd December</strong>.
|
32 |
-
]]></description>
|
33 |
-
<link>
|
34 |
-
<label>Get your deals now!</label>
|
35 |
-
<url><![CDATA[https://yithemes.com]]></url>
|
36 |
-
</link>
|
37 |
-
<style>
|
38 |
-
<image_bg_color>#12fdd4</image_bg_color>
|
39 |
-
<border_color>#181d7b</border_color>
|
40 |
-
<background_color>#ffffff</background_color>
|
41 |
-
</style>
|
42 |
-
<start_date>2019-12-01 00:00:00</start_date>
|
43 |
-
<end_date>2019-12-03 08:00:00</end_date>
|
44 |
-
</promo>
|
45 |
<promo>
|
46 |
<promo_id>yithblackfriday2019</promo_id>
|
47 |
-
<banner>black.jpg</banner>
|
48 |
<title><![CDATA[<strong>YITH Black Friday</strong>]]></title>
|
49 |
<description><![CDATA[
|
50 |
-
Don't miss our <strong>30% discount</strong> on all our products! No coupon needed in cart. Valid from <strong>28th November</strong> to <strong>
|
51 |
]]></description>
|
52 |
<link>
|
53 |
<label>Get your deals now!</label>
|
@@ -59,6 +20,6 @@
|
|
59 |
<background_color>#ffffff</background_color>
|
60 |
</style>
|
61 |
<start_date>2019-11-27 23:59:59</start_date>
|
62 |
-
<end_date>2019-
|
63 |
</promo>
|
64 |
</promotions>
|
4 |
|
5 |
<promotions>
|
6 |
<expiry_date>2019-12-10</expiry_date>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7 |
<promo>
|
8 |
<promo_id>yithblackfriday2019</promo_id>
|
|
|
9 |
<title><![CDATA[<strong>YITH Black Friday</strong>]]></title>
|
10 |
<description><![CDATA[
|
11 |
+
Don't miss our <strong>30% discount</strong> on all our products! No coupon needed in cart. Valid from <strong>28th November</strong> to <strong>2nd December</strong>.
|
12 |
]]></description>
|
13 |
<link>
|
14 |
<label>Get your deals now!</label>
|
20 |
<background_color>#ffffff</background_color>
|
21 |
</style>
|
22 |
<start_date>2019-11-27 23:59:59</start_date>
|
23 |
+
<end_date>2019-12-03 08:00:00</end_date>
|
24 |
</promo>
|
25 |
</promotions>
|
plugin-fw/lib/yit-assets.php
CHANGED
@@ -37,7 +37,7 @@ if ( !class_exists( 'YIT_Assets' ) ) {
|
|
37 |
* @author Leanza Francesco <leanzafrancesco@gmail.com>
|
38 |
*/
|
39 |
private function __construct() {
|
40 |
-
|
41 |
add_action( 'admin_enqueue_scripts', array( $this, 'register_styles_and_scripts' ) );
|
42 |
}
|
43 |
|
@@ -51,15 +51,15 @@ if ( !class_exists( 'YIT_Assets' ) ) {
|
|
51 |
|
52 |
//scripts
|
53 |
wp_register_script( 'yith-colorpicker', YIT_CORE_PLUGIN_URL . '/assets/js/yith-colorpicker.min.js', array( 'jquery', 'wp-color-picker' ), $this->version, true );
|
|
|
54 |
|
55 |
-
|
56 |
-
|
57 |
-
wp_register_script( 'yit-metabox', YIT_CORE_PLUGIN_URL . '/assets/js/metabox' . $suffix . '.js', array( 'jquery', 'wp-color-picker', 'yith-plugin-fw-fields' ), $this->version, true );
|
58 |
wp_register_script( 'yit-plugin-panel', YIT_CORE_PLUGIN_URL . '/assets/js/yit-plugin-panel' . $suffix . '.js', array( 'jquery', 'wp-color-picker', 'jquery-ui-sortable', 'yith-plugin-fw-fields' ), $this->version, true );
|
59 |
-
wp_register_script( 'codemirror', YIT_CORE_PLUGIN_URL . '/assets/js/codemirror/codemirror.js', array( 'jquery' ),
|
60 |
-
wp_register_script( 'codemirror-javascript', YIT_CORE_PLUGIN_URL . '/assets/js/codemirror/javascript.js', array( 'jquery', 'codemirror' ),
|
61 |
wp_register_script( 'colorbox', YIT_CORE_PLUGIN_URL . '/assets/js/jquery.colorbox' . $suffix . '.js', array( 'jquery' ), '1.6.3', true );
|
62 |
wp_register_script( 'yith_how_to', YIT_CORE_PLUGIN_URL . '/assets/js/how-to' . $suffix . '.js', array( 'jquery' ), $this->version, true );
|
|
|
63 |
|
64 |
//styles
|
65 |
$jquery_version = isset( $wp_scripts->registered[ 'jquery-ui-core' ]->ver ) ? $wp_scripts->registered[ 'jquery-ui-core' ]->ver : '1.9.2';
|
@@ -83,7 +83,7 @@ if ( !class_exists( 'YIT_Assets' ) ) {
|
|
83 |
wp_register_style( 'yith-select2-no-wc', YIT_CORE_PLUGIN_URL . '/assets/css/yith-select2-no-wc.css', false, $this->version );
|
84 |
}
|
85 |
|
86 |
-
wp_register_script( 'yith-enhanced-select', YIT_CORE_PLUGIN_URL . '/assets/js/yith-enhanced-select' . $wc_version_suffix . $suffix . '.js', array( 'jquery', 'select2' ),
|
87 |
wp_localize_script( 'yith-enhanced-select', 'yith_framework_enhanced_select_params', array(
|
88 |
'ajax_url' => admin_url( 'admin-ajax.php' ),
|
89 |
'search_posts_nonce' => wp_create_nonce( 'search-posts' ),
|
37 |
* @author Leanza Francesco <leanzafrancesco@gmail.com>
|
38 |
*/
|
39 |
private function __construct() {
|
40 |
+
$this->version = yith_plugin_fw_get_version();
|
41 |
add_action( 'admin_enqueue_scripts', array( $this, 'register_styles_and_scripts' ) );
|
42 |
}
|
43 |
|
51 |
|
52 |
//scripts
|
53 |
wp_register_script( 'yith-colorpicker', YIT_CORE_PLUGIN_URL . '/assets/js/yith-colorpicker.min.js', array( 'jquery', 'wp-color-picker' ), $this->version, true );
|
54 |
+
wp_register_script( 'yith-plugin-fw-fields', YIT_CORE_PLUGIN_URL . '/assets/js/yith-fields' . $suffix . '.js', array( 'jquery', 'jquery-ui-datepicker', 'yith-colorpicker', 'codemirror', 'codemirror-javascript', 'jquery-ui-slider', 'jquery-ui-sortable' ), $this->version, true );
|
55 |
|
56 |
+
wp_register_script( 'yit-metabox', YIT_CORE_PLUGIN_URL . '/assets/js/metabox' . $suffix . '.js', array( 'jquery', 'wp-color-picker', 'yith-plugin-fw-fields' ), $this->version, true );
|
|
|
|
|
57 |
wp_register_script( 'yit-plugin-panel', YIT_CORE_PLUGIN_URL . '/assets/js/yit-plugin-panel' . $suffix . '.js', array( 'jquery', 'wp-color-picker', 'jquery-ui-sortable', 'yith-plugin-fw-fields' ), $this->version, true );
|
58 |
+
wp_register_script( 'codemirror', YIT_CORE_PLUGIN_URL . '/assets/js/codemirror/codemirror.js', array( 'jquery' ), '3.15', true );
|
59 |
+
wp_register_script( 'codemirror-javascript', YIT_CORE_PLUGIN_URL . '/assets/js/codemirror/javascript.js', array( 'jquery', 'codemirror' ), '3.15', true );
|
60 |
wp_register_script( 'colorbox', YIT_CORE_PLUGIN_URL . '/assets/js/jquery.colorbox' . $suffix . '.js', array( 'jquery' ), '1.6.3', true );
|
61 |
wp_register_script( 'yith_how_to', YIT_CORE_PLUGIN_URL . '/assets/js/how-to' . $suffix . '.js', array( 'jquery' ), $this->version, true );
|
62 |
+
wp_register_script( 'yith-plugin-fw-wp-pages', YIT_CORE_PLUGIN_URL . '/assets/js/wp-pages' . $suffix . '.js', array( 'jquery' ), $this->version, false );
|
63 |
|
64 |
//styles
|
65 |
$jquery_version = isset( $wp_scripts->registered[ 'jquery-ui-core' ]->ver ) ? $wp_scripts->registered[ 'jquery-ui-core' ]->ver : '1.9.2';
|
83 |
wp_register_style( 'yith-select2-no-wc', YIT_CORE_PLUGIN_URL . '/assets/css/yith-select2-no-wc.css', false, $this->version );
|
84 |
}
|
85 |
|
86 |
+
wp_register_script( 'yith-enhanced-select', YIT_CORE_PLUGIN_URL . '/assets/js/yith-enhanced-select' . $wc_version_suffix . $suffix . '.js', array( 'jquery', 'select2' ), $this->version, true );
|
87 |
wp_localize_script( 'yith-enhanced-select', 'yith_framework_enhanced_select_params', array(
|
88 |
'ajax_url' => admin_url( 'admin-ajax.php' ),
|
89 |
'search_posts_nonce' => wp_create_nonce( 'search-posts' ),
|
plugin-fw/lib/yit-metabox.php
CHANGED
@@ -1,7 +1,6 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
* This file belongs to the YIT Framework.
|
4 |
-
*
|
5 |
* This source file is subject to the GNU GENERAL PUBLIC LICENSE (GPL 3.0)
|
6 |
* that is bundled with this package in the file LICENSE.txt.
|
7 |
* It is also available through the world-wide-web at this URL:
|
@@ -16,7 +15,6 @@ if ( !defined( 'ABSPATH' ) ) {
|
|
16 |
if ( !class_exists( 'YIT_Metabox' ) ) {
|
17 |
/**
|
18 |
* YIT Metabox
|
19 |
-
*
|
20 |
* the metabox can be created using this code
|
21 |
* <code>
|
22 |
* $args1 = array(
|
@@ -37,22 +35,19 @@ if ( !class_exists( 'YIT_Metabox' ) ) {
|
|
37 |
* ),
|
38 |
* ),
|
39 |
* );
|
40 |
-
*
|
41 |
* $metabox1 = YIT_Metabox( 'yit-metabox-id' );
|
42 |
* $metabox1->init( $args );
|
43 |
* </code>
|
44 |
*
|
45 |
-
* @class
|
46 |
* @package YITH
|
47 |
* @since 1.0.0
|
48 |
* @author Emanuela Castorina <emanuela.castorina@yithemes.com>
|
49 |
-
*
|
50 |
*/
|
51 |
class YIT_Metabox {
|
52 |
|
53 |
/**
|
54 |
* @var string the id of metabox
|
55 |
-
*
|
56 |
* @since 1.0
|
57 |
*/
|
58 |
|
@@ -60,14 +55,12 @@ if ( !class_exists( 'YIT_Metabox' ) ) {
|
|
60 |
|
61 |
/**
|
62 |
* @var array An array where are saved all metabox settings options
|
63 |
-
*
|
64 |
* @since 1.0
|
65 |
*/
|
66 |
private $options = array();
|
67 |
|
68 |
/**
|
69 |
* @var array An array where are saved all tabs of metabox
|
70 |
-
*
|
71 |
* @since 1.0
|
72 |
*/
|
73 |
private $tabs = array();
|
@@ -82,11 +75,8 @@ if ( !class_exists( 'YIT_Metabox' ) ) {
|
|
82 |
* Main Instance
|
83 |
*
|
84 |
* @static
|
85 |
-
*
|
86 |
* @param $id
|
87 |
-
*
|
88 |
* @return object Main instance
|
89 |
-
*
|
90 |
* @since 1.0
|
91 |
* @author Antonino Scarfi' <antonino.scarfi@yithemes.com>
|
92 |
*/
|
@@ -102,7 +92,6 @@ if ( !class_exists( 'YIT_Metabox' ) ) {
|
|
102 |
* Constructor
|
103 |
*
|
104 |
* @param string $id
|
105 |
-
*
|
106 |
* @return \YIT_Metabox
|
107 |
* @since 1.0
|
108 |
* @author Emanuela Castorina <emanuela.castorina@yithemes.it>
|
@@ -115,11 +104,9 @@ if ( !class_exists( 'YIT_Metabox' ) ) {
|
|
115 |
|
116 |
/**
|
117 |
* Init
|
118 |
-
*
|
119 |
* set options and tabs, add actions to register metabox, scripts and save data
|
120 |
*
|
121 |
* @param array $options
|
122 |
-
*
|
123 |
* @return void
|
124 |
* @since 1.0
|
125 |
* @author Emanuela Castorina <emanuela.castorina@yithemes.it>
|
@@ -130,20 +117,18 @@ if ( !class_exists( 'YIT_Metabox' ) ) {
|
|
130 |
$this->set_tabs();
|
131 |
|
132 |
add_action( 'add_meta_boxes', array( $this, 'register_metabox' ), 99 );
|
133 |
-
add_action( 'save_post', array( $this, 'save_postdata' ) );
|
134 |
add_action( 'admin_enqueue_scripts', array( $this, 'enqueue' ), 15 );
|
135 |
|
136 |
add_filter( 'yit_icons_screen_ids', array( $this, 'add_screen_ids_for_icons' ) );
|
137 |
|
138 |
-
|
139 |
-
add_filter( 'admin_body_class', array( $this, 'add_body_class' ), 10, 1 );
|
140 |
}
|
141 |
|
142 |
/**
|
143 |
* Add Screen ids to include icons
|
144 |
*
|
145 |
* @param $screen_ids
|
146 |
-
*
|
147 |
* @return array
|
148 |
*/
|
149 |
public function add_screen_ids_for_icons( $screen_ids ) {
|
@@ -152,7 +137,6 @@ if ( !class_exists( 'YIT_Metabox' ) ) {
|
|
152 |
|
153 |
/**
|
154 |
* Enqueue script and styles in admin side
|
155 |
-
*
|
156 |
* Add style and scripts to administrator
|
157 |
*
|
158 |
* @return void
|
@@ -183,11 +167,9 @@ if ( !class_exists( 'YIT_Metabox' ) ) {
|
|
183 |
|
184 |
/**
|
185 |
* Set Options
|
186 |
-
*
|
187 |
* Set the variable options
|
188 |
*
|
189 |
* @param array $options
|
190 |
-
*
|
191 |
* @return void
|
192 |
* @since 1.0
|
193 |
* @author Emanuela Castorina <emanuela.castorina@yithemes.it>
|
@@ -199,12 +181,10 @@ if ( !class_exists( 'YIT_Metabox' ) ) {
|
|
199 |
|
200 |
/**
|
201 |
* Set Tabs
|
202 |
-
*
|
203 |
* Set the variable tabs
|
204 |
*
|
205 |
-
* @internal param array $tabs
|
206 |
-
*
|
207 |
* @return void
|
|
|
208 |
* @since 1.0
|
209 |
* @author Emanuela Castorina <emanuela.castorina@yithemes.it>
|
210 |
*/
|
@@ -221,16 +201,13 @@ if ( !class_exists( 'YIT_Metabox' ) ) {
|
|
221 |
|
222 |
/**
|
223 |
* Add Tab
|
224 |
-
*
|
225 |
* Add a tab inside the metabox
|
226 |
*
|
227 |
-
* @
|
228 |
-
*
|
229 |
-
* @param array $tab the new tab to add to the metabox
|
230 |
* @param string $where tell where insert the tab if after or before a $refer
|
231 |
* @param null $refer an existent tab inside metabox
|
232 |
-
*
|
233 |
* @return void
|
|
|
234 |
* @since 1.0
|
235 |
* @author Emanuela Castorina <emanuela.castorina@yithemes.it>
|
236 |
*/
|
@@ -256,14 +233,11 @@ if ( !class_exists( 'YIT_Metabox' ) ) {
|
|
256 |
|
257 |
/**
|
258 |
* Remove Tab
|
259 |
-
*
|
260 |
* Remove a tab from the tabs of metabox
|
261 |
*
|
262 |
-
* @internal param array $tabs
|
263 |
-
*
|
264 |
* @param $id_tab
|
265 |
-
*
|
266 |
* @return void
|
|
|
267 |
* @since 1.0
|
268 |
* @author Emanuela Castorina <emanuela.castorina@yithemes.it>
|
269 |
*/
|
@@ -276,17 +250,14 @@ if ( !class_exists( 'YIT_Metabox' ) ) {
|
|
276 |
|
277 |
/**
|
278 |
* Add Field
|
279 |
-
*
|
280 |
* Add a field inside a tab of metabox
|
281 |
*
|
282 |
-
* @internal param array $tabs
|
283 |
-
*
|
284 |
* @param string $tab_id the id of the tabs where add the field
|
285 |
-
* @param array $args
|
286 |
-
* @param string $where
|
287 |
-
* @param null $refer
|
288 |
-
*
|
289 |
* @return void
|
|
|
290 |
* @since 1.0
|
291 |
* @author Emanuela Castorina <emanuela.castorina@yithemes.it>
|
292 |
*/
|
@@ -325,11 +296,9 @@ if ( !class_exists( 'YIT_Metabox' ) ) {
|
|
325 |
|
326 |
/**
|
327 |
* Remove Field
|
328 |
-
*
|
329 |
* Remove a field from the metabox, search inside the tabs and remove it if exists
|
330 |
*
|
331 |
* @param $id_field
|
332 |
-
*
|
333 |
* @return void
|
334 |
* @since 1.0
|
335 |
* @author Emanuela Castorina <emanuela.castorina@yithemes.it>
|
@@ -344,14 +313,12 @@ if ( !class_exists( 'YIT_Metabox' ) ) {
|
|
344 |
|
345 |
/**
|
346 |
* Reorder tabs
|
347 |
-
*
|
348 |
* Order the tabs and fields and set id and name to each field
|
349 |
*
|
350 |
-
* @internal param $id_field
|
351 |
-
*
|
352 |
* @return void
|
353 |
-
* @
|
354 |
-
* @
|
|
|
355 |
*/
|
356 |
public function reorder_tabs() {
|
357 |
foreach ( $this->tabs as $tab_name => $tab ) {
|
@@ -369,12 +336,10 @@ if ( !class_exists( 'YIT_Metabox' ) ) {
|
|
369 |
|
370 |
/**
|
371 |
* Get Option Metabox ID
|
372 |
-
*
|
373 |
* return the id of the field
|
374 |
*
|
375 |
* @param string $id_field
|
376 |
* @param bool $private if private add an _befor the id
|
377 |
-
*
|
378 |
* @return string
|
379 |
* @since 1.0
|
380 |
* @author Emanuela Castorina <emanuela.castorina@yithemes.it>
|
@@ -389,12 +354,10 @@ if ( !class_exists( 'YIT_Metabox' ) ) {
|
|
389 |
|
390 |
/**
|
391 |
* Get Option Metabox Name
|
392 |
-
*
|
393 |
* return the name of the field, this name will be used as attribute name of the input field
|
394 |
*
|
395 |
* @param string $id_field
|
396 |
* @param bool $private if private add an _befor the id
|
397 |
-
*
|
398 |
* @return string
|
399 |
* @since 1.0
|
400 |
* @author Emanuela Castorina <emanuela.castorina@yithemes.it>
|
@@ -415,10 +378,8 @@ if ( !class_exists( 'YIT_Metabox' ) ) {
|
|
415 |
|
416 |
/**
|
417 |
* Register the metabox
|
418 |
-
*
|
419 |
* call the wp function add_metabox to add the metabox
|
420 |
*
|
421 |
-
*
|
422 |
* @return void
|
423 |
* @since 1.0
|
424 |
* @author Emanuela Castorina <emanuela.castorina@yithemes.it>
|
@@ -432,10 +393,8 @@ if ( !class_exists( 'YIT_Metabox' ) ) {
|
|
432 |
|
433 |
/**
|
434 |
* Show metabox
|
435 |
-
*
|
436 |
* show the html of metabox
|
437 |
*
|
438 |
-
*
|
439 |
* @return void
|
440 |
* @since 1.0
|
441 |
* @author Emanuela Castorina <emanuela.castorina@yithemes.it>
|
@@ -443,29 +402,30 @@ if ( !class_exists( 'YIT_Metabox' ) ) {
|
|
443 |
public function show() {
|
444 |
$this->reorder_tabs();
|
445 |
|
446 |
-
|
|
|
|
|
|
|
|
|
|
|
447 |
}
|
448 |
|
449 |
/**
|
450 |
* Save Post Data
|
451 |
-
*
|
452 |
* Save the post data in the database when save the post
|
453 |
*
|
454 |
* @param $post_id
|
455 |
-
*
|
456 |
* @return int
|
457 |
* @since 1.0
|
458 |
* @author Emanuela Castorina <emanuela.castorina@yithemes.it>
|
459 |
*/
|
460 |
public function save_postdata( $post_id ) {
|
461 |
-
|
462 |
-
|
463 |
if ( !isset( $_POST[ 'yit_metaboxes_nonce' ] ) || !wp_verify_nonce( $_POST[ 'yit_metaboxes_nonce' ], 'metaboxes-fields-nonce' ) ) {
|
464 |
return $post_id;
|
465 |
}
|
466 |
|
467 |
-
|
468 |
-
if ( ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) || ( defined( 'DOING_AJAX' ) && DOING_AJAX ) ) {
|
469 |
return $post_id;
|
470 |
}
|
471 |
|
@@ -475,7 +435,7 @@ if ( !class_exists( 'YIT_Metabox' ) ) {
|
|
475 |
return $post_id;
|
476 |
}
|
477 |
|
478 |
-
if ( 'page'
|
479 |
if ( !current_user_can( 'edit_page', $post_id ) ) {
|
480 |
return $post_id;
|
481 |
}
|
@@ -485,9 +445,9 @@ if ( !class_exists( 'YIT_Metabox' ) ) {
|
|
485 |
}
|
486 |
}
|
487 |
|
488 |
-
|
489 |
return $post_id;
|
490 |
-
}
|
491 |
|
492 |
if ( isset( $_POST[ 'yit_metaboxes' ] ) ) {
|
493 |
$yit_metabox_data = $_POST[ 'yit_metaboxes' ];
|
@@ -506,77 +466,92 @@ if ( !class_exists( 'YIT_Metabox' ) ) {
|
|
506 |
|
507 |
}
|
508 |
|
509 |
-
|
510 |
-
|
511 |
-
|
512 |
-
|
513 |
-
|
514 |
-
|
515 |
-
|
516 |
-
|
517 |
-
|
518 |
-
|
519 |
-
|
520 |
-
|
521 |
-
|
522 |
-
|
523 |
-
|
524 |
-
|
525 |
-
|
526 |
-
|
527 |
-
|
528 |
-
|
529 |
-
|
530 |
-
|
531 |
-
|
532 |
-
|
533 |
-
|
534 |
-
|
535 |
-
|
536 |
-
|
537 |
-
|
538 |
-
|
539 |
-
|
540 |
-
|
541 |
-
|
542 |
-
|
543 |
-
|
544 |
-
|
545 |
-
|
546 |
-
|
547 |
-
|
548 |
-
|
549 |
-
|
550 |
-
|
551 |
-
|
552 |
-
|
553 |
-
|
554 |
-
|
555 |
-
|
556 |
-
|
557 |
-
|
558 |
-
|
559 |
-
|
560 |
-
|
561 |
-
|
562 |
-
|
563 |
-
|
564 |
-
|
565 |
-
|
566 |
-
|
567 |
-
|
568 |
-
|
569 |
-
|
570 |
-
|
571 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
572 |
|
573 |
/**
|
574 |
* Remove Fields
|
575 |
-
*
|
576 |
* Remove a fields list from the metabox, search inside the tabs and remove it if exists
|
577 |
*
|
578 |
* @param $id_fields
|
579 |
-
*
|
580 |
* @return void
|
581 |
* @since 2.0.0
|
582 |
* @author Andrea Grillo <andrea.grillo@yithemes.com>
|
@@ -587,64 +562,33 @@ if ( !class_exists( 'YIT_Metabox' ) ) {
|
|
587 |
}
|
588 |
}
|
589 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
590 |
|
591 |
-
|
592 |
-
|
593 |
-
|
594 |
-
|
595 |
-
|
596 |
-
|
597 |
-
|
598 |
-
|
599 |
-
|
600 |
-
|
601 |
-
public function add_body_class( $classes ) {
|
602 |
-
global $post;
|
603 |
-
|
604 |
-
$exclude_post_types = apply_filters( 'yith_plugin_fw_exclude_post_types_to_additional_classes', array( 'product' ) );
|
605 |
-
|
606 |
-
if ( $post && in_array( $post->post_type, $exclude_post_types ) ) {
|
607 |
-
return $classes;
|
608 |
-
}
|
609 |
-
|
610 |
-
$new_class = apply_filters( 'yith_plugin_fw_metabox_class', '', $post );
|
611 |
-
|
612 |
-
if ( empty( $new_class ) ) {
|
613 |
-
return $classes;
|
614 |
-
}
|
615 |
-
|
616 |
-
$classes = yith_plugin_fw_remove_duplicate_classes( $classes. ' '. $new_class);
|
617 |
-
|
618 |
-
return $classes;
|
619 |
-
}
|
620 |
-
|
621 |
-
/**
|
622 |
-
* Save the element toggle via Ajax.
|
623 |
-
*
|
624 |
-
* @return void
|
625 |
-
* @since 3.2.1
|
626 |
-
* @author Emanuela Castorina
|
627 |
-
*/
|
628 |
-
public function save_toggle_element() {
|
629 |
-
if ( ! isset( $_REQUEST['post_ID'] ) ) {
|
630 |
-
return;
|
631 |
-
}
|
632 |
-
|
633 |
-
if ( !isset( $_REQUEST[ 'yit_metaboxes_nonce' ] ) || !wp_verify_nonce( $_REQUEST[ 'yit_metaboxes_nonce' ], 'metaboxes-fields-nonce' ) ) {
|
634 |
-
return;
|
635 |
-
}
|
636 |
-
$post_id = $_REQUEST['post_ID'];
|
637 |
-
|
638 |
-
if ( isset( $_REQUEST['yit_metaboxes'] ) ) {
|
639 |
-
$yit_metabox_data = $_REQUEST['yit_metaboxes'];
|
640 |
-
|
641 |
-
if ( is_array( $yit_metabox_data ) ) {
|
642 |
-
$this->sanitize_fields( $post_id );
|
643 |
-
}
|
644 |
-
} elseif ( ! isset( $_REQUEST['yit_metaboxes'] ) || ! isset( $_REQUEST['yit_metaboxes'][ $_REQUEST['toggle_id'] ] ) ) {
|
645 |
-
delete_post_meta( $post_id, $_REQUEST['toggle_id'] );
|
646 |
-
}
|
647 |
-
}
|
648 |
}
|
649 |
}
|
650 |
|
@@ -654,7 +598,6 @@ if ( !function_exists( 'YIT_Metabox' ) ) {
|
|
654 |
* Main instance of plugin
|
655 |
*
|
656 |
* @param $id
|
657 |
-
*
|
658 |
* @return \YIT_Metabox
|
659 |
* @since 1.0
|
660 |
* @author Emanuela Castorina <emanuela.castorina@yithemes.it>
|
1 |
<?php
|
2 |
/**
|
3 |
* This file belongs to the YIT Framework.
|
|
|
4 |
* This source file is subject to the GNU GENERAL PUBLIC LICENSE (GPL 3.0)
|
5 |
* that is bundled with this package in the file LICENSE.txt.
|
6 |
* It is also available through the world-wide-web at this URL:
|
15 |
if ( !class_exists( 'YIT_Metabox' ) ) {
|
16 |
/**
|
17 |
* YIT Metabox
|
|
|
18 |
* the metabox can be created using this code
|
19 |
* <code>
|
20 |
* $args1 = array(
|
35 |
* ),
|
36 |
* ),
|
37 |
* );
|
|
|
38 |
* $metabox1 = YIT_Metabox( 'yit-metabox-id' );
|
39 |
* $metabox1->init( $args );
|
40 |
* </code>
|
41 |
*
|
42 |
+
* @class YIT_Metaboxes
|
43 |
* @package YITH
|
44 |
* @since 1.0.0
|
45 |
* @author Emanuela Castorina <emanuela.castorina@yithemes.com>
|
|
|
46 |
*/
|
47 |
class YIT_Metabox {
|
48 |
|
49 |
/**
|
50 |
* @var string the id of metabox
|
|
|
51 |
* @since 1.0
|
52 |
*/
|
53 |
|
55 |
|
56 |
/**
|
57 |
* @var array An array where are saved all metabox settings options
|
|
|
58 |
* @since 1.0
|
59 |
*/
|
60 |
private $options = array();
|
61 |
|
62 |
/**
|
63 |
* @var array An array where are saved all tabs of metabox
|
|
|
64 |
* @since 1.0
|
65 |
*/
|
66 |
private $tabs = array();
|
75 |
* Main Instance
|
76 |
*
|
77 |
* @static
|
|
|
78 |
* @param $id
|
|
|
79 |
* @return object Main instance
|
|
|
80 |
* @since 1.0
|
81 |
* @author Antonino Scarfi' <antonino.scarfi@yithemes.com>
|
82 |
*/
|
92 |
* Constructor
|
93 |
*
|
94 |
* @param string $id
|
|
|
95 |
* @return \YIT_Metabox
|
96 |
* @since 1.0
|
97 |
* @author Emanuela Castorina <emanuela.castorina@yithemes.it>
|
104 |
|
105 |
/**
|
106 |
* Init
|
|
|
107 |
* set options and tabs, add actions to register metabox, scripts and save data
|
108 |
*
|
109 |
* @param array $options
|
|
|
110 |
* @return void
|
111 |
* @since 1.0
|
112 |
* @author Emanuela Castorina <emanuela.castorina@yithemes.it>
|
117 |
$this->set_tabs();
|
118 |
|
119 |
add_action( 'add_meta_boxes', array( $this, 'register_metabox' ), 99 );
|
120 |
+
add_action( 'save_post', array( $this, 'save_postdata' ), 10, 1 );
|
121 |
add_action( 'admin_enqueue_scripts', array( $this, 'enqueue' ), 15 );
|
122 |
|
123 |
add_filter( 'yit_icons_screen_ids', array( $this, 'add_screen_ids_for_icons' ) );
|
124 |
|
125 |
+
add_action( 'wp_ajax_yith_plugin_fw_save_toggle_element_metabox', array( $this, 'save_toggle_element' ) );
|
|
|
126 |
}
|
127 |
|
128 |
/**
|
129 |
* Add Screen ids to include icons
|
130 |
*
|
131 |
* @param $screen_ids
|
|
|
132 |
* @return array
|
133 |
*/
|
134 |
public function add_screen_ids_for_icons( $screen_ids ) {
|
137 |
|
138 |
/**
|
139 |
* Enqueue script and styles in admin side
|
|
|
140 |
* Add style and scripts to administrator
|
141 |
*
|
142 |
* @return void
|
167 |
|
168 |
/**
|
169 |
* Set Options
|
|
|
170 |
* Set the variable options
|
171 |
*
|
172 |
* @param array $options
|
|
|
173 |
* @return void
|
174 |
* @since 1.0
|
175 |
* @author Emanuela Castorina <emanuela.castorina@yithemes.it>
|
181 |
|
182 |
/**
|
183 |
* Set Tabs
|
|
|
184 |
* Set the variable tabs
|
185 |
*
|
|
|
|
|
186 |
* @return void
|
187 |
+
* @internal param array $tabs
|
188 |
* @since 1.0
|
189 |
* @author Emanuela Castorina <emanuela.castorina@yithemes.it>
|
190 |
*/
|
201 |
|
202 |
/**
|
203 |
* Add Tab
|
|
|
204 |
* Add a tab inside the metabox
|
205 |
*
|
206 |
+
* @param array $tab the new tab to add to the metabox
|
|
|
|
|
207 |
* @param string $where tell where insert the tab if after or before a $refer
|
208 |
* @param null $refer an existent tab inside metabox
|
|
|
209 |
* @return void
|
210 |
+
* @internal param array $tabs
|
211 |
* @since 1.0
|
212 |
* @author Emanuela Castorina <emanuela.castorina@yithemes.it>
|
213 |
*/
|
233 |
|
234 |
/**
|
235 |
* Remove Tab
|
|
|
236 |
* Remove a tab from the tabs of metabox
|
237 |
*
|
|
|
|
|
238 |
* @param $id_tab
|
|
|
239 |
* @return void
|
240 |
+
* @internal param array $tabs
|
241 |
* @since 1.0
|
242 |
* @author Emanuela Castorina <emanuela.castorina@yithemes.it>
|
243 |
*/
|
250 |
|
251 |
/**
|
252 |
* Add Field
|
|
|
253 |
* Add a field inside a tab of metabox
|
254 |
*
|
|
|
|
|
255 |
* @param string $tab_id the id of the tabs where add the field
|
256 |
+
* @param array $args the field to add
|
257 |
+
* @param string $where tell where insert the field if after or before a $refer
|
258 |
+
* @param null $refer an existent field inside tab
|
|
|
259 |
* @return void
|
260 |
+
* @internal param array $tabs
|
261 |
* @since 1.0
|
262 |
* @author Emanuela Castorina <emanuela.castorina@yithemes.it>
|
263 |
*/
|
296 |
|
297 |
/**
|
298 |
* Remove Field
|
|
|
299 |
* Remove a field from the metabox, search inside the tabs and remove it if exists
|
300 |
*
|
301 |
* @param $id_field
|
|
|
302 |
* @return void
|
303 |
* @since 1.0
|
304 |
* @author Emanuela Castorina <emanuela.castorina@yithemes.it>
|
313 |
|
314 |
/**
|
315 |
* Reorder tabs
|
|
|
316 |
* Order the tabs and fields and set id and name to each field
|
317 |
*
|
|
|
|
|
318 |
* @return void
|
319 |
+
* @internal param $id_field
|
320 |
+
* @since 1.0
|
321 |
+
* @author Emanuela Castorina <emanuela.castorina@yithemes.it>
|
322 |
*/
|
323 |
public function reorder_tabs() {
|
324 |
foreach ( $this->tabs as $tab_name => $tab ) {
|
336 |
|
337 |
/**
|
338 |
* Get Option Metabox ID
|
|
|
339 |
* return the id of the field
|
340 |
*
|
341 |
* @param string $id_field
|
342 |
* @param bool $private if private add an _befor the id
|
|
|
343 |
* @return string
|
344 |
* @since 1.0
|
345 |
* @author Emanuela Castorina <emanuela.castorina@yithemes.it>
|
354 |
|
355 |
/**
|
356 |
* Get Option Metabox Name
|
|
|
357 |
* return the name of the field, this name will be used as attribute name of the input field
|
358 |
*
|
359 |
* @param string $id_field
|
360 |
* @param bool $private if private add an _befor the id
|
|
|
361 |
* @return string
|
362 |
* @since 1.0
|
363 |
* @author Emanuela Castorina <emanuela.castorina@yithemes.it>
|
378 |
|
379 |
/**
|
380 |
* Register the metabox
|
|
|
381 |
* call the wp function add_metabox to add the metabox
|
382 |
*
|
|
|
383 |
* @return void
|
384 |
* @since 1.0
|
385 |
* @author Emanuela Castorina <emanuela.castorina@yithemes.it>
|
393 |
|
394 |
/**
|
395 |
* Show metabox
|
|
|
396 |
* show the html of metabox
|
397 |
*
|
|
|
398 |
* @return void
|
399 |
* @since 1.0
|
400 |
* @author Emanuela Castorina <emanuela.castorina@yithemes.it>
|
402 |
public function show() {
|
403 |
$this->reorder_tabs();
|
404 |
|
405 |
+
$args = array(
|
406 |
+
'tabs' => $this->tabs,
|
407 |
+
'class' => isset( $this->options[ 'class' ] ) ? $this->options[ 'class' ] : '',
|
408 |
+
);
|
409 |
+
|
410 |
+
yit_plugin_get_template( YIT_CORE_PLUGIN_PATH, 'metaboxes/tab.php', $args );
|
411 |
}
|
412 |
|
413 |
/**
|
414 |
* Save Post Data
|
|
|
415 |
* Save the post data in the database when save the post
|
416 |
*
|
417 |
* @param $post_id
|
|
|
418 |
* @return int
|
419 |
* @since 1.0
|
420 |
* @author Emanuela Castorina <emanuela.castorina@yithemes.it>
|
421 |
*/
|
422 |
public function save_postdata( $post_id ) {
|
|
|
|
|
423 |
if ( !isset( $_POST[ 'yit_metaboxes_nonce' ] ) || !wp_verify_nonce( $_POST[ 'yit_metaboxes_nonce' ], 'metaboxes-fields-nonce' ) ) {
|
424 |
return $post_id;
|
425 |
}
|
426 |
|
427 |
+
$allow_ajax = isset( $_REQUEST[ 'yith_metabox_allow_ajax_saving' ] ) && $this->id === $_REQUEST[ 'yith_metabox_allow_ajax_saving' ];
|
428 |
+
if ( ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) || ( defined( 'DOING_AJAX' ) && DOING_AJAX && !$allow_ajax ) ) {
|
429 |
return $post_id;
|
430 |
}
|
431 |
|
435 |
return $post_id;
|
436 |
}
|
437 |
|
438 |
+
if ( 'page' === $post_type ) {
|
439 |
if ( !current_user_can( 'edit_page', $post_id ) ) {
|
440 |
return $post_id;
|
441 |
}
|
445 |
}
|
446 |
}
|
447 |
|
448 |
+
if ( !in_array( $post_type, (array) $this->options[ 'pages' ] ) ) {
|
449 |
return $post_id;
|
450 |
+
}
|
451 |
|
452 |
if ( isset( $_POST[ 'yit_metaboxes' ] ) ) {
|
453 |
$yit_metabox_data = $_POST[ 'yit_metaboxes' ];
|
466 |
|
467 |
}
|
468 |
|
469 |
+
/**
|
470 |
+
* Sanitize the fields of metabox.
|
471 |
+
*
|
472 |
+
* @return void
|
473 |
+
* @since 3.2.1
|
474 |
+
* @author Emanuela Castorina
|
475 |
+
*/
|
476 |
+
public function sanitize_fields( $post_id ) {
|
477 |
+
$this->reorder_tabs();
|
478 |
+
$tabs_to_sanitize = $this->tabs;
|
479 |
+
$allow_ajax = isset( $_REQUEST[ 'yith_metabox_allow_ajax_saving' ] ) && $this->id === $_REQUEST[ 'yith_metabox_allow_ajax_saving' ];
|
480 |
+
$ajax_partial_saving_tab = isset( $_REQUEST[ 'yith_metabox_allow_ajax_partial_saving_tab' ] ) ? $_REQUEST[ 'yith_metabox_allow_ajax_partial_saving_tab' ] : false;
|
481 |
+
|
482 |
+
if ( defined( 'DOING_AJAX' ) && DOING_AJAX && !$allow_ajax ) {
|
483 |
+
return;
|
484 |
+
} elseif ( $ajax_partial_saving_tab ) {
|
485 |
+
if ( array_key_exists( $ajax_partial_saving_tab, $tabs_to_sanitize ) ) {
|
486 |
+
$tabs_to_sanitize = array( $ajax_partial_saving_tab => $tabs_to_sanitize[ $ajax_partial_saving_tab ] );
|
487 |
+
} else {
|
488 |
+
return;
|
489 |
+
}
|
490 |
+
}
|
491 |
+
|
492 |
+
|
493 |
+
|
494 |
+
|
495 |
+
foreach ( $tabs_to_sanitize as $tab ) {
|
496 |
+
|
497 |
+
foreach ( $tab[ 'fields' ] as $field ) {
|
498 |
+
|
499 |
+
if ( in_array( $field[ 'type' ], array( 'title' ) ) ) {
|
500 |
+
continue;
|
501 |
+
}
|
502 |
+
|
503 |
+
if ( isset( $_POST[ 'yit_metaboxes' ][ $field[ 'id' ] ] ) ) {
|
504 |
+
if ( in_array( $field[ 'type' ], array( 'onoff', 'checkbox' ) ) ) {
|
505 |
+
update_post_meta( $post_id, $field[ 'id' ], '1' );
|
506 |
+
} elseif ( in_array( $field[ 'type' ], array( 'toggle-element' ) ) ) {
|
507 |
+
if ( isset( $field[ 'elements' ] ) && $field[ 'elements' ] ) {
|
508 |
+
$elements_value = $_POST[ 'yit_metaboxes' ][ $field[ 'id' ] ];
|
509 |
+
if ( $elements_value ) {
|
510 |
+
if ( isset( $elements_value[ 'box_id' ] ) ) {
|
511 |
+
unset( $elements_value[ 'box_id' ] );
|
512 |
+
}
|
513 |
+
|
514 |
+
foreach ( $field[ 'elements' ] as $element ) {
|
515 |
+
foreach ( $elements_value as $key => $element_value ) {
|
516 |
+
if ( isset( $field[ 'onoff_field' ] ) ) {
|
517 |
+
$elements_value[ $key ][ $field[ 'onoff_field' ][ 'id' ] ] = !isset( $element_value[ $field[ 'onoff_field' ][ 'id' ] ] ) ? 0 : $element_value[ $field[ 'onoff_field' ][ 'id' ] ];
|
518 |
+
}
|
519 |
+
if ( in_array( $element[ 'type' ], array( 'onoff', 'checkbox' ) ) ) {
|
520 |
+
$elements_value[ $key ][ $element[ 'id' ] ] = !isset( $element_value[ $element[ 'id' ] ] ) ? 0 : 1;
|
521 |
+
}
|
522 |
+
|
523 |
+
if ( !empty( $element[ 'yith-sanitize-callback' ] ) && is_callable( $element[ 'yith-sanitize-callback' ] ) ) {
|
524 |
+
$elements_value[ $key ][ $element[ 'id' ] ] = call_user_func( $element[ 'yith-sanitize-callback' ], $elements_value[ $key ][ $element[ 'id' ] ] );
|
525 |
+
}
|
526 |
+
}
|
527 |
+
}
|
528 |
+
}
|
529 |
+
|
530 |
+
update_post_meta( $post_id, $field[ 'id' ], maybe_serialize( $elements_value ) );
|
531 |
+
}
|
532 |
+
} else {
|
533 |
+
$value = $_POST[ 'yit_metaboxes' ][ $field[ 'id' ] ];
|
534 |
+
if ( !empty( $field[ 'yith-sanitize-callback' ] ) && is_callable( $field[ 'yith-sanitize-callback' ] ) ) {
|
535 |
+
$value = call_user_func( $field[ 'yith-sanitize-callback' ], $value );
|
536 |
+
}
|
537 |
+
add_post_meta( $post_id, $field[ 'id' ], $value, true ) || update_post_meta( $post_id, $field[ 'id' ], $value );
|
538 |
+
}
|
539 |
+
} elseif ( in_array( $field[ 'type' ], array( 'onoff', 'checkbox' ) ) ) {
|
540 |
+
update_post_meta( $post_id, $field[ 'id' ], '0' );
|
541 |
+
} elseif ( in_array( $field[ 'type' ], array( 'checkbox-array' ) ) ) {
|
542 |
+
update_post_meta( $post_id, $field[ 'id' ], array() );
|
543 |
+
} else {
|
544 |
+
delete_post_meta( $post_id, $field[ 'id' ] );
|
545 |
+
}
|
546 |
+
}
|
547 |
+
}
|
548 |
+
}
|
549 |
|
550 |
/**
|
551 |
* Remove Fields
|
|
|
552 |
* Remove a fields list from the metabox, search inside the tabs and remove it if exists
|
553 |
*
|
554 |
* @param $id_fields
|
|
|
555 |
* @return void
|
556 |
* @since 2.0.0
|
557 |
* @author Andrea Grillo <andrea.grillo@yithemes.com>
|
562 |
}
|
563 |
}
|
564 |
|
565 |
+
/**
|
566 |
+
* Save the element toggle via Ajax.
|
567 |
+
*
|
568 |
+
* @return void
|
569 |
+
* @since 3.2.1
|
570 |
+
* @author Emanuela Castorina
|
571 |
+
*/
|
572 |
+
public function save_toggle_element() {
|
573 |
+
if ( !isset( $_REQUEST[ 'post_ID' ] ) ) {
|
574 |
+
return;
|
575 |
+
}
|
576 |
+
|
577 |
+
if ( !isset( $_REQUEST[ 'yit_metaboxes_nonce' ] ) || !wp_verify_nonce( $_REQUEST[ 'yit_metaboxes_nonce' ], 'metaboxes-fields-nonce' ) ) {
|
578 |
+
return;
|
579 |
+
}
|
580 |
+
$post_id = $_REQUEST[ 'post_ID' ];
|
581 |
|
582 |
+
if ( isset( $_REQUEST[ 'yit_metaboxes' ] ) ) {
|
583 |
+
$yit_metabox_data = $_REQUEST[ 'yit_metaboxes' ];
|
584 |
+
|
585 |
+
if ( is_array( $yit_metabox_data ) ) {
|
586 |
+
$this->sanitize_fields( $post_id );
|
587 |
+
}
|
588 |
+
} elseif ( !isset( $_REQUEST[ 'yit_metaboxes' ] ) || !isset( $_REQUEST[ 'yit_metaboxes' ][ $_REQUEST[ 'toggle_id' ] ] ) ) {
|
589 |
+
delete_post_meta( $post_id, $_REQUEST[ 'toggle_id' ] );
|
590 |
+
}
|
591 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
592 |
}
|
593 |
}
|
594 |
|
598 |
* Main instance of plugin
|
599 |
*
|
600 |
* @param $id
|
|
|
601 |
* @return \YIT_Metabox
|
602 |
* @since 1.0
|
603 |
* @author Emanuela Castorina <emanuela.castorina@yithemes.it>
|
plugin-fw/lib/yit-plugin-panel-wc.php
CHANGED
@@ -95,6 +95,7 @@ if ( !class_exists( 'YIT_Plugin_Panel_WooCommerce' ) ) {
|
|
95 |
add_action( 'yith_plugin_fw_before_woocommerce_panel', array( $this, 'add_plugin_banner' ), 10, 1 );
|
96 |
add_action( 'admin_action_yith_plugin_fw_save_toggle_element', array( $this, 'save_toggle_element_options' ) );
|
97 |
|
|
|
98 |
|
99 |
// init actions once to prevent multiple actions
|
100 |
static::_init_actions();
|
@@ -135,12 +136,14 @@ if ( !class_exists( 'YIT_Plugin_Panel_WooCommerce' ) ) {
|
|
135 |
* @author Antonio La Rocca <antonio.larocca@yithemes.com>
|
136 |
*/
|
137 |
public function yit_panel() {
|
|
|
138 |
$additional_info = array(
|
139 |
-
'current_tab'
|
140 |
-
'
|
141 |
-
'
|
142 |
-
'
|
143 |
-
'
|
|
|
144 |
);
|
145 |
|
146 |
|
@@ -158,7 +161,6 @@ if ( !class_exists( 'YIT_Plugin_Panel_WooCommerce' ) ) {
|
|
158 |
* @since 1.0
|
159 |
* @author Emanuela Castorina <emanuela.castorina@yithemes.com>
|
160 |
*/
|
161 |
-
|
162 |
public function yit_upload_update( $option_value ) {
|
163 |
return $option_value;
|
164 |
}
|
@@ -170,7 +172,6 @@ if ( !class_exists( 'YIT_Plugin_Panel_WooCommerce' ) ) {
|
|
170 |
* @since 1.0
|
171 |
* @author Emanuela Castorina <emanuela.castorina@yithemes.com>
|
172 |
*/
|
173 |
-
|
174 |
public function yit_upload( $args = array() ) {
|
175 |
if ( !empty( $args ) ) {
|
176 |
$args[ 'value' ] = ( get_option( $args[ 'id' ] ) ) ? get_option( $args[ 'id' ] ) : $args[ 'default' ];
|
@@ -246,16 +247,14 @@ if ( !class_exists( 'YIT_Plugin_Panel_WooCommerce' ) ) {
|
|
246 |
* @author Antonio La Rocca <antonio.larocca@yithemes.com>
|
247 |
*/
|
248 |
public function add_fields() {
|
249 |
-
|
250 |
-
|
251 |
$yit_options = $this->get_main_array_options();
|
252 |
-
$
|
253 |
|
254 |
-
if ( !$
|
255 |
return;
|
256 |
}
|
257 |
|
258 |
-
woocommerce_admin_fields( $yit_options[ $
|
259 |
}
|
260 |
|
261 |
/**
|
@@ -270,8 +269,11 @@ if ( !class_exists( 'YIT_Plugin_Panel_WooCommerce' ) ) {
|
|
270 |
*/
|
271 |
public function print_panel_content() {
|
272 |
$yit_options = $this->get_main_array_options();
|
273 |
-
$
|
274 |
-
$
|
|
|
|
|
|
|
275 |
|
276 |
if ( $custom_tab_action ) {
|
277 |
$this->print_custom_tab( $custom_tab_action );
|
@@ -299,11 +301,11 @@ if ( !class_exists( 'YIT_Plugin_Panel_WooCommerce' ) ) {
|
|
299 |
do_action( 'yit_panel_wc_before_update' );
|
300 |
|
301 |
$yit_options = $this->get_main_array_options();
|
302 |
-
$
|
303 |
|
304 |
if ( version_compare( WC()->version, '2.4.0', '>=' ) ) {
|
305 |
-
if ( !empty( $yit_options[ $
|
306 |
-
foreach ( $yit_options[ $
|
307 |
if ( isset( $option[ 'id' ] ) && isset( $_POST[ $option[ 'id' ] ] ) && isset( $option[ 'type' ] ) && !in_array( $option[ 'type' ], self::$wc_type ) ) {
|
308 |
$_POST[ $option[ 'id' ] ] = maybe_serialize( $_POST[ $option[ 'id' ] ] );
|
309 |
}
|
@@ -318,14 +320,14 @@ if ( !class_exists( 'YIT_Plugin_Panel_WooCommerce' ) ) {
|
|
318 |
$is_hidden_input = ( ( $temp = strlen( $name ) - strlen( $attachment_id_needle ) ) >= 0 && strpos( $name, $attachment_id_needle, $temp ) !== false );
|
319 |
if ( $is_hidden_input ) {
|
320 |
// Is an input element of type "hidden" coupled with an input element for selecting an element from the media gallery
|
321 |
-
$yit_options[ $
|
322 |
"type" => "text",
|
323 |
"id" => $name
|
324 |
);
|
325 |
}
|
326 |
}
|
327 |
|
328 |
-
woocommerce_update_options( $yit_options[ $
|
329 |
|
330 |
do_action( 'yit_panel_wc_after_update' );
|
331 |
|
@@ -336,10 +338,16 @@ if ( !class_exists( 'YIT_Plugin_Panel_WooCommerce' ) ) {
|
|
336 |
do_action( 'yit_panel_wc_before_reset' );
|
337 |
|
338 |
$yit_options = $this->get_main_array_options();
|
339 |
-
$
|
340 |
-
|
341 |
-
|
342 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
343 |
update_option( $option[ 'id' ], $option[ 'default' ] );
|
344 |
}
|
345 |
}
|
@@ -452,12 +460,12 @@ if ( !class_exists( 'YIT_Plugin_Panel_WooCommerce' ) ) {
|
|
452 |
}
|
453 |
|
454 |
/**
|
455 |
-
* Add the
|
456 |
*
|
|
|
|
|
457 |
* @author Andrea Grillo <andrea.grillo@yithemes.com>
|
458 |
* @since 2.0
|
459 |
-
* @param $classes The body classes
|
460 |
-
* @return array Filtered body classes
|
461 |
*/
|
462 |
public static function admin_body_class( $admin_body_classes ) {
|
463 |
global $pagenow;
|
@@ -479,17 +487,15 @@ if ( !class_exists( 'YIT_Plugin_Panel_WooCommerce' ) ) {
|
|
479 |
* @since 2.0
|
480 |
*/
|
481 |
public function maybe_unserialize_panel_data( $value, $option, $raw_value ) {
|
482 |
-
|
483 |
-
|
484 |
if ( !version_compare( WC()->version, '2.4.0', '>=' ) || !isset( $option[ 'type' ] ) || in_array( $option[ 'type' ], self::$wc_type ) ) {
|
485 |
return $value;
|
486 |
}
|
487 |
|
488 |
$yit_options = $this->get_main_array_options();
|
489 |
-
$
|
490 |
|
491 |
-
if ( !empty( $yit_options[ $
|
492 |
-
foreach ( $yit_options[ $
|
493 |
if ( isset( $option_array[ 'id' ] ) && isset( $option[ 'id' ] ) && $option_array[ 'id' ] == $option[ 'id' ] ) {
|
494 |
return maybe_unserialize( $value );
|
495 |
}
|
@@ -522,6 +528,11 @@ if ( !class_exists( 'YIT_Plugin_Panel_WooCommerce' ) ) {
|
|
522 |
$value = yith_plugin_fw_is_true( $raw_value ) ? 'yes' : 'no';
|
523 |
}
|
524 |
|
|
|
|
|
|
|
|
|
|
|
525 |
if ( isset( $option[ 'yith-type' ] ) && in_array( $option[ 'yith-type' ], array( 'textarea', 'textarea-editor', 'textarea-codemirror' ) ) ) {
|
526 |
$value = $raw_value;
|
527 |
}
|
@@ -654,5 +665,16 @@ if ( !class_exists( 'YIT_Plugin_Panel_WooCommerce' ) ) {
|
|
654 |
|
655 |
return $updated;
|
656 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
657 |
}
|
658 |
}
|
95 |
add_action( 'yith_plugin_fw_before_woocommerce_panel', array( $this, 'add_plugin_banner' ), 10, 1 );
|
96 |
add_action( 'admin_action_yith_plugin_fw_save_toggle_element', array( $this, 'save_toggle_element_options' ) );
|
97 |
|
98 |
+
add_action( 'admin_enqueue_scripts', array( $this, 'init_wp_with_tabs' ), 11 );
|
99 |
|
100 |
// init actions once to prevent multiple actions
|
101 |
static::_init_actions();
|
136 |
* @author Antonio La Rocca <antonio.larocca@yithemes.com>
|
137 |
*/
|
138 |
public function yit_panel() {
|
139 |
+
$this->maybe_redirect_to_proper_wp_page();
|
140 |
$additional_info = array(
|
141 |
+
'current_tab' => $this->get_current_tab(),
|
142 |
+
'current_sub_tab' => $this->get_current_sub_tab(),
|
143 |
+
'available_tabs' => $this->settings[ 'admin-tabs' ],
|
144 |
+
'default_tab' => $this->get_available_tabs( true ), //get default tabs
|
145 |
+
'page' => $this->settings[ 'page' ],
|
146 |
+
'wrap_class' => isset( $this->settings[ 'class' ] ) ? $this->settings[ 'class' ] : '',
|
147 |
);
|
148 |
|
149 |
|
161 |
* @since 1.0
|
162 |
* @author Emanuela Castorina <emanuela.castorina@yithemes.com>
|
163 |
*/
|
|
|
164 |
public function yit_upload_update( $option_value ) {
|
165 |
return $option_value;
|
166 |
}
|
172 |
* @since 1.0
|
173 |
* @author Emanuela Castorina <emanuela.castorina@yithemes.com>
|
174 |
*/
|
|
|
175 |
public function yit_upload( $args = array() ) {
|
176 |
if ( !empty( $args ) ) {
|
177 |
$args[ 'value' ] = ( get_option( $args[ 'id' ] ) ) ? get_option( $args[ 'id' ] ) : $args[ 'default' ];
|
247 |
* @author Antonio La Rocca <antonio.larocca@yithemes.com>
|
248 |
*/
|
249 |
public function add_fields() {
|
|
|
|
|
250 |
$yit_options = $this->get_main_array_options();
|
251 |
+
$option_key = $this->get_current_option_key();
|
252 |
|
253 |
+
if ( !$option_key ) {
|
254 |
return;
|
255 |
}
|
256 |
|
257 |
+
woocommerce_admin_fields( $yit_options[ $option_key ] );
|
258 |
}
|
259 |
|
260 |
/**
|
269 |
*/
|
270 |
public function print_panel_content() {
|
271 |
$yit_options = $this->get_main_array_options();
|
272 |
+
$page = $this->settings[ 'page' ];
|
273 |
+
$option_key = $this->get_current_option_key();
|
274 |
+
$custom_tab_action = $this->is_custom_tab( $yit_options, $option_key );
|
275 |
+
|
276 |
+
$this->print_tabs_nav();
|
277 |
|
278 |
if ( $custom_tab_action ) {
|
279 |
$this->print_custom_tab( $custom_tab_action );
|
301 |
do_action( 'yit_panel_wc_before_update' );
|
302 |
|
303 |
$yit_options = $this->get_main_array_options();
|
304 |
+
$option_key = $this->get_current_option_key();
|
305 |
|
306 |
if ( version_compare( WC()->version, '2.4.0', '>=' ) ) {
|
307 |
+
if ( !empty( $yit_options[ $option_key ] ) ) {
|
308 |
+
foreach ( $yit_options[ $option_key ] as $option ) {
|
309 |
if ( isset( $option[ 'id' ] ) && isset( $_POST[ $option[ 'id' ] ] ) && isset( $option[ 'type' ] ) && !in_array( $option[ 'type' ], self::$wc_type ) ) {
|
310 |
$_POST[ $option[ 'id' ] ] = maybe_serialize( $_POST[ $option[ 'id' ] ] );
|
311 |
}
|
320 |
$is_hidden_input = ( ( $temp = strlen( $name ) - strlen( $attachment_id_needle ) ) >= 0 && strpos( $name, $attachment_id_needle, $temp ) !== false );
|
321 |
if ( $is_hidden_input ) {
|
322 |
// Is an input element of type "hidden" coupled with an input element for selecting an element from the media gallery
|
323 |
+
$yit_options[ $option_key ][ $name ] = array(
|
324 |
"type" => "text",
|
325 |
"id" => $name
|
326 |
);
|
327 |
}
|
328 |
}
|
329 |
|
330 |
+
woocommerce_update_options( $yit_options[ $option_key ] );
|
331 |
|
332 |
do_action( 'yit_panel_wc_after_update' );
|
333 |
|
338 |
do_action( 'yit_panel_wc_before_reset' );
|
339 |
|
340 |
$yit_options = $this->get_main_array_options();
|
341 |
+
$option_key = $this->get_current_option_key();
|
342 |
+
foreach ( $yit_options[ $option_key ] as $id => $option ) {
|
343 |
+
if( isset( $option['yith-type'] ) && $option['yith-type'] == 'multi-colorpicker' && ! empty( $option['colorpickers'] ) ) {
|
344 |
+
$default = [];
|
345 |
+
foreach( $option['colorpickers'] as $colorpicker ) {
|
346 |
+
$default[ $colorpicker['id'] ] = isset( $colorpicker['default'] ) ? $colorpicker['default'] : '';
|
347 |
+
}
|
348 |
+
update_option( $option[ 'id' ], $default );
|
349 |
+
}
|
350 |
+
elseif ( isset( $option[ 'default' ] ) ) {
|
351 |
update_option( $option[ 'id' ], $option[ 'default' ] );
|
352 |
}
|
353 |
}
|
460 |
}
|
461 |
|
462 |
/**
|
463 |
+
* Add the WooCommerce body class in plugin panel page
|
464 |
*
|
465 |
+
* @param array $admin_body_classes The body classes
|
466 |
+
* @return array Filtered body classes
|
467 |
* @author Andrea Grillo <andrea.grillo@yithemes.com>
|
468 |
* @since 2.0
|
|
|
|
|
469 |
*/
|
470 |
public static function admin_body_class( $admin_body_classes ) {
|
471 |
global $pagenow;
|
487 |
* @since 2.0
|
488 |
*/
|
489 |
public function maybe_unserialize_panel_data( $value, $option, $raw_value ) {
|
|
|
|
|
490 |
if ( !version_compare( WC()->version, '2.4.0', '>=' ) || !isset( $option[ 'type' ] ) || in_array( $option[ 'type' ], self::$wc_type ) ) {
|
491 |
return $value;
|
492 |
}
|
493 |
|
494 |
$yit_options = $this->get_main_array_options();
|
495 |
+
$option_key = $this->get_current_option_key();
|
496 |
|
497 |
+
if ( !empty( $yit_options[ $option_key ] ) ) {
|
498 |
+
foreach ( $yit_options[ $option_key ] as $option_array ) {
|
499 |
if ( isset( $option_array[ 'id' ] ) && isset( $option[ 'id' ] ) && $option_array[ 'id' ] == $option[ 'id' ] ) {
|
500 |
return maybe_unserialize( $value );
|
501 |
}
|
528 |
$value = yith_plugin_fw_is_true( $raw_value ) ? 'yes' : 'no';
|
529 |
}
|
530 |
|
531 |
+
if ( isset( $option[ 'yith-type' ] ) && 'checkbox-array' === $option[ 'yith-type' ] ) {
|
532 |
+
$value = maybe_unserialize( $raw_value );
|
533 |
+
$value = !!$value && is_array( $value ) ? $value : array();
|
534 |
+
}
|
535 |
+
|
536 |
if ( isset( $option[ 'yith-type' ] ) && in_array( $option[ 'yith-type' ], array( 'textarea', 'textarea-editor', 'textarea-codemirror' ) ) ) {
|
537 |
$value = $raw_value;
|
538 |
}
|
665 |
|
666 |
return $updated;
|
667 |
}
|
668 |
+
|
669 |
+
public function print_tabs_nav( $args = array() ) {
|
670 |
+
$defaults = array(
|
671 |
+
'premium_class' => 'yith-premium',
|
672 |
+
'parent_page' => '',
|
673 |
+
'wrapper_class' => 'nav-tab-wrapper woo-nav-tab-wrapper'
|
674 |
+
);
|
675 |
+
$args = wp_parse_args( $args, $defaults );
|
676 |
+
|
677 |
+
parent::print_tabs_nav( $args );
|
678 |
+
}
|
679 |
}
|
680 |
}
|
plugin-fw/lib/yit-plugin-panel.php
CHANGED
@@ -1,7 +1,6 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
* This file belongs to the YIT Plugin Framework.
|
4 |
-
*
|
5 |
* This source file is subject to the GNU GENERAL PUBLIC LICENSE (GPL 3.0)
|
6 |
* that is bundled with this package in the file LICENSE.txt.
|
7 |
* It is also available through the world-wide-web at this URL:
|
@@ -15,7 +14,6 @@ if ( !defined( 'ABSPATH' ) ) {
|
|
15 |
if ( !class_exists( 'YIT_Plugin_Panel' ) ) {
|
16 |
/**
|
17 |
* YIT Plugin Panel
|
18 |
-
*
|
19 |
* Setting Page to Manage Plugins
|
20 |
*
|
21 |
* @class YIT_Plugin_Panel
|
@@ -43,7 +41,17 @@ if ( !class_exists( 'YIT_Plugin_Panel' ) ) {
|
|
43 |
/**
|
44 |
* @var array
|
45 |
*/
|
46 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
47 |
|
48 |
/**
|
49 |
* @var array
|
@@ -58,10 +66,9 @@ if ( !class_exists( 'YIT_Plugin_Panel' ) ) {
|
|
58 |
/**
|
59 |
* Constructor
|
60 |
*
|
61 |
-
* @since 1.0
|
62 |
-
* @author Emanuela Castorina <emanuela.castorina@yithemes.it>
|
63 |
-
*
|
64 |
* @param array $args
|
|
|
|
|
65 |
*/
|
66 |
public function __construct( $args = array() ) {
|
67 |
|
@@ -97,18 +104,62 @@ if ( !class_exists( 'YIT_Plugin_Panel' ) ) {
|
|
97 |
add_action( 'admin_bar_menu', array( $this, 'add_admin_bar_menu' ), 100 );
|
98 |
add_action( 'admin_init', array( $this, 'add_fields' ) );
|
99 |
|
|
|
|
|
100 |
// init actions once to prevent multiple actions
|
101 |
static::_init_actions();
|
102 |
}
|
103 |
|
104 |
add_action( 'admin_enqueue_scripts', array( $this, 'admin_enqueue_scripts' ) );
|
105 |
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
|
110 |
}
|
111 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
112 |
/**
|
113 |
* Init actions once to prevent multiple actions
|
114 |
*
|
@@ -128,15 +179,50 @@ if ( !class_exists( 'YIT_Plugin_Panel' ) ) {
|
|
128 |
}
|
129 |
}
|
130 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
131 |
/**
|
132 |
* Add yith-plugin-fw-panel in body classes in Panel pages
|
133 |
*
|
134 |
* @param $admin_body_classes
|
135 |
-
*
|
136 |
-
* @since 3.0.0
|
137 |
-
* @author Leanza Francesco <leanzafrancesco@gmail.com>
|
138 |
-
*
|
139 |
* @return string
|
|
|
|
|
140 |
*/
|
141 |
public static function add_body_class( $admin_body_classes ) {
|
142 |
global $pagenow;
|
@@ -171,7 +257,6 @@ if ( !class_exists( 'YIT_Plugin_Panel' ) ) {
|
|
171 |
|
172 |
/**
|
173 |
* Remove duplicate submenu
|
174 |
-
*
|
175 |
* Submenu page hack: Remove the duplicate YIT Plugin link on subpages
|
176 |
*
|
177 |
* @return void
|
@@ -185,7 +270,6 @@ if ( !class_exists( 'YIT_Plugin_Panel' ) ) {
|
|
185 |
|
186 |
/**
|
187 |
* Enqueue script and styles in admin side
|
188 |
-
*
|
189 |
* Add style and scripts to administrator
|
190 |
*
|
191 |
* @return void
|
@@ -226,7 +310,6 @@ if ( !class_exists( 'YIT_Plugin_Panel' ) ) {
|
|
226 |
|
227 |
/**
|
228 |
* Register Settings
|
229 |
-
*
|
230 |
* Generate wp-admin settings pages by registering your settings and using a few callbacks to control the output
|
231 |
*
|
232 |
* @return void
|
@@ -239,18 +322,16 @@ if ( !class_exists( 'YIT_Plugin_Panel' ) ) {
|
|
239 |
|
240 |
/**
|
241 |
* Options Validate
|
242 |
-
*
|
243 |
* a callback function called by Register Settings function
|
244 |
*
|
245 |
* @param $input
|
246 |
-
*
|
247 |
* @return array validate input fields
|
248 |
* @since 1.0
|
249 |
* @author Emanuela Castorina <emanuela.castorina@yithemes.it>
|
250 |
*/
|
251 |
public function options_validate( $input ) {
|
252 |
|
253 |
-
$
|
254 |
|
255 |
$yit_options = $this->get_main_array_options();
|
256 |
|
@@ -260,7 +341,7 @@ if ( !class_exists( 'YIT_Plugin_Panel' ) ) {
|
|
260 |
$submit = ( !empty( $input[ 'submit-general' ] ) ? true : false );
|
261 |
$reset = ( !empty( $input[ 'reset-general' ] ) ? true : false );
|
262 |
|
263 |
-
foreach ( $yit_options[ $
|
264 |
foreach ( $data as $option ) {
|
265 |
if ( isset( $option[ 'sanitize_call' ] ) && isset( $option[ 'id' ] ) ) { //yiw_debug($option, false);
|
266 |
if ( is_array( $option[ 'sanitize_call' ] ) ) :
|
@@ -301,7 +382,6 @@ if ( !class_exists( 'YIT_Plugin_Panel' ) ) {
|
|
301 |
|
302 |
/**
|
303 |
* Add Setting SubPage
|
304 |
-
*
|
305 |
* add Setting SubPage to wordpress administrator
|
306 |
*
|
307 |
* @return array validate input fields
|
@@ -350,75 +430,168 @@ if ( !class_exists( 'YIT_Plugin_Panel' ) ) {
|
|
350 |
}
|
351 |
|
352 |
/**
|
353 |
-
*
|
354 |
*
|
355 |
-
*
|
356 |
-
*
|
357 |
-
* @
|
358 |
-
* @since 1.0
|
359 |
-
* @author Emanuela Castorina <emanuela.castorina@yithemes.it>
|
360 |
*/
|
361 |
-
public function
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
362 |
|
363 |
-
$tabs = '';
|
364 |
-
$current_tab = $this->get_current_tab();
|
365 |
-
$yit_options = $this->get_main_array_options();
|
366 |
-
$premium_class = isset( $this->settings['class'] ) ? 'yith-premium' : 'premium';
|
367 |
-
$wrap_class = isset( $this->settings['class'] ) ? $this->settings['class'] : '';
|
368 |
-
?>
|
369 |
-
<div class="wrap <?php echo $wrap_class?>">
|
370 |
-
<?php
|
371 |
-
do_action('yith_plugin_fw_before_yith_panel', $this->settings[ 'page' ] );
|
372 |
-
// tabs
|
373 |
foreach ( $this->settings[ 'admin-tabs' ] as $tab => $tab_value ) {
|
374 |
-
$active_class
|
375 |
-
$active_class
|
376 |
-
$
|
|
|
|
|
|
|
|
|
|
|
377 |
}
|
378 |
?>
|
379 |
-
<
|
380 |
-
<h2 class="nav-tab-wrapper">
|
381 |
<?php echo $tabs ?>
|
382 |
</h2>
|
383 |
<?php
|
384 |
-
$
|
385 |
-
|
386 |
-
$this->print_custom_tab( $custom_tab_action );
|
387 |
|
388 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
389 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
390 |
?>
|
391 |
-
<?php
|
392 |
-
|
393 |
-
|
394 |
-
|
395 |
-
|
396 |
-
|
397 |
-
|
398 |
-
|
399 |
-
|
400 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
401 |
<p> </p>
|
402 |
-
|
403 |
-
|
404 |
-
<input type="submit" class="button-primary" value="<?php _e( 'Save Changes', 'yith-plugin-fw' ) ?>" style="float:left;margin-right:10px;"/>
|
405 |
-
</form>
|
406 |
-
<form method="post">
|
407 |
-
<?php $warning = __( 'If you continue with this action, you will reset all options in this page.', 'yith-plugin-fw' ) ?>
|
408 |
-
<input type="hidden" name="yit-action" value="reset"/>
|
409 |
-
<input type="submit" name="yit-reset" class="button-secondary" value="<?php _e( 'Reset to default', 'yith-plugin-fw' ) ?>"
|
410 |
-
onclick="return confirm('<?php echo $warning . '\n' . __( 'Are you sure?', 'yith-plugin-fw' ) ?>');"/>
|
411 |
-
</form>
|
412 |
-
<p> </p>
|
413 |
-
<?php endif ?>
|
414 |
</div>
|
415 |
</div>
|
416 |
-
</div>
|
417 |
<?php
|
418 |
}
|
419 |
|
420 |
-
|
421 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
422 |
if ( isset( $option[ 'type' ] ) && isset( $option[ 'action' ] ) && 'custom_tab' == $option[ 'type' ] && !empty( $option[ 'action' ] ) ) {
|
423 |
return $option[ 'action' ];
|
424 |
} else {
|
@@ -429,12 +602,30 @@ if ( !class_exists( 'YIT_Plugin_Panel' ) ) {
|
|
429 |
return false;
|
430 |
}
|
431 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
432 |
/**
|
433 |
* Fire the action to print the custom tab
|
434 |
*
|
435 |
-
*
|
436 |
* @param string $action Action to fire
|
437 |
-
*
|
438 |
* @return void
|
439 |
* @since 1.0
|
440 |
* @author Andrea Grillo <andrea.grillo@yithemes.com>
|
@@ -446,7 +637,6 @@ if ( !class_exists( 'YIT_Plugin_Panel' ) ) {
|
|
446 |
|
447 |
/**
|
448 |
* Add sections and fields to setting panel
|
449 |
-
*
|
450 |
* read all options and show sections and fields
|
451 |
*
|
452 |
* @return void
|
@@ -455,16 +645,16 @@ if ( !class_exists( 'YIT_Plugin_Panel' ) ) {
|
|
455 |
*/
|
456 |
public function add_fields() {
|
457 |
$yit_options = $this->get_main_array_options();
|
458 |
-
$
|
459 |
|
460 |
-
if ( !$
|
461 |
return;
|
462 |
}
|
463 |
-
foreach ( $yit_options[ $
|
464 |
-
add_settings_section( "yit_settings_{$
|
465 |
foreach ( $data as $option ) {
|
466 |
if ( isset( $option[ 'id' ] ) && isset( $option[ 'type' ] ) && isset( $option[ 'name' ] ) ) {
|
467 |
-
add_settings_field( "yit_setting_" . $option[ 'id' ], $option[ 'name' ], array( $this, 'render_field' ), 'yit', "yit_settings_{$
|
468 |
}
|
469 |
}
|
470 |
}
|
@@ -473,7 +663,6 @@ if ( !class_exists( 'YIT_Plugin_Panel' ) ) {
|
|
473 |
|
474 |
/**
|
475 |
* Add the tabs to admin bar menu
|
476 |
-
*
|
477 |
* set all tabs of settings page on wp admin bar
|
478 |
*
|
479 |
* @return void|array return void when capability is false
|
@@ -488,7 +677,7 @@ if ( !class_exists( 'YIT_Plugin_Panel' ) ) {
|
|
488 |
return;
|
489 |
}
|
490 |
|
491 |
-
if ( !
|
492 |
foreach ( $this->settings[ 'admin-tabs' ] as $item => $title ) {
|
493 |
|
494 |
$wp_admin_bar->add_menu( array(
|
@@ -504,7 +693,6 @@ if ( !class_exists( 'YIT_Plugin_Panel' ) ) {
|
|
504 |
|
505 |
/**
|
506 |
* Get current tab
|
507 |
-
*
|
508 |
* get the id of tab showed, return general is the current tab is not defined
|
509 |
*
|
510 |
* @return string
|
@@ -519,7 +707,7 @@ if ( !class_exists( 'YIT_Plugin_Panel' ) ) {
|
|
519 |
}
|
520 |
if ( isset( $_REQUEST[ 'yit_tab_options' ] ) ) {
|
521 |
return $_REQUEST[ 'yit_tab_options' ];
|
522 |
-
} elseif ( isset( $_GET[ 'tab' ] )
|
523 |
return $_GET[ 'tab' ];
|
524 |
} elseif ( isset( $admin_tabs[ 0 ] ) ) {
|
525 |
return $admin_tabs[ 0 ];
|
@@ -528,10 +716,51 @@ if ( !class_exists( 'YIT_Plugin_Panel' ) ) {
|
|
528 |
}
|
529 |
}
|
530 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
531 |
|
532 |
/**
|
533 |
-
*
|
|
|
|
|
534 |
*
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
535 |
* define an array of message and show the content od message if
|
536 |
* is find in the query string
|
537 |
*
|
@@ -565,14 +794,12 @@ if ( !class_exists( 'YIT_Plugin_Panel' ) ) {
|
|
565 |
|
566 |
/**
|
567 |
* Get Message
|
568 |
-
*
|
569 |
* return html code of message
|
570 |
*
|
571 |
* @param $message
|
572 |
* @param string $type can be 'error' or 'updated'
|
573 |
* @param bool $echo
|
574 |
-
*
|
575 |
-
* @return void|string
|
576 |
* @since 1.0
|
577 |
* @author Emanuela Castorina <emanuela.castorina@yithemes.it>
|
578 |
*/
|
@@ -588,8 +815,7 @@ if ( !class_exists( 'YIT_Plugin_Panel' ) ) {
|
|
588 |
|
589 |
/**
|
590 |
* Get Tab Path Files
|
591 |
-
*
|
592 |
-
* return an array with filenames of tabs
|
593 |
*
|
594 |
* @return array
|
595 |
* @since 1.0
|
@@ -618,7 +844,6 @@ if ( !class_exists( 'YIT_Plugin_Panel' ) ) {
|
|
618 |
|
619 |
/**
|
620 |
* Get main array options
|
621 |
-
*
|
622 |
* return an array with all options defined on options-files
|
623 |
*
|
624 |
* @return array
|
@@ -626,27 +851,66 @@ if ( !class_exists( 'YIT_Plugin_Panel' ) ) {
|
|
626 |
* @author Emanuela Castorina <emanuela.castorina@yithemes.it>
|
627 |
*/
|
628 |
function get_main_array_options() {
|
629 |
-
|
630 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
631 |
}
|
632 |
|
633 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
634 |
|
635 |
-
|
636 |
-
|
637 |
-
|
638 |
-
|
639 |
-
|
|
|
|
|
640 |
}
|
641 |
}
|
642 |
|
643 |
-
|
|
|
|
|
|
|
|
|
644 |
}
|
645 |
|
646 |
|
647 |
/**
|
648 |
* Set an array with all default options
|
649 |
-
*
|
650 |
* put default options in an array
|
651 |
*
|
652 |
* @return array
|
@@ -675,7 +939,6 @@ if ( !class_exists( 'YIT_Plugin_Panel' ) ) {
|
|
675 |
|
676 |
/**
|
677 |
* Get the title of the tab
|
678 |
-
*
|
679 |
* return the title of tab
|
680 |
*
|
681 |
* @return string
|
@@ -693,15 +956,14 @@ if ( !class_exists( 'YIT_Plugin_Panel' ) ) {
|
|
693 |
}
|
694 |
}
|
695 |
}
|
|
|
696 |
}
|
697 |
|
698 |
/**
|
699 |
* Get the title of the section
|
700 |
-
*
|
701 |
* return the title of section
|
702 |
*
|
703 |
* @param $section
|
704 |
-
*
|
705 |
* @return string
|
706 |
* @since 1.0
|
707 |
* @author Emanuela Castorina <emanuela.castorina@yithemes.it>
|
@@ -715,15 +977,14 @@ if ( !class_exists( 'YIT_Plugin_Panel' ) ) {
|
|
715 |
return $option[ 'name' ];
|
716 |
}
|
717 |
}
|
|
|
718 |
}
|
719 |
|
720 |
/**
|
721 |
* Get the description of the section
|
722 |
-
*
|
723 |
* return the description of section if is set
|
724 |
*
|
725 |
* @param $section
|
726 |
-
*
|
727 |
* @return string
|
728 |
* @since 1.0
|
729 |
* @author Emanuela Castorina <emanuela.castorina@yithemes.it>
|
@@ -737,12 +998,12 @@ if ( !class_exists( 'YIT_Plugin_Panel' ) ) {
|
|
737 |
return '<p>' . $option[ 'desc' ] . '</p>';
|
738 |
}
|
739 |
}
|
|
|
740 |
}
|
741 |
|
742 |
|
743 |
/**
|
744 |
* Show form when necessary
|
745 |
-
*
|
746 |
* return true if 'showform' is not defined
|
747 |
*
|
748 |
* @return bool
|
@@ -751,9 +1012,9 @@ if ( !class_exists( 'YIT_Plugin_Panel' ) ) {
|
|
751 |
*/
|
752 |
function is_show_form() {
|
753 |
$yit_options = $this->get_main_array_options();
|
754 |
-
$
|
755 |
|
756 |
-
foreach ( $yit_options[ $
|
757 |
foreach ( $data as $option ) {
|
758 |
if ( !isset( $option[ 'type' ] ) || $option[ 'type' ] != 'title' ) {
|
759 |
continue;
|
@@ -769,11 +1030,9 @@ if ( !class_exists( 'YIT_Plugin_Panel' ) ) {
|
|
769 |
|
770 |
/**
|
771 |
* Get name field
|
772 |
-
*
|
773 |
* return a string with the name of the input field
|
774 |
*
|
775 |
* @param string $name
|
776 |
-
*
|
777 |
* @return string
|
778 |
* @since 1.0
|
779 |
* @author Emanuela Castorina <emanuela.castorina@yithemes.it>
|
@@ -784,11 +1043,9 @@ if ( !class_exists( 'YIT_Plugin_Panel' ) ) {
|
|
784 |
|
785 |
/**
|
786 |
* Get id field
|
787 |
-
*
|
788 |
* return a string with the id of the input field
|
789 |
*
|
790 |
* @param string $id
|
791 |
-
*
|
792 |
* @return string
|
793 |
* @since 1.0
|
794 |
* @author Emanuela Castorina <emanuela.castorina@yithemes.it>
|
@@ -800,12 +1057,10 @@ if ( !class_exists( 'YIT_Plugin_Panel' ) ) {
|
|
800 |
|
801 |
/**
|
802 |
* Render the field showed in the setting page
|
803 |
-
*
|
804 |
* include the file of the option type, if file do not exists
|
805 |
* return a text area
|
806 |
*
|
807 |
* @param array $param
|
808 |
-
*
|
809 |
* @return void
|
810 |
* @since 1.0
|
811 |
* @author Emanuela Castorina <emanuela.castorina@yithemes.it>
|
@@ -845,7 +1100,6 @@ if ( !class_exists( 'YIT_Plugin_Panel' ) ) {
|
|
845 |
|
846 |
/**
|
847 |
* Get options from db
|
848 |
-
*
|
849 |
* return the options from db, if the options aren't defined in the db,
|
850 |
* get the default options ad add the options in the db
|
851 |
*
|
@@ -865,9 +1119,7 @@ if ( !class_exists( 'YIT_Plugin_Panel' ) ) {
|
|
865 |
/**
|
866 |
* Show a box panel with specific content in two columns as a new woocommerce type
|
867 |
*
|
868 |
-
*
|
869 |
* @param array $args
|
870 |
-
*
|
871 |
* @return void
|
872 |
* @since 1.0
|
873 |
* @author Emanuela Castorina <emanuela.castorina@yithemes.com>
|
@@ -882,11 +1134,9 @@ if ( !class_exists( 'YIT_Plugin_Panel' ) ) {
|
|
882 |
/**
|
883 |
* Show a box panel with specific content in two columns as a new woocommerce type
|
884 |
*
|
885 |
-
* @deprecated 3.0.12 Do nothing! Method left to prevent Fatal Error if called directly
|
886 |
-
*
|
887 |
* @param array $args
|
888 |
-
*
|
889 |
* @return void
|
|
|
890 |
*/
|
891 |
public static function add_videobox( $args = array() ) {
|
892 |
|
@@ -895,8 +1145,8 @@ if ( !class_exists( 'YIT_Plugin_Panel' ) ) {
|
|
895 |
/**
|
896 |
* Fire the action to print the custom tab
|
897 |
*
|
898 |
-
* @deprecated 3.0.12 Do nothing! Method left to prevent Fatal Error if called directly
|
899 |
* @return void
|
|
|
900 |
*/
|
901 |
public function print_video_box() {
|
902 |
|
@@ -957,89 +1207,191 @@ if ( !class_exists( 'YIT_Plugin_Panel' ) ) {
|
|
957 |
*
|
958 |
* @author Emanuela Castorina
|
959 |
*/
|
960 |
-
|
961 |
-
|
962 |
-
|
963 |
-
|
964 |
-
|
965 |
-
|
966 |
-
|
967 |
-
|
968 |
-
|
969 |
-
|
970 |
-
|
971 |
-
|
972 |
-
|
973 |
-
|
974 |
-
|
975 |
-
|
976 |
-
|
977 |
-
|
978 |
-
|
979 |
-
|
980 |
-
|
981 |
-
|
982 |
-
|
983 |
-
|
984 |
-
|
985 |
<h1 class="notice-container"></h1>
|
986 |
<div class="yith-plugin-fw-banner yith-plugin-fw-banner-free">
|
987 |
-
<h1><?php echo esc_html( $this->settings['page_title'] ) ?></h1>
|
988 |
-
|
989 |
<div class="yith-banners">
|
990 |
<ul>
|
991 |
-
|
992 |
-
<li><a href="<?php echo esc_url( $banner['link'])?>" target="_blank"><img src="<?php echo esc_url( $banner['image'])?>"></a></li>
|
993 |
-
|
994 |
</ul>
|
995 |
</div>
|
996 |
|
997 |
-
|
998 |
</div>
|
999 |
-
|
1000 |
<h1 class="notice-container"></h1>
|
1001 |
<div class="yith-plugin-fw-banner">
|
1002 |
-
<h1><?php echo esc_html( $this->settings['page_title'] ) ?>
|
1003 |
-
|
1004 |
-
<span><?php echo esc_html( $this->settings['plugin_description'] ) ?></span>
|
1005 |
-
|
1006 |
</h1>
|
1007 |
</div>
|
1008 |
|
1009 |
-
|
1010 |
-
|
1011 |
-
|
1012 |
-
|
1013 |
-
|
1014 |
-
|
1015 |
-
|
1016 |
-
|
1017 |
-
|
1018 |
-
|
1019 |
-
|
1020 |
-
|
1021 |
-
|
1022 |
-
|
1023 |
-
|
1024 |
-
|
1025 |
-
|
1026 |
-
|
1027 |
-
|
1028 |
-
|
1029 |
-
|
1030 |
-
|
1031 |
-
|
1032 |
-
|
1033 |
-
|
1034 |
-
|
1035 |
-
|
1036 |
-
|
1037 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1038 |
*
|
|
|
|
|
1039 |
*/
|
1040 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1041 |
return true;
|
1042 |
-
|
1043 |
}
|
1044 |
|
1045 |
|
1 |
<?php
|
2 |
/**
|
3 |
* This file belongs to the YIT Plugin Framework.
|
|
|
4 |
* This source file is subject to the GNU GENERAL PUBLIC LICENSE (GPL 3.0)
|
5 |
* that is bundled with this package in the file LICENSE.txt.
|
6 |
* It is also available through the world-wide-web at this URL:
|
14 |
if ( !class_exists( 'YIT_Plugin_Panel' ) ) {
|
15 |
/**
|
16 |
* YIT Plugin Panel
|
|
|
17 |
* Setting Page to Manage Plugins
|
18 |
*
|
19 |
* @class YIT_Plugin_Panel
|
41 |
/**
|
42 |
* @var array
|
43 |
*/
|
44 |
+
protected $_main_array_options;
|
45 |
+
|
46 |
+
/**
|
47 |
+
* @var array
|
48 |
+
*/
|
49 |
+
protected $_tabs_hierarchy;
|
50 |
+
|
51 |
+
/**
|
52 |
+
* @var array
|
53 |
+
*/
|
54 |
+
protected static $_panel_tabs_in_wp_pages = array();
|
55 |
|
56 |
/**
|
57 |
* @var array
|
66 |
/**
|
67 |
* Constructor
|
68 |
*
|
|
|
|
|
|
|
69 |
* @param array $args
|
70 |
+
* @author Emanuela Castorina <emanuela.castorina@yithemes.it>
|
71 |
+
* @since 1.0
|
72 |
*/
|
73 |
public function __construct( $args = array() ) {
|
74 |
|
104 |
add_action( 'admin_bar_menu', array( $this, 'add_admin_bar_menu' ), 100 );
|
105 |
add_action( 'admin_init', array( $this, 'add_fields' ) );
|
106 |
|
107 |
+
add_action( 'admin_enqueue_scripts', array( $this, 'init_wp_with_tabs' ), 11 );
|
108 |
+
|
109 |
// init actions once to prevent multiple actions
|
110 |
static::_init_actions();
|
111 |
}
|
112 |
|
113 |
add_action( 'admin_enqueue_scripts', array( $this, 'admin_enqueue_scripts' ) );
|
114 |
|
115 |
+
//yith-plugin-ui
|
116 |
+
add_action( 'yith_plugin_fw_before_yith_panel', array( $this, 'add_plugin_banner' ), 10, 1 );
|
117 |
+
add_action( 'wp_ajax_yith_plugin_fw_save_toggle_element', array( $this, 'save_toggle_element_options' ) );
|
118 |
|
119 |
}
|
120 |
|
121 |
+
/**
|
122 |
+
* Init actions to show YITH Panel tabs in WP Pages
|
123 |
+
*
|
124 |
+
* @author Leanza Francesco <leanzafrancesco@gmail.com>
|
125 |
+
* @since 3.4.0
|
126 |
+
*/
|
127 |
+
public function init_wp_with_tabs() {
|
128 |
+
if ( !current_user_can( $this->settings[ 'capability' ] ) ) {
|
129 |
+
return;
|
130 |
+
}
|
131 |
+
|
132 |
+
global $pagenow, $post_type, $taxonomy;
|
133 |
+
$tabs = false;
|
134 |
+
|
135 |
+
if ( in_array( $pagenow, array( 'post.php', 'post-new.php', 'edit.php' ), true ) ) {
|
136 |
+
$tabs = $this->get_post_type_tabs( $post_type );
|
137 |
+
} else if ( in_array( $pagenow, array( 'edit-tags.php', 'term.php' ), true ) ) {
|
138 |
+
$tabs = $this->get_taxonomy_tabs( $taxonomy );
|
139 |
+
}
|
140 |
+
|
141 |
+
if ( $tabs ) {
|
142 |
+
// tabs_in_edit
|
143 |
+
$current_tab_args = array(
|
144 |
+
'page' => $this->settings[ 'page' ],
|
145 |
+
'current_tab' => isset( $tabs[ 'tab' ] ) ? $tabs[ 'tab' ] : '',
|
146 |
+
'current_sub_tab' => isset( $tabs[ 'sub_tab' ] ) ? $tabs[ 'sub_tab' ] : ''
|
147 |
+
);
|
148 |
+
|
149 |
+
wp_enqueue_style( 'yit-plugin-style' );
|
150 |
+
wp_enqueue_style( 'yith-plugin-fw-fields' );
|
151 |
+
wp_enqueue_script( 'yith-plugin-fw-wp-pages' );
|
152 |
+
|
153 |
+
if ( !self::$_panel_tabs_in_wp_pages ) {
|
154 |
+
self::$_panel_tabs_in_wp_pages = $current_tab_args;
|
155 |
+
add_action( 'all_admin_notices', array( $this, 'print_panel_tabs_in_wp_pages' ) );
|
156 |
+
add_action( 'admin_footer', array( $this, 'print_panel_tabs_in_wp_pages_end' ) );
|
157 |
+
add_filter( 'parent_file', array( $this, 'set_parent_file_to_handle_menu_for_wp_pages' ) );
|
158 |
+
add_filter( 'submenu_file', array( $this, 'set_submenu_file_to_handle_menu_for_wp_pages' ), 10, 2 );
|
159 |
+
}
|
160 |
+
}
|
161 |
+
}
|
162 |
+
|
163 |
/**
|
164 |
* Init actions once to prevent multiple actions
|
165 |
*
|
179 |
}
|
180 |
}
|
181 |
|
182 |
+
protected function _maybe_init_vars() {
|
183 |
+
if ( !isset( $this->_main_array_options ) && !isset( $this->_tabs_hierarchy ) ) {
|
184 |
+
$options_path = $this->settings[ 'options-path' ];
|
185 |
+
$this->_main_array_options = array();
|
186 |
+
$this->_tabs_hierarchy = array();
|
187 |
+
|
188 |
+
foreach ( $this->settings[ 'admin-tabs' ] as $item => $v ) {
|
189 |
+
$path = trailingslashit( $options_path ) . $item . '-options.php';
|
190 |
+
$path = apply_filters( 'yith_plugin_panel_item_options_path', $path, $options_path, $item, $this );
|
191 |
+
if ( file_exists( $path ) ) {
|
192 |
+
$_tab = include $path;
|
193 |
+
$this->_main_array_options = array_merge( $this->_main_array_options, $_tab );
|
194 |
+
$sub_tabs = $this->get_sub_tabs( $_tab );
|
195 |
+
$current_tab_key = array_keys( $_tab )[ 0 ];
|
196 |
+
|
197 |
+
$this->_tabs_hierarchy[ $current_tab_key ] = array_merge( array( 'parent' => '', 'has_sub_tabs' => !!$sub_tabs ), $this->get_tab_info_by_options( $_tab[ $current_tab_key ] ) );
|
198 |
+
|
199 |
+
foreach ( $sub_tabs as $sub_item => $sub_options ) {
|
200 |
+
if ( strpos( $sub_item, $item . '-' ) === 0 ) {
|
201 |
+
$sub_item = substr( $sub_item, strlen( $item ) + 1 );
|
202 |
+
}
|
203 |
+
$sub_tab_path = $options_path . '/' . $item . '/' . $sub_item . '-options.php';
|
204 |
+
$sub_tab_path = apply_filters( 'yith_plugin_panel_sub_tab_item_options_path', $sub_tab_path, $sub_tabs, $sub_item, $this );
|
205 |
+
|
206 |
+
if ( file_exists( $sub_tab_path ) ) {
|
207 |
+
$_sub_tab = include $sub_tab_path;
|
208 |
+
$this->_main_array_options = array_merge( $this->_main_array_options, $_sub_tab );
|
209 |
+
|
210 |
+
$current_sub_tab_key = array_keys( $_sub_tab )[ 0 ];
|
211 |
+
$this->_tabs_hierarchy[ $current_sub_tab_key ] = array_merge( array( 'parent' => $current_tab_key ), $this->get_tab_info_by_options( $_sub_tab[ $current_sub_tab_key ] ) );
|
212 |
+
}
|
213 |
+
}
|
214 |
+
}
|
215 |
+
}
|
216 |
+
}
|
217 |
+
}
|
218 |
+
|
219 |
/**
|
220 |
* Add yith-plugin-fw-panel in body classes in Panel pages
|
221 |
*
|
222 |
* @param $admin_body_classes
|
|
|
|
|
|
|
|
|
223 |
* @return string
|
224 |
+
* @author Leanza Francesco <leanzafrancesco@gmail.com>
|
225 |
+
* @since 3.0.0
|
226 |
*/
|
227 |
public static function add_body_class( $admin_body_classes ) {
|
228 |
global $pagenow;
|
257 |
|
258 |
/**
|
259 |
* Remove duplicate submenu
|
|
|
260 |
* Submenu page hack: Remove the duplicate YIT Plugin link on subpages
|
261 |
*
|
262 |
* @return void
|
270 |
|
271 |
/**
|
272 |
* Enqueue script and styles in admin side
|
|
|
273 |
* Add style and scripts to administrator
|
274 |
*
|
275 |
* @return void
|
310 |
|
311 |
/**
|
312 |
* Register Settings
|
|
|
313 |
* Generate wp-admin settings pages by registering your settings and using a few callbacks to control the output
|
314 |
*
|
315 |
* @return void
|
322 |
|
323 |
/**
|
324 |
* Options Validate
|
|
|
325 |
* a callback function called by Register Settings function
|
326 |
*
|
327 |
* @param $input
|
|
|
328 |
* @return array validate input fields
|
329 |
* @since 1.0
|
330 |
* @author Emanuela Castorina <emanuela.castorina@yithemes.it>
|
331 |
*/
|
332 |
public function options_validate( $input ) {
|
333 |
|
334 |
+
$option_key = !empty( $input[ 'option_key' ] ) ? $input[ 'option_key' ] : 'general';
|
335 |
|
336 |
$yit_options = $this->get_main_array_options();
|
337 |
|
341 |
$submit = ( !empty( $input[ 'submit-general' ] ) ? true : false );
|
342 |
$reset = ( !empty( $input[ 'reset-general' ] ) ? true : false );
|
343 |
|
344 |
+
foreach ( $yit_options[ $option_key ] as $section => $data ) {
|
345 |
foreach ( $data as $option ) {
|
346 |
if ( isset( $option[ 'sanitize_call' ] ) && isset( $option[ 'id' ] ) ) { //yiw_debug($option, false);
|
347 |
if ( is_array( $option[ 'sanitize_call' ] ) ) :
|
382 |
|
383 |
/**
|
384 |
* Add Setting SubPage
|
|
|
385 |
* add Setting SubPage to wordpress administrator
|
386 |
*
|
387 |
* @return array validate input fields
|
430 |
}
|
431 |
|
432 |
/**
|
433 |
+
* Print the tabs navigation
|
434 |
*
|
435 |
+
* @param array $args
|
436 |
+
* @author Leanza Francesco <leanzafrancesco@gmail.com>
|
437 |
+
* @since 3.4.0
|
|
|
|
|
438 |
*/
|
439 |
+
public function print_tabs_nav( $args = array() ) {
|
440 |
+
$defaults = array(
|
441 |
+
'current_tab' => $this->get_current_tab(),
|
442 |
+
'premium_class' => isset( $this->settings[ 'class' ] ) ? 'yith-premium' : 'premium',
|
443 |
+
'page' => $this->settings[ 'page' ],
|
444 |
+
'parent_page' => $this->settings[ 'parent_page' ],
|
445 |
+
'wrapper_class' => 'nav-tab-wrapper'
|
446 |
+
);
|
447 |
+
$args = wp_parse_args( $args, $defaults );
|
448 |
+
/**
|
449 |
+
* @var string $current_tab
|
450 |
+
* @var string $premium_class
|
451 |
+
* @var string $page
|
452 |
+
* @var string $parent_page
|
453 |
+
* @var string $wrapper_class
|
454 |
+
*/
|
455 |
+
extract( $args );
|
456 |
+
|
457 |
+
$tabs = '';
|
458 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
459 |
foreach ( $this->settings[ 'admin-tabs' ] as $tab => $tab_value ) {
|
460 |
+
$active_class = ( $current_tab == $tab ) ? ' nav-tab-active' : '';
|
461 |
+
$active_class .= 'premium' == $tab ? ' ' . $premium_class : '';
|
462 |
+
$first_sub_tab = $this->get_first_sub_tab_key( $tab );
|
463 |
+
$sub_tab = !!$first_sub_tab ? $first_sub_tab : '';
|
464 |
+
|
465 |
+
$url = $this->get_nav_url( $page, $tab, $sub_tab, $parent_page );
|
466 |
+
|
467 |
+
$tabs .= '<a class="nav-tab' . $active_class . '" href="' . $url . '">' . $tab_value . '</a>';
|
468 |
}
|
469 |
?>
|
470 |
+
<h2 class="<?php echo $wrapper_class ?>">
|
|
|
471 |
<?php echo $tabs ?>
|
472 |
</h2>
|
473 |
<?php
|
474 |
+
$this->print_sub_tabs_nav( $args );
|
475 |
+
}
|
|
|
476 |
|
477 |
+
/**
|
478 |
+
* @param string $page
|
479 |
+
* @param string $tab
|
480 |
+
* @param string $sub_tab
|
481 |
+
* @param string $parent_page
|
482 |
+
* @return string
|
483 |
+
*/
|
484 |
+
public function get_nav_url( $page, $tab, $sub_tab = '', $parent_page = '' ) {
|
485 |
+
$tab_hierarchy = $this->get_tabs_hierarchy();
|
486 |
+
$key = !!$sub_tab ? $sub_tab : $tab;
|
487 |
+
|
488 |
+
if ( isset( $tab_hierarchy[ $key ], $tab_hierarchy[ $key ][ 'type' ], $tab_hierarchy[ $key ][ 'post_type' ] ) && 'post_type' === $tab_hierarchy[ $key ][ 'type' ] ) {
|
489 |
+
$url = admin_url( "edit.php?post_type={$tab_hierarchy[$key]['post_type']}" );
|
490 |
+
} elseif ( isset( $tab_hierarchy[ $key ], $tab_hierarchy[ $key ][ 'type' ], $tab_hierarchy[ $key ][ 'taxonomy' ] ) && 'taxonomy' === $tab_hierarchy[ $key ][ 'type' ] ) {
|
491 |
+
$url = admin_url( "edit-tags.php?taxonomy={$tab_hierarchy[$key]['taxonomy']}" );
|
492 |
+
} else {
|
493 |
+
$url = !!$parent_page ? "?{$parent_page}&" : '?';
|
494 |
+
$url .= "page={$page}&tab={$tab}";
|
495 |
+
$url .= !!$sub_tab ? "&sub_tab={$sub_tab}" : '';
|
496 |
+
$url = admin_url( "admin.php{$url}" );
|
497 |
}
|
498 |
+
|
499 |
+
return $url;
|
500 |
+
}
|
501 |
+
|
502 |
+
/**
|
503 |
+
* Print the Sub-tabs navigation if the current tab has sub-tabs
|
504 |
+
*
|
505 |
+
* @param array $args
|
506 |
+
* @author Leanza Francesco <leanzafrancesco@gmail.com>
|
507 |
+
* @since 3.4.0
|
508 |
+
*/
|
509 |
+
public function print_sub_tabs_nav( $args = array() ) {
|
510 |
+
$defaults = array(
|
511 |
+
'current_tab' => $this->get_current_tab(),
|
512 |
+
'page' => $this->settings[ 'page' ],
|
513 |
+
'current_sub_tab' => $this->get_current_sub_tab(),
|
514 |
+
);
|
515 |
+
$args = wp_parse_args( $args, $defaults );
|
516 |
+
|
517 |
+
/**
|
518 |
+
* @var string $current_tab
|
519 |
+
* @var string $page
|
520 |
+
* @var string $current_sub_tab
|
521 |
+
*/
|
522 |
+
extract( $args );
|
523 |
+
|
524 |
+
$sub_tabs = $this->get_sub_tabs( $current_tab );
|
525 |
+
|
526 |
+
if ( $sub_tabs && $current_sub_tab ) {
|
527 |
+
include YIT_CORE_PLUGIN_TEMPLATE_PATH . '/panel/sub-tabs-nav.php';
|
528 |
+
}
|
529 |
+
}
|
530 |
+
|
531 |
+
/**
|
532 |
+
* Show a tabbed panel to setting page
|
533 |
+
* a callback function called by add_setting_page => add_submenu_page
|
534 |
+
*
|
535 |
+
* @return void
|
536 |
+
* @since 1.0
|
537 |
+
* @author Emanuela Castorina <emanuela.castorina@yithemes.it>
|
538 |
+
*/
|
539 |
+
public function yit_panel() {
|
540 |
+
$yit_options = $this->get_main_array_options();
|
541 |
+
$wrap_class = isset( $this->settings[ 'class' ] ) ? $this->settings[ 'class' ] : '';
|
542 |
+
|
543 |
+
$option_key = $this->get_current_option_key();
|
544 |
+
$custom_tab_action = $this->is_custom_tab( $yit_options, $option_key );
|
545 |
?>
|
546 |
+
<div class="wrap <?php echo $wrap_class ?>">
|
547 |
+
<div id="icon-themes" class="icon32"><br/></div>
|
548 |
+
<?php
|
549 |
+
do_action( 'yith_plugin_fw_before_yith_panel', $this->settings[ 'page' ] );
|
550 |
+
|
551 |
+
$this->print_tabs_nav();
|
552 |
+
|
553 |
+
if ( $custom_tab_action ) {
|
554 |
+
$this->print_custom_tab( $custom_tab_action );
|
555 |
+
return;
|
556 |
+
}
|
557 |
+
|
558 |
+
$panel_content_class = apply_filters( 'yit_admin_panel_content_class', 'yit-admin-panel-content-wrap' );
|
559 |
+
?>
|
560 |
+
<div id="wrap" class="yith-plugin-fw plugin-option yit-admin-panel-container">
|
561 |
+
<?php $this->message(); ?>
|
562 |
+
<div class="<?php echo $panel_content_class; ?>">
|
563 |
+
<h2><?php echo $this->get_tab_title() ?></h2>
|
564 |
+
<?php if ( $this->is_show_form() ) : ?>
|
565 |
+
<form id="yith-plugin-fw-panel" method="post" action="options.php">
|
566 |
+
<?php do_settings_sections( 'yit' ); ?>
|
567 |
+
<p> </p>
|
568 |
+
<?php settings_fields( 'yit_' . $this->settings[ 'parent' ] . '_options' ); ?>
|
569 |
+
<input type="hidden" name="<?php echo $this->get_name_field( 'option_key' ) ?>" value="<?php echo esc_attr( $option_key ) ?>"/>
|
570 |
+
<input type="submit" class="button-primary" value="<?php _e( 'Save Changes', 'yith-plugin-fw' ) ?>" style="float:left;margin-right:10px;"/>
|
571 |
+
</form>
|
572 |
+
<form method="post">
|
573 |
+
<?php $warning = __( 'If you continue with this action, you will reset all options in this page.', 'yith-plugin-fw' ) ?>
|
574 |
+
<input type="hidden" name="yit-action" value="reset"/>
|
575 |
+
<input type="submit" name="yit-reset" class="button-secondary" value="<?php _e( 'Reset to default', 'yith-plugin-fw' ) ?>"
|
576 |
+
onclick="return confirm('<?php echo $warning . '\n' . __( 'Are you sure?', 'yith-plugin-fw' ) ?>');"/>
|
577 |
+
</form>
|
578 |
<p> </p>
|
579 |
+
<?php endif ?>
|
580 |
+
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
581 |
</div>
|
582 |
</div>
|
|
|
583 |
<?php
|
584 |
}
|
585 |
|
586 |
+
/**
|
587 |
+
* Check if is a custom tab
|
588 |
+
*
|
589 |
+
* @param array $options
|
590 |
+
* @param string $option_key
|
591 |
+
* @return bool
|
592 |
+
*/
|
593 |
+
public function is_custom_tab( $options, $option_key ) {
|
594 |
+
foreach ( $options[ $option_key ] as $section => $option ) {
|
595 |
if ( isset( $option[ 'type' ] ) && isset( $option[ 'action' ] ) && 'custom_tab' == $option[ 'type' ] && !empty( $option[ 'action' ] ) ) {
|
596 |
return $option[ 'action' ];
|
597 |
} else {
|
602 |
return false;
|
603 |
}
|
604 |
|
605 |
+
public function get_tab_type_by_options( $tab_options ) {
|
606 |
+
$first = !!$tab_options && is_array( $tab_options ) ? current( $tab_options ) : array();
|
607 |
+
$type = isset( $first[ 'type' ] ) ? $first[ 'type' ] : 'options';
|
608 |
+
$special_types = array( 'post_type', 'taxonomy', 'custom_tab', 'multi_tab' );
|
609 |
+
return in_array( $type, $special_types ) ? $type : 'options';
|
610 |
+
}
|
611 |
+
|
612 |
+
public function get_tab_info_by_options( $tab_options ) {
|
613 |
+
$type = $this->get_tab_type_by_options( $tab_options );
|
614 |
+
$info = array( 'type' => $type );
|
615 |
+
$first = !!$tab_options && is_array( $tab_options ) ? current( $tab_options ) : array();
|
616 |
+
if ( 'post_type' === $type ) {
|
617 |
+
$info[ 'post_type' ] = isset( $first[ 'post_type' ] ) ? $first[ 'post_type' ] : '';
|
618 |
+
} else if ( 'taxonomy' === $type ) {
|
619 |
+
$info[ 'taxonomy' ] = isset( $first[ 'taxonomy' ] ) ? $first[ 'taxonomy' ] : '';
|
620 |
+
}
|
621 |
+
|
622 |
+
return $info;
|
623 |
+
}
|
624 |
+
|
625 |
/**
|
626 |
* Fire the action to print the custom tab
|
627 |
*
|
|
|
628 |
* @param string $action Action to fire
|
|
|
629 |
* @return void
|
630 |
* @since 1.0
|
631 |
* @author Andrea Grillo <andrea.grillo@yithemes.com>
|
637 |
|
638 |
/**
|
639 |
* Add sections and fields to setting panel
|
|
|
640 |
* read all options and show sections and fields
|
641 |
*
|
642 |
* @return void
|
645 |
*/
|
646 |
public function add_fields() {
|
647 |
$yit_options = $this->get_main_array_options();
|
648 |
+
$option_key = $this->get_current_option_key();
|
649 |
|
650 |
+
if ( !$option_key ) {
|
651 |
return;
|
652 |
}
|
653 |
+
foreach ( $yit_options[ $option_key ] as $section => $data ) {
|
654 |
+
add_settings_section( "yit_settings_{$option_key}_{$section}", $this->get_section_title( $section ), $this->get_section_description( $section ), 'yit' );
|
655 |
foreach ( $data as $option ) {
|
656 |
if ( isset( $option[ 'id' ] ) && isset( $option[ 'type' ] ) && isset( $option[ 'name' ] ) ) {
|
657 |
+
add_settings_field( "yit_setting_" . $option[ 'id' ], $option[ 'name' ], array( $this, 'render_field' ), 'yit', "yit_settings_{$option_key}_{$section}", array( 'option' => $option, 'label_for' => $this->get_id_field( $option[ 'id' ] ) ) );
|
658 |
}
|
659 |
}
|
660 |
}
|
663 |
|
664 |
/**
|
665 |
* Add the tabs to admin bar menu
|
|
|
666 |
* set all tabs of settings page on wp admin bar
|
667 |
*
|
668 |
* @return void|array return void when capability is false
|
677 |
return;
|
678 |
}
|
679 |
|
680 |
+
if ( !empty( $this->settings[ 'admin_tabs' ] ) ) {
|
681 |
foreach ( $this->settings[ 'admin-tabs' ] as $item => $title ) {
|
682 |
|
683 |
$wp_admin_bar->add_menu( array(
|
693 |
|
694 |
/**
|
695 |
* Get current tab
|
|
|
696 |
* get the id of tab showed, return general is the current tab is not defined
|
697 |
*
|
698 |
* @return string
|
707 |
}
|
708 |
if ( isset( $_REQUEST[ 'yit_tab_options' ] ) ) {
|
709 |
return $_REQUEST[ 'yit_tab_options' ];
|
710 |
+
} elseif ( isset( $_GET[ 'tab' ] ) ) {
|
711 |
return $_GET[ 'tab' ];
|
712 |
} elseif ( isset( $admin_tabs[ 0 ] ) ) {
|
713 |
return $admin_tabs[ 0 ];
|
716 |
}
|
717 |
}
|
718 |
|
719 |
+
/**
|
720 |
+
* Get the current sub-tab
|
721 |
+
*
|
722 |
+
* @return string the key of the sub-tab if exists, empty string otherwise
|
723 |
+
* @author Leanza Francesco <leanzafrancesco@gmail.com>
|
724 |
+
* @since 3.4.0
|
725 |
+
*/
|
726 |
+
public function get_current_sub_tab() {
|
727 |
+
$sub_tabs = $this->get_sub_tabs();
|
728 |
+
$sub_tab = isset( $_REQUEST[ 'sub_tab' ] ) ? $_REQUEST[ 'sub_tab' ] : '';
|
729 |
+
|
730 |
+
if ( $sub_tabs ) {
|
731 |
+
if ( $sub_tab && !isset( $sub_tabs[ $sub_tab ] ) || !$sub_tab ) {
|
732 |
+
$sub_tab = current( array_keys( $sub_tabs ) );
|
733 |
+
}
|
734 |
+
} else {
|
735 |
+
$sub_tab = '';
|
736 |
+
}
|
737 |
+
|
738 |
+
return $sub_tab;
|
739 |
+
}
|
740 |
|
741 |
/**
|
742 |
+
* Return the option key related to the current page
|
743 |
+
* for sub-tabbed tabs, it will return the current sub-tab
|
744 |
+
* fot normal tabs, it will return the current tab
|
745 |
*
|
746 |
+
* @return string the current sub-tab, if exists; the current tab otherwise
|
747 |
+
* @author Leanza Francesco <leanzafrancesco@gmail.com>
|
748 |
+
* @since 3.4.0
|
749 |
+
*/
|
750 |
+
public function get_current_option_key() {
|
751 |
+
$current_tab = $this->get_current_tab();
|
752 |
+
$current_sub_tab = $this->get_current_sub_tab();
|
753 |
+
|
754 |
+
if ( !$current_tab ) {
|
755 |
+
return false;
|
756 |
+
}
|
757 |
+
|
758 |
+
return $current_sub_tab ? $current_sub_tab : $current_tab;
|
759 |
+
}
|
760 |
+
|
761 |
+
|
762 |
+
/**
|
763 |
+
* Message
|
764 |
* define an array of message and show the content od message if
|
765 |
* is find in the query string
|
766 |
*
|
794 |
|
795 |
/**
|
796 |
* Get Message
|
|
|
797 |
* return html code of message
|
798 |
*
|
799 |
* @param $message
|
800 |
* @param string $type can be 'error' or 'updated'
|
801 |
* @param bool $echo
|
802 |
+
* @return string
|
|
|
803 |
* @since 1.0
|
804 |
* @author Emanuela Castorina <emanuela.castorina@yithemes.it>
|
805 |
*/
|
815 |
|
816 |
/**
|
817 |
* Get Tab Path Files
|
818 |
+
* return an array with file names of tabs
|
|
|
819 |
*
|
820 |
* @return array
|
821 |
* @since 1.0
|
844 |
|
845 |
/**
|
846 |
* Get main array options
|
|
|
847 |
* return an array with all options defined on options-files
|
848 |
*
|
849 |
* @return array
|
851 |
* @author Emanuela Castorina <emanuela.castorina@yithemes.it>
|
852 |
*/
|
853 |
function get_main_array_options() {
|
854 |
+
$this->_maybe_init_vars();
|
855 |
+
|
856 |
+
return $this->_main_array_options;
|
857 |
+
}
|
858 |
+
|
859 |
+
function get_tabs_hierarchy() {
|
860 |
+
$this->_maybe_init_vars();
|
861 |
+
|
862 |
+
return $this->_tabs_hierarchy;
|
863 |
+
}
|
864 |
+
|
865 |
+
/**
|
866 |
+
* Return the sub-tabs array of a specific tab
|
867 |
+
*
|
868 |
+
* @param array|bool $_tab the tab; if not set it'll be the current tab
|
869 |
+
* @since 3.4.0
|
870 |
+
* @author Leanza Francesco <leanzafrancesco@gmail.com>
|
871 |
+
* @return array sub-tabs array
|
872 |
+
*/
|
873 |
+
public function get_sub_tabs( $_tab = false ) {
|
874 |
+
if ( false === $_tab ) {
|
875 |
+
$_tab = $this->get_current_tab();
|
876 |
}
|
877 |
|
878 |
+
if ( is_string( $_tab ) ) {
|
879 |
+
$main_array_options = $this->get_main_array_options();
|
880 |
+
$current_tab_options = isset( $main_array_options[ $_tab ] ) ? $main_array_options[ $_tab ] : array();
|
881 |
+
if ( $current_tab_options ) {
|
882 |
+
$_tab = array( $_tab => $current_tab_options );
|
883 |
+
}
|
884 |
+
}
|
885 |
+
|
886 |
+
$_tab_options = !!$_tab && is_array( $_tab ) ? current( $_tab ) : false;
|
887 |
+
$_first = !!$_tab_options && is_array( $_tab_options ) ? current( $_tab_options ) : false;
|
888 |
+
if ( $_first && is_array( $_first ) && isset( $_first[ 'type' ] ) && 'multi_tab' === $_first[ 'type' ] && !empty( $_first[ 'sub-tabs' ] ) ) {
|
889 |
+
return $_first[ 'sub-tabs' ];
|
890 |
+
}
|
891 |
+
return array();
|
892 |
+
}
|
893 |
|
894 |
+
public function get_first_sub_tab_key( $_tab = false ) {
|
895 |
+
$key = false;
|
896 |
+
if ( is_string( $_tab ) ) {
|
897 |
+
$main_array_options = $this->get_main_array_options();
|
898 |
+
$current_tab_options = isset( $main_array_options[ $_tab ] ) ? $main_array_options[ $_tab ] : array();
|
899 |
+
if ( $current_tab_options ) {
|
900 |
+
$_tab = array( $_tab => $current_tab_options );
|
901 |
}
|
902 |
}
|
903 |
|
904 |
+
if ( ( $sub_tabs = $this->get_sub_tabs( $_tab ) ) ) {
|
905 |
+
$key = current( array_keys( $sub_tabs ) );
|
906 |
+
}
|
907 |
+
|
908 |
+
return $key;
|
909 |
}
|
910 |
|
911 |
|
912 |
/**
|
913 |
* Set an array with all default options
|
|
|
914 |
* put default options in an array
|
915 |
*
|
916 |
* @return array
|
939 |
|
940 |
/**
|
941 |
* Get the title of the tab
|
|
|
942 |
* return the title of tab
|
943 |
*
|
944 |
* @return string
|
956 |
}
|
957 |
}
|
958 |
}
|
959 |
+
return '';
|
960 |
}
|
961 |
|
962 |
/**
|
963 |
* Get the title of the section
|
|
|
964 |
* return the title of section
|
965 |
*
|
966 |
* @param $section
|
|
|
967 |
* @return string
|
968 |
* @since 1.0
|
969 |
* @author Emanuela Castorina <emanuela.castorina@yithemes.it>
|
977 |
return $option[ 'name' ];
|
978 |
}
|
979 |
}
|
980 |
+
return '';
|
981 |
}
|
982 |
|
983 |
/**
|
984 |
* Get the description of the section
|
|
|
985 |
* return the description of section if is set
|
986 |
*
|
987 |
* @param $section
|
|
|
988 |
* @return string
|
989 |
* @since 1.0
|
990 |
* @author Emanuela Castorina <emanuela.castorina@yithemes.it>
|
998 |
return '<p>' . $option[ 'desc' ] . '</p>';
|
999 |
}
|
1000 |
}
|
1001 |
+
return '';
|
1002 |
}
|
1003 |
|
1004 |
|
1005 |
/**
|
1006 |
* Show form when necessary
|
|
|
1007 |
* return true if 'showform' is not defined
|
1008 |
*
|
1009 |
* @return bool
|
1012 |
*/
|
1013 |
function is_show_form() {
|
1014 |
$yit_options = $this->get_main_array_options();
|
1015 |
+
$option_key = $this->get_current_option_key();
|
1016 |
|
1017 |
+
foreach ( $yit_options[ $option_key ] as $sections => $data ) {
|
1018 |
foreach ( $data as $option ) {
|
1019 |
if ( !isset( $option[ 'type' ] ) || $option[ 'type' ] != 'title' ) {
|
1020 |
continue;
|
1030 |
|
1031 |
/**
|
1032 |
* Get name field
|
|
|
1033 |
* return a string with the name of the input field
|
1034 |
*
|
1035 |
* @param string $name
|
|
|
1036 |
* @return string
|
1037 |
* @since 1.0
|
1038 |
* @author Emanuela Castorina <emanuela.castorina@yithemes.it>
|
1043 |
|
1044 |
/**
|
1045 |
* Get id field
|
|
|
1046 |
* return a string with the id of the input field
|
1047 |
*
|
1048 |
* @param string $id
|
|
|
1049 |
* @return string
|
1050 |
* @since 1.0
|
1051 |
* @author Emanuela Castorina <emanuela.castorina@yithemes.it>
|
1057 |
|
1058 |
/**
|
1059 |
* Render the field showed in the setting page
|
|
|
1060 |
* include the file of the option type, if file do not exists
|
1061 |
* return a text area
|
1062 |
*
|
1063 |
* @param array $param
|
|
|
1064 |
* @return void
|
1065 |
* @since 1.0
|
1066 |
* @author Emanuela Castorina <emanuela.castorina@yithemes.it>
|
1100 |
|
1101 |
/**
|
1102 |
* Get options from db
|
|
|
1103 |
* return the options from db, if the options aren't defined in the db,
|
1104 |
* get the default options ad add the options in the db
|
1105 |
*
|
1119 |
/**
|
1120 |
* Show a box panel with specific content in two columns as a new woocommerce type
|
1121 |
*
|
|
|
1122 |
* @param array $args
|
|
|
1123 |
* @return void
|
1124 |
* @since 1.0
|
1125 |
* @author Emanuela Castorina <emanuela.castorina@yithemes.com>
|
1134 |
/**
|
1135 |
* Show a box panel with specific content in two columns as a new woocommerce type
|
1136 |
*
|
|
|
|
|
1137 |
* @param array $args
|
|
|
1138 |
* @return void
|
1139 |
+
* @deprecated 3.0.12 Do nothing! Method left to prevent Fatal Error if called directly
|
1140 |
*/
|
1141 |
public static function add_videobox( $args = array() ) {
|
1142 |
|
1145 |
/**
|
1146 |
* Fire the action to print the custom tab
|
1147 |
*
|
|
|
1148 |
* @return void
|
1149 |
+
* @deprecated 3.0.12 Do nothing! Method left to prevent Fatal Error if called directly
|
1150 |
*/
|
1151 |
public function print_video_box() {
|
1152 |
|
1207 |
*
|
1208 |
* @author Emanuela Castorina
|
1209 |
*/
|
1210 |
+
function is_free() {
|
1211 |
+
return ( !empty( $this->settings[ 'admin-tabs' ] ) && isset( $this->settings[ 'admin-tabs' ][ 'premium' ] ) );
|
1212 |
+
}
|
1213 |
+
|
1214 |
+
/**
|
1215 |
+
* Add plugin banner
|
1216 |
+
*/
|
1217 |
+
public function add_plugin_banner( $page ) {
|
1218 |
+
|
1219 |
+
if ( $page != $this->settings[ 'page' ] || !isset( $this->settings[ 'class' ] ) ) {
|
1220 |
+
return;
|
1221 |
+
}
|
1222 |
+
|
1223 |
+
if ( $this->is_free() && isset( $this->settings[ 'plugin_slug' ] ) ):
|
1224 |
+
$banners = apply_filters( 'yith_plugin_fw_banners_free', array(
|
1225 |
+
'upgrade' => array(
|
1226 |
+
'image' => YIT_CORE_PLUGIN_URL . '/assets/images/upgrade_banner.png',
|
1227 |
+
'link' => 'https://yithemes.com/themes/plugins/' . $this->settings[ 'plugin_slug' ],
|
1228 |
+
),
|
1229 |
+
'rate' => array(
|
1230 |
+
'image' => YIT_CORE_PLUGIN_URL . '/assets/images/rate_banner.png',
|
1231 |
+
'link' => 'https://wordpress.org/support/plugin/' . $this->settings[ 'plugin_slug' ] . '/reviews/?rate=5#new-post',
|
1232 |
+
),
|
1233 |
+
), $page );
|
1234 |
+
?>
|
1235 |
<h1 class="notice-container"></h1>
|
1236 |
<div class="yith-plugin-fw-banner yith-plugin-fw-banner-free">
|
1237 |
+
<h1><?php echo esc_html( $this->settings[ 'page_title' ] ) ?></h1>
|
1238 |
+
<?php if ( $banners ) : ?>
|
1239 |
<div class="yith-banners">
|
1240 |
<ul>
|
1241 |
+
<?php foreach ( $banners as $banner ): ?>
|
1242 |
+
<li><a href="<?php echo esc_url( $banner[ 'link' ] ) ?>" target="_blank"><img src="<?php echo esc_url( $banner[ 'image' ] ) ?>"></a></li>
|
1243 |
+
<?php endforeach; ?>
|
1244 |
</ul>
|
1245 |
</div>
|
1246 |
|
1247 |
+
<?php endif ?>
|
1248 |
</div>
|
1249 |
+
<?php else: ?>
|
1250 |
<h1 class="notice-container"></h1>
|
1251 |
<div class="yith-plugin-fw-banner">
|
1252 |
+
<h1><?php echo esc_html( $this->settings[ 'page_title' ] ) ?>
|
1253 |
+
<?php if ( isset( $this->settings[ 'plugin_description' ] ) ): ?>
|
1254 |
+
<span><?php echo esc_html( $this->settings[ 'plugin_description' ] ) ?></span>
|
1255 |
+
<?php endif ?>
|
1256 |
</h1>
|
1257 |
</div>
|
1258 |
|
1259 |
+
<?php endif ?>
|
1260 |
+
<?php
|
1261 |
+
}
|
1262 |
+
|
1263 |
+
/**
|
1264 |
+
* Add additional element after print the field.
|
1265 |
+
*
|
1266 |
+
* @since 3.2
|
1267 |
+
* @author Emanuela Castorina
|
1268 |
+
*/
|
1269 |
+
public function add_yith_ui( $field ) {
|
1270 |
+
global $pagenow;
|
1271 |
+
|
1272 |
+
$screen = function_exists('get_current_screen') ? get_current_screen() : false;
|
1273 |
+
|
1274 |
+
if ( empty( $this->settings[ 'class' ] ) || !isset( $field[ 'type' ] ) ) {
|
1275 |
+
return;
|
1276 |
+
}
|
1277 |
+
if ( 'admin.php' === $pagenow && $screen && strpos( $screen->id, $this->settings[ 'page' ] ) !== false ) {
|
1278 |
+
switch ( $field[ 'type' ] ) {
|
1279 |
+
case 'datepicker':
|
1280 |
+
echo '<span class="yith-icon icon-calendar"></span>';
|
1281 |
+
break;
|
1282 |
+
default:
|
1283 |
+
break;
|
1284 |
+
}
|
1285 |
+
}
|
1286 |
+
}
|
1287 |
+
|
1288 |
+
|
1289 |
+
public function get_post_type_tabs( $post_type ) {
|
1290 |
+
$tabs = array();
|
1291 |
+
|
1292 |
+
foreach ( $this->get_tabs_hierarchy() as $key => $info ) {
|
1293 |
+
if ( isset( $info[ 'type' ], $info[ 'post_type' ] ) && 'post_type' === $info[ 'type' ] && $post_type === $info[ 'post_type' ] ) {
|
1294 |
+
if ( !empty( $info[ 'parent' ] ) ) {
|
1295 |
+
$tabs = array( 'tab' => $info[ 'parent' ], 'sub_tab' => $key );
|
1296 |
+
} else {
|
1297 |
+
$tabs = array( 'tab' => $key );
|
1298 |
+
}
|
1299 |
+
break;
|
1300 |
+
}
|
1301 |
+
}
|
1302 |
+
return $tabs;
|
1303 |
+
}
|
1304 |
+
|
1305 |
+
public function get_taxonomy_tabs( $taxonomy ) {
|
1306 |
+
$tabs = array();
|
1307 |
+
|
1308 |
+
foreach ( $this->get_tabs_hierarchy() as $key => $info ) {
|
1309 |
+
if ( isset( $info[ 'type' ], $info[ 'taxonomy' ] ) && 'taxonomy' === $info[ 'type' ] && $taxonomy === $info[ 'taxonomy' ] ) {
|
1310 |
+
if ( !empty( $info[ 'parent' ] ) ) {
|
1311 |
+
$tabs = array( 'tab' => $info[ 'parent' ], 'sub_tab' => $key );
|
1312 |
+
} else {
|
1313 |
+
$tabs = array( 'tab' => $key );
|
1314 |
+
}
|
1315 |
+
break;
|
1316 |
+
}
|
1317 |
+
}
|
1318 |
+
return $tabs;
|
1319 |
+
}
|
1320 |
+
|
1321 |
+
|
1322 |
+
/**
|
1323 |
+
* If the panel page is a WP Page, this will redirect you to the correct page
|
1324 |
+
* useful when a Post Type (Taxonomy) is the first tab of your panel, so when you open your panel it'll open the Post Type (Taxonomy) list
|
1325 |
+
*
|
1326 |
+
* @since 3.4.0
|
1327 |
+
* @author Leanza Francesco <leanzafrancesco@gmail.com>
|
1328 |
+
*/
|
1329 |
+
public function maybe_redirect_to_proper_wp_page() {
|
1330 |
+
if ( !isset( $_REQUEST[ 'yith-plugin-fw-panel-skip-redirect' ] ) ) {
|
1331 |
+
$url = $this->get_nav_url( $this->settings[ 'page' ], $this->get_current_tab(), $this->get_current_sub_tab() );
|
1332 |
+
if ( strpos( $url, 'edit.php' ) !== false || strpos( $url, 'edit-tags.php' ) !== false ) {
|
1333 |
+
wp_safe_redirect( add_query_arg( array( 'yith-plugin-fw-panel-skip-redirect' => 1 ), $url ) );
|
1334 |
+
exit;
|
1335 |
+
}
|
1336 |
+
}
|
1337 |
+
}
|
1338 |
+
|
1339 |
+
/**
|
1340 |
+
* Print the Panel tabs and sub-tabs navigation in WP pages
|
1341 |
+
* Important: this opens a wrapper <div> that will be closed through YIT_Plugin_Panel::print_panel_tabs_in_post_edit_page_end()
|
1342 |
+
*
|
1343 |
+
* @since 3.4.0
|
1344 |
+
* @author Leanza Francesco <leanzafrancesco@gmail.com>
|
1345 |
+
*/
|
1346 |
+
public function print_panel_tabs_in_wp_pages() {
|
1347 |
+
if ( self::$_panel_tabs_in_wp_pages ) {
|
1348 |
+
wp_enqueue_style( 'yit-plugin-style' );
|
1349 |
+
$wrap_class = isset( $this->settings[ 'class' ] ) ? $this->settings[ 'class' ] : '';
|
1350 |
+
|
1351 |
+
?>
|
1352 |
+
<div class="yith-plugin-fw-wp-page-wrapper">
|
1353 |
+
<?php
|
1354 |
+
echo "<div class='{$wrap_class}'>";
|
1355 |
+
$this->add_plugin_banner( $this->settings[ 'page' ] );
|
1356 |
+
$this->print_tabs_nav( self::$_panel_tabs_in_wp_pages );
|
1357 |
+
echo "</div>";
|
1358 |
+
}
|
1359 |
+
}
|
1360 |
+
|
1361 |
+
|
1362 |
+
/**
|
1363 |
+
* Close the wrapper opened in YIT_Plugin_Panel::print_panel_tabs_in_wp_pages()
|
1364 |
*
|
1365 |
+
* @since 3.4.0
|
1366 |
+
* @author Leanza Francesco <leanzafrancesco@gmail.com>
|
1367 |
*/
|
1368 |
+
public function print_panel_tabs_in_wp_pages_end() {
|
1369 |
+
if ( self::$_panel_tabs_in_wp_pages ) {
|
1370 |
+
echo "</div><!-- /yith-plugin-fw-wp-page-wrapper -->";
|
1371 |
+
}
|
1372 |
+
}
|
1373 |
+
|
1374 |
+
public function set_parent_file_to_handle_menu_for_wp_pages( $parent_file ) {
|
1375 |
+
if ( self::$_panel_tabs_in_wp_pages ) {
|
1376 |
+
return 'yith_plugin_panel';
|
1377 |
+
}
|
1378 |
+
|
1379 |
+
return $parent_file;
|
1380 |
+
}
|
1381 |
+
|
1382 |
+
public function set_submenu_file_to_handle_menu_for_wp_pages( $submenu_file, $parent_file ) {
|
1383 |
+
if ( self::$_panel_tabs_in_wp_pages ) {
|
1384 |
+
return $this->settings[ 'page' ];
|
1385 |
+
}
|
1386 |
+
return $submenu_file;
|
1387 |
+
}
|
1388 |
+
|
1389 |
+
/**
|
1390 |
+
*
|
1391 |
+
*/
|
1392 |
+
public function save_toggle_element_options() {
|
1393 |
return true;
|
1394 |
+
}
|
1395 |
}
|
1396 |
|
1397 |
|
plugin-fw/lib/yit-plugin-subpanel.php
CHANGED
@@ -36,11 +36,6 @@ if ( !class_exists( 'YIT_Plugin_SubPanel' ) ) {
|
|
36 |
public $settings = array();
|
37 |
|
38 |
|
39 |
-
/**
|
40 |
-
* @var array
|
41 |
-
*/
|
42 |
-
private $_main_array_options = array();
|
43 |
-
|
44 |
/**
|
45 |
* Constructor
|
46 |
*
|
36 |
public $settings = array();
|
37 |
|
38 |
|
|
|
|
|
|
|
|
|
|
|
39 |
/**
|
40 |
* Constructor
|
41 |
*
|
plugin-fw/templates/fields/checkbox-array.php
ADDED
@@ -0,0 +1,35 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* This file belongs to the YIT Plugin Framework.
|
4 |
+
* This source file is subject to the GNU GENERAL PUBLIC LICENSE (GPL 3.0)
|
5 |
+
* that is bundled with this package in the file LICENSE.txt.
|
6 |
+
* It is also available through the world-wide-web at this URL:
|
7 |
+
* http://www.gnu.org/licenses/gpl-3.0.txt
|
8 |
+
*
|
9 |
+
* @var array $field
|
10 |
+
*/
|
11 |
+
|
12 |
+
/** @since 3.4.0 */
|
13 |
+
|
14 |
+
!defined( 'ABSPATH' ) && exit; // Exit if accessed directly
|
15 |
+
|
16 |
+
extract( $field );
|
17 |
+
|
18 |
+
$class = isset( $class ) ? $class : '';
|
19 |
+
$class = 'yith-plugin-fw-checkbox-array ' . $class;
|
20 |
+
|
21 |
+
$value = is_array( $value ) ? $value : array();
|
22 |
+
?>
|
23 |
+
<div class="<?php echo $class ?>" id="<?php echo $id ?>"
|
24 |
+
<?php echo $custom_attributes ?>
|
25 |
+
<?php if ( isset( $data ) ) echo yith_plugin_fw_html_data_to_string( $data ); ?> >
|
26 |
+
<?php foreach ( $options as $key => $label ) :
|
27 |
+
$checkbox_id = sanitize_key( $id . '-' . $key );
|
28 |
+
?>
|
29 |
+
<div class="yith-plugin-fw-checkbox-array__row">
|
30 |
+
<input type="checkbox" id="<?php echo $checkbox_id ?>" name="<?php echo $name ?>[]" value="<?php echo esc_attr( $key ) ?>" <?php checked( in_array( $key, $value ) ); ?> />
|
31 |
+
<label for="<?php echo $checkbox_id ?>"><?php echo $label ?></label>
|
32 |
+
</div>
|
33 |
+
<?php endforeach; ?>
|
34 |
+
</div>
|
35 |
+
|
plugin-fw/templates/fields/country-select.php
ADDED
@@ -0,0 +1,64 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* This file belongs to the YIT Plugin Framework.
|
4 |
+
* This source file is subject to the GNU GENERAL PUBLIC LICENSE (GPL 3.0)
|
5 |
+
* that is bundled with this package in the file LICENSE.txt.
|
6 |
+
* It is also available through the world-wide-web at this URL:
|
7 |
+
* http://www.gnu.org/licenses/gpl-3.0.txt
|
8 |
+
*
|
9 |
+
* @var array $field
|
10 |
+
*/
|
11 |
+
|
12 |
+
!defined( 'ABSPATH' ) && exit; // Exit if accessed directly
|
13 |
+
|
14 |
+
extract( $field );
|
15 |
+
$placeholder = isset( $placeholder ) ? ' data-placeholder = "' . $placeholder . '" ' : '';
|
16 |
+
|
17 |
+
|
18 |
+
$country_setting = (string) $value;
|
19 |
+
|
20 |
+
if ( strstr( $country_setting, ':' ) ) {
|
21 |
+
$country_setting = explode( ':', $country_setting );
|
22 |
+
$selected_country = current( $country_setting );
|
23 |
+
$selected_state = end( $country_setting );
|
24 |
+
} else {
|
25 |
+
$selected_country = $country_setting;
|
26 |
+
$selected_state = '*';
|
27 |
+
}
|
28 |
+
$countries = WC()->countries->get_countries();
|
29 |
+
$class = isset( $class ) ? $class : 'yith-plugin-fw-select';
|
30 |
+
?>
|
31 |
+
<select<?php echo $multiple_html ?>
|
32 |
+
id="<?php echo $id ?>"
|
33 |
+
name="<?php echo $name ?>" <?php echo isset( $std ) ? " data-std='{$std}'" : '' ?>
|
34 |
+
class="wc-enhanced-select <?php echo $class ?>"
|
35 |
+
<?php echo $placeholder ?>
|
36 |
+
<?php echo $custom_attributes ?>
|
37 |
+
<?php if ( isset( $data ) ) echo yith_plugin_fw_html_data_to_string( $data ); ?>>
|
38 |
+
<?php
|
39 |
+
if ( $countries ) {
|
40 |
+
foreach ( $countries as $key => $value ) {
|
41 |
+
$states = WC()->countries->get_states( $key );
|
42 |
+
if ( $states ) {
|
43 |
+
echo '<optgroup label="' . esc_attr( $value ) . '">';
|
44 |
+
foreach ( $states as $state_key => $state_value ) {
|
45 |
+
echo '<option value="' . esc_attr( $key ) . ':' . esc_attr( $state_key ) . '"';
|
46 |
+
|
47 |
+
if ( $selected_country === $key && $selected_state === $state_key ) {
|
48 |
+
echo ' selected="selected"';
|
49 |
+
}
|
50 |
+
|
51 |
+
echo '>' . esc_html( $value ) . ' — ' . $state_value . '</option>'; // WPCS: XSS ok.
|
52 |
+
}
|
53 |
+
echo '</optgroup>';
|
54 |
+
} else {
|
55 |
+
echo '<option';
|
56 |
+
if ( $selected_country === $key && '*' === $selected_state ) {
|
57 |
+
echo ' selected="selected"';
|
58 |
+
}
|
59 |
+
echo ' value="' . esc_attr( $key ) . '">' . $value . '</option>'; // WPCS: XSS ok.
|
60 |
+
}
|
61 |
+
}
|
62 |
+
}
|
63 |
+
?>
|
64 |
+
</select>
|
plugin-fw/templates/fields/datepicker.php
CHANGED
@@ -1,7 +1,6 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
* This file belongs to the YIT Plugin Framework.
|
4 |
-
*
|
5 |
* This source file is subject to the GNU GENERAL PUBLIC LICENSE (GPL 3.0)
|
6 |
* that is bundled with this package in the file LICENSE.txt.
|
7 |
* It is also available through the world-wide-web at this URL:
|
@@ -20,5 +19,6 @@ $class = !empty( $class ) ? $class : 'yith-plugin-fw-datepicker';
|
|
20 |
id="<?php echo $id ?>"
|
21 |
value="<?php echo esc_attr( $value ) ?>"
|
22 |
class="<?php echo $class ?>"
|
|
|
23 |
<?php echo $custom_attributes ?>
|
24 |
<?php if ( isset( $data ) ) echo yith_plugin_fw_html_data_to_string( $data ); ?>/>
|
1 |
<?php
|
2 |
/**
|
3 |
* This file belongs to the YIT Plugin Framework.
|
|
|
4 |
* This source file is subject to the GNU GENERAL PUBLIC LICENSE (GPL 3.0)
|
5 |
* that is bundled with this package in the file LICENSE.txt.
|
6 |
* It is also available through the world-wide-web at this URL:
|
19 |
id="<?php echo $id ?>"
|
20 |
value="<?php echo esc_attr( $value ) ?>"
|
21 |
class="<?php echo $class ?>"
|
22 |
+
autocomplete="off"
|
23 |
<?php echo $custom_attributes ?>
|
24 |
<?php if ( isset( $data ) ) echo yith_plugin_fw_html_data_to_string( $data ); ?>/>
|
plugin-fw/templates/fields/onoff.php
CHANGED
@@ -1,7 +1,6 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
* This file belongs to the YIT Plugin Framework.
|
4 |
-
*
|
5 |
* This source file is subject to the GNU GENERAL PUBLIC LICENSE (GPL 3.0)
|
6 |
* that is bundled with this package in the file LICENSE.txt.
|
7 |
* It is also available through the world-wide-web at this URL:
|
@@ -15,8 +14,12 @@
|
|
15 |
extract( $field );
|
16 |
?>
|
17 |
|
18 |
-
<div class="yith-plugin-fw-onoff-container"
|
19 |
-
|
|
|
|
|
|
|
|
|
20 |
<span class="yith-plugin-fw-onoff"></span>
|
21 |
</div>
|
22 |
<?php
|
1 |
<?php
|
2 |
/**
|
3 |
* This file belongs to the YIT Plugin Framework.
|
|
|
4 |
* This source file is subject to the GNU GENERAL PUBLIC LICENSE (GPL 3.0)
|
5 |
* that is bundled with this package in the file LICENSE.txt.
|
6 |
* It is also available through the world-wide-web at this URL:
|
14 |
extract( $field );
|
15 |
?>
|
16 |
|
17 |
+
<div class="yith-plugin-fw-onoff-container <?php echo !empty( $class ) ? $class : ''; ?>"
|
18 |
+
<?php if ( isset( $data ) ) echo yith_plugin_fw_html_data_to_string( $data ); ?>>
|
19 |
+
<input type="checkbox" id="<?php echo $id ?>" name="<?php echo $name ?>" value="<?php echo esc_attr( $value ) ?>"
|
20 |
+
<?php checked( yith_plugin_fw_is_true( $value ) ) ?> class="on_off" <?php if ( isset( $std ) ) : ?>data-std="<?php echo $std ?>"<?php endif ?>
|
21 |
+
<?php echo $custom_attributes ?>
|
22 |
+
/>
|
23 |
<span class="yith-plugin-fw-onoff"></span>
|
24 |
</div>
|
25 |
<?php
|
plugin-fw/templates/fields/toggle-element.php
CHANGED
@@ -1,53 +1,54 @@
|
|
1 |
<?php
|
2 |
-
if ( !
|
3 |
-
|
4 |
}
|
5 |
|
6 |
//delete_option('ywraq_toggle_element');
|
7 |
$defaults = array(
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
|
22 |
);
|
23 |
-
$field
|
24 |
|
25 |
extract( $field );
|
26 |
|
27 |
-
$show_add_button
|
28 |
$add_button_closed = isset( $add_button_closed ) ? $add_button_closed : '';
|
29 |
-
$values
|
30 |
-
$values
|
31 |
-
$sortable
|
32 |
-
$class_wrapper
|
33 |
-
$onoff_id
|
34 |
$ajax_nonce = wp_create_nonce( 'save-toggle-element' );
|
35 |
|
36 |
-
if ( empty( $values ) &&
|
37 |
$values = array();
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
}
|
43 |
|
|
|
44 |
?>
|
45 |
<div class="yith-toggle_wrapper <?php echo $class_wrapper ?>" id="<?php echo $id ?>" data-nonce="<?php echo $ajax_nonce; ?>">
|
46 |
-
|
47 |
|
48 |
-
|
49 |
|
50 |
-
|
51 |
<button class="yith-add-button yith-add-box-button"
|
52 |
data-box_id="<?php echo $id; ?>_add_box"
|
53 |
data-closed_label="<?php echo esc_attr( $add_button_closed ) ?>"
|
@@ -55,216 +56,232 @@ if ( empty( $values ) && ! $show_add_button && $elements ) {
|
|
55 |
<div id="<?php echo $id; ?>_add_box" class="yith-add-box">
|
56 |
</div>
|
57 |
<script type="text/template" id="tmpl-yith-toggle-element-add-box-content-<?php echo $id ?>">
|
58 |
-
|
59 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
60 |
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
?>
|
68 |
-
<div class="yith-add-box-row <?php echo $class_element ?> <?php echo '{{{data.index}}}'?>">
|
69 |
|
70 |
-
<label for="<?php echo $element['id']; ?>"><?php echo
|
71 |
<div class="yith-plugin-fw-option-with-description">
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
</div>
|
76 |
</div>
|
77 |
-
|
78 |
|
|
|
79 |
<div class="yith-add-box-buttons">
|
80 |
<button class="button-primary yith-save-button">
|
81 |
-
|
82 |
</button>
|
83 |
</div>
|
|
|
84 |
</script>
|
85 |
-
|
86 |
|
87 |
<div class="yith-toggle-elements">
|
88 |
-
|
89 |
-
if ($values ):
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
<span class="title"
|
104 |
data-title_format="<?php echo esc_attr( $title ) ?>"><?php echo $title_element ?></span>
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
<span class="yith-icon yith-icon-arrow_right ui-sortable-handle"></span>
|
112 |
</span>
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
<?php
|
124 |
echo yith_plugin_fw_get_field( $onoff_field, true );
|
125 |
?>
|
126 |
</span>
|
127 |
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
151 |
</div>
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
</div>
|
179 |
-
</div>
|
180 |
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
|
186 |
|
187 |
</div>
|
188 |
<!-- Schedule Item template -->
|
189 |
<script type="text/template" id="tmpl-yith-toggle-element-item-<?php echo $id ?>">
|
190 |
<div id="<?php echo $id; ?>_{{{data.index}}}"
|
191 |
-
class="yith-toggle-row highlight <?php echo !
|
192 |
data-item_key="{{{data.index}}}" <?php echo $custom_attributes; ?>
|
193 |
data-item_key="{{{data.index}}}">
|
194 |
<div class="yith-toggle-title">
|
195 |
<h3>
|
196 |
<span class="title" data-title_format="<?php echo esc_attr( $title ) ?>"><?php echo $title ?></span>
|
197 |
|
198 |
-
|
199 |
-
|
200 |
|
201 |
</h3>
|
202 |
<span class="yith-toggle">
|
203 |
<span class="yith-icon yith-icon-arrow_right"></span>
|
204 |
</span>
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
<span class="yith-toggle-onoff" <?php echo $action; ?> >
|
215 |
<?php
|
216 |
echo yith_plugin_fw_get_field( $onoff_field, true );
|
217 |
?>
|
218 |
</span>
|
219 |
|
220 |
-
|
221 |
-
|
222 |
<span class="yith-icon yith-icon-drag ui-sortable-handle"></span>
|
223 |
-
|
224 |
</div>
|
225 |
<div class="yith-toggle-content">
|
226 |
-
|
227 |
-
|
228 |
-
|
229 |
-
|
230 |
-
|
231 |
-
|
232 |
-
|
233 |
-
|
234 |
-
|
235 |
-
|
236 |
-
|
237 |
-
|
|
|
|
|
|
|
|
|
238 |
<div class="yith-plugin-fw-option-with-description">
|
239 |
-
|
240 |
-
|
241 |
</div>
|
242 |
</div>
|
243 |
-
|
244 |
-
|
245 |
-
|
246 |
<div class="yith-toggle-content-buttons">
|
247 |
<div class="spinner"></div>
|
248 |
-
|
249 |
-
|
250 |
-
|
251 |
-
|
252 |
-
|
253 |
-
<button id="<?php echo $save_button['id']; ?>"
|
254 |
class="yith-save-button <?php echo $save_button_class; ?>">
|
255 |
-
|
256 |
</button>
|
257 |
-
|
258 |
-
|
259 |
-
|
260 |
-
|
261 |
-
|
262 |
?>
|
263 |
-
<button id="<?php echo $delete_button['id']; ?>"
|
264 |
class="button-secondary yith-delete-button <?php echo $delete_button_class; ?>">
|
265 |
-
|
266 |
</button>
|
267 |
-
|
268 |
</div>
|
269 |
</div>
|
270 |
</div>
|
1 |
<?php
|
2 |
+
if ( !defined( 'ABSPATH' ) ) {
|
3 |
+
exit;
|
4 |
}
|
5 |
|
6 |
//delete_option('ywraq_toggle_element');
|
7 |
$defaults = array(
|
8 |
+
'id' => '',
|
9 |
+
'add_button' => '',
|
10 |
+
'name' => '',
|
11 |
+
'class' => '',
|
12 |
+
'custom_attributes' => '',
|
13 |
+
'elements' => array(),
|
14 |
+
'title' => '',
|
15 |
+
'subtitle' => '',
|
16 |
+
'onoff_field' => array(),
|
17 |
+
//is an array to print a onoff field, if need to call an ajax action, add 'ajax_action' => 'myaction' in the array args,
|
18 |
+
'sortable' => false,
|
19 |
+
'save_button' => array(),
|
20 |
+
'delete_button' => array()
|
21 |
|
22 |
);
|
23 |
+
$field = wp_parse_args( $field, $defaults );
|
24 |
|
25 |
extract( $field );
|
26 |
|
27 |
+
$show_add_button = isset( $add_button ) && $add_button;
|
28 |
$add_button_closed = isset( $add_button_closed ) ? $add_button_closed : '';
|
29 |
+
$values = isset( $value ) ? $value : get_option( $name, array() );
|
30 |
+
$values = maybe_unserialize( $values );
|
31 |
+
$sortable = isset( $sortable ) ? $sortable : false;
|
32 |
+
$class_wrapper = $sortable ? 'ui-sortable' : '';
|
33 |
+
$onoff_id = isset( $onoff_field[ 'id' ] ) ? $onoff_field[ 'id' ] : '';
|
34 |
$ajax_nonce = wp_create_nonce( 'save-toggle-element' );
|
35 |
|
36 |
+
if ( empty( $values ) && !$show_add_button && $elements ) {
|
37 |
$values = array();
|
38 |
+
//populate a toggle element with the default
|
39 |
+
foreach ( $elements as $element ) {
|
40 |
+
$values[ 0 ][ $element[ 'id' ] ] = $element[ 'default' ];
|
41 |
+
}
|
42 |
}
|
43 |
|
44 |
+
|
45 |
?>
|
46 |
<div class="yith-toggle_wrapper <?php echo $class_wrapper ?>" id="<?php echo $id ?>" data-nonce="<?php echo $ajax_nonce; ?>">
|
47 |
+
<?php
|
48 |
|
49 |
+
if ( $show_add_button ):
|
50 |
|
51 |
+
?>
|
52 |
<button class="yith-add-button yith-add-box-button"
|
53 |
data-box_id="<?php echo $id; ?>_add_box"
|
54 |
data-closed_label="<?php echo esc_attr( $add_button_closed ) ?>"
|
56 |
<div id="<?php echo $id; ?>_add_box" class="yith-add-box">
|
57 |
</div>
|
58 |
<script type="text/template" id="tmpl-yith-toggle-element-add-box-content-<?php echo $id ?>">
|
59 |
+
<?php foreach ( $elements as $element ):
|
60 |
+
$element[ 'title' ] = $element[ 'name' ];
|
61 |
+
|
62 |
+
$element[ 'type' ] = isset( $element[ 'yith-type' ] ) ? $element[ 'yith-type' ] : $element[ 'type' ];
|
63 |
+
unset( $element[ 'yith-type' ] );
|
64 |
+
$element[ 'value' ] = isset( $element[ 'default' ] ) ? $element[ 'default' ] : '';
|
65 |
+
$element[ 'id' ] = 'new_' . $element[ 'id' ];
|
66 |
+
$element[ 'name' ] = $name . "[{{{data.index}}}][" . $element[ 'id' ] . "]";
|
67 |
+
$class_element = isset( $element[ 'class_row' ] ) ? $element[ 'class_row' ] : '';
|
68 |
|
69 |
+
$is_required = !empty( $element[ 'required' ] );
|
70 |
+
if ( $is_required ) {
|
71 |
+
$class_element .= ' yith-plugin-fw--required';
|
72 |
+
}
|
73 |
+
?>
|
74 |
+
<div class="yith-add-box-row <?php echo $class_element ?> <?php echo '{{{data.index}}}' ?>">
|
|
|
|
|
75 |
|
76 |
+
<label for="<?php echo $element[ 'id' ]; ?>"><?php echo( $element[ 'title' ] ); ?></label>
|
77 |
<div class="yith-plugin-fw-option-with-description">
|
78 |
+
<?php
|
79 |
+
echo yith_plugin_fw_get_field( $element, true ); ?>
|
80 |
+
<span class="description"><?php echo !empty( $element[ 'desc' ] ) ? $element[ 'desc' ] : ''; ?></span>
|
81 |
</div>
|
82 |
</div>
|
83 |
+
<?php endforeach; ?>
|
84 |
|
85 |
+
<?php if( !empty( $save_button ) ) : ?>
|
86 |
<div class="yith-add-box-buttons">
|
87 |
<button class="button-primary yith-save-button">
|
88 |
+
<?php echo $save_button[ 'name' ]; ?>
|
89 |
</button>
|
90 |
</div>
|
91 |
+
<?php endif; ?>
|
92 |
</script>
|
93 |
+
<?php endif; ?>
|
94 |
|
95 |
<div class="yith-toggle-elements">
|
96 |
+
<?php
|
97 |
+
if ( $values ):
|
98 |
+
//print toggle elements
|
99 |
+
foreach ( $values as $i => $value ):
|
100 |
+
$title_element = yith_format_toggle_title( $title, $value );
|
101 |
+
$title_element = apply_filters( 'yith_plugin_fw_toggle_element_title_' . $id, $title_element, $elements, $value );
|
102 |
+
$subtitle_element = yith_format_toggle_title( $subtitle, $value );
|
103 |
+
$subtitle_element = apply_filters( 'yith_plugin_fw_toggle_element_subtitle_' . $id, $subtitle_element, $elements, $value );
|
104 |
+
?>
|
105 |
|
106 |
+
<div id="<?php echo $id; ?>_<?php echo $i; ?>"
|
107 |
+
class="yith-toggle-row <?php echo !empty( $subtitle ) ? 'with-subtitle' : ''; ?> <?php echo $class; ?>" <?php echo $custom_attributes; ?>
|
108 |
+
data-item_key="<?php echo esc_attr( $i ) ?>">
|
109 |
+
<div class="yith-toggle-title">
|
110 |
+
<h3>
|
111 |
<span class="title"
|
112 |
data-title_format="<?php echo esc_attr( $title ) ?>"><?php echo $title_element ?></span>
|
113 |
+
<?php if ( !empty( $subtitle_element ) ): ?>
|
114 |
+
<div class="subtitle"
|
115 |
+
data-subtitle_format="<?php echo esc_attr( $subtitle ) ?>"><?php echo $subtitle_element; ?></div>
|
116 |
+
<?php endif; ?>
|
117 |
+
</h3>
|
118 |
+
<span class="yith-toggle">
|
119 |
<span class="yith-icon yith-icon-arrow_right ui-sortable-handle"></span>
|
120 |
</span>
|
121 |
+
<?php
|
122 |
+
if ( !empty( $onoff_field ) && is_array( $onoff_field ) ):
|
123 |
+
$action = !empty( $onoff_field[ 'ajax_action' ] ) ? 'data-ajax_action="' . $onoff_field[ 'ajax_action' ] . '"' : '';
|
124 |
+
$onoff_field[ 'value' ] = isset( $value[ $onoff_id ] ) ? $value[ $onoff_id ] : $onoff_field[ 'default' ];
|
125 |
+
$onoff_field[ 'type' ] = 'onoff';
|
126 |
+
$onoff_field[ 'name' ] = $name . "[$i][" . $onoff_id . "]";
|
127 |
+
$onoff_field[ 'id' ] = $onoff_id . '_' . $i;
|
128 |
+
unset( $onoff_field[ 'yith-type' ] );
|
129 |
+
?>
|
130 |
+
<span class="yith-toggle-onoff" <?php echo $action; ?> >
|
131 |
<?php
|
132 |
echo yith_plugin_fw_get_field( $onoff_field, true );
|
133 |
?>
|
134 |
</span>
|
135 |
|
136 |
+
<?php if ( $sortable ): ?>
|
137 |
+
<span class="yith-icon yith-icon-drag"></span>
|
138 |
+
<?php endif ?>
|
139 |
|
140 |
+
<?php endif; ?>
|
141 |
+
</div>
|
142 |
+
<div class="yith-toggle-content">
|
143 |
+
<?php
|
144 |
+
if ( $elements && count( $elements ) > 0 ) {
|
145 |
+
foreach ( $elements as $element ):
|
146 |
+
$element[ 'type' ] = isset( $element[ 'yith-type' ] ) ? $element[ 'yith-type' ] : $element[ 'type' ];
|
147 |
+
unset( $element[ 'yith-type' ] );
|
148 |
+
$element[ 'title' ] = $element[ 'name' ];
|
149 |
+
$element[ 'name' ] = $name . "[$i][" . $element[ 'id' ] . "]";
|
150 |
+
$element[ 'value' ] = isset( $value[ $element[ 'id' ] ] ) ? $value[ $element[ 'id' ] ] : $element[ 'default' ];
|
151 |
+
$element[ 'id' ] = $element[ 'id' ] . '_' . $i;
|
152 |
+
$element[ 'class_row' ] = isset( $element[ 'class_row' ] ) ? $element[ 'class_row' ] : '';
|
153 |
+
|
154 |
+
$is_required = !empty( $element[ 'required' ] );
|
155 |
+
if ( $is_required ) {
|
156 |
+
$element[ 'class_row' ] .= ' yith-plugin-fw--required';
|
157 |
+
}
|
158 |
+
?>
|
159 |
+
<div class="yith-toggle-content-row <?php echo $element[ 'class_row' ] . ' ' . $element[ 'type' ] ?>">
|
160 |
+
<label for="<?php echo $element[ 'id' ]; ?>"><?php echo $element[ 'title' ]; ?></label>
|
161 |
+
<div class="yith-plugin-fw-option-with-description">
|
162 |
+
<?php echo yith_plugin_fw_get_field( $element, true ); ?>
|
163 |
+
<span class="description"><?php echo !empty( $element[ 'desc' ] ) ? $element[ 'desc' ] : ''; ?></span>
|
164 |
+
</div>
|
165 |
</div>
|
166 |
+
<?php endforeach;
|
167 |
+
}
|
168 |
+
?>
|
169 |
+
<div class="yith-toggle-content-buttons">
|
170 |
+
<div class="spinner"></div>
|
171 |
+
<?php
|
172 |
+
if ( $save_button && !empty( $save_button[ 'id' ] ) ):
|
173 |
+
$save_button_class = isset( $save_button[ 'class' ] ) ? $save_button[ 'class' ] : '';
|
174 |
+
$save_button_name = isset( $save_button[ 'name' ] ) ? $save_button[ 'name' ] : '';
|
175 |
+
?>
|
176 |
+
<button id="<?php echo $save_button[ 'id' ]; ?>"
|
177 |
+
class="yith-save-button <?php echo $save_button_class; ?>">
|
178 |
+
<?php echo $save_button_name; ?>
|
179 |
+
</button>
|
180 |
+
<?php endif; ?>
|
181 |
+
<?php
|
182 |
+
if ( $delete_button && !empty( $delete_button[ 'id' ] ) ):
|
183 |
+
$delete_button_class = isset( $delete_button[ 'class' ] ) ? $delete_button[ 'class' ] : '';
|
184 |
+
$delete_button_name = isset( $delete_button[ 'name' ] ) ? $delete_button[ 'name' ] : '';
|
185 |
+
?>
|
186 |
+
<button id="<?php echo $delete_button[ 'id' ]; ?>"
|
187 |
+
class="button-secondary yith-delete-button <?php echo $delete_button_class; ?>">
|
188 |
+
<?php echo $delete_button_name; ?>
|
189 |
+
</button>
|
190 |
+
<?php endif; ?>
|
191 |
+
</div>
|
192 |
</div>
|
|
|
193 |
|
194 |
+
</div>
|
195 |
+
<?php endforeach;
|
196 |
+
endif;
|
197 |
+
?>
|
198 |
|
199 |
|
200 |
</div>
|
201 |
<!-- Schedule Item template -->
|
202 |
<script type="text/template" id="tmpl-yith-toggle-element-item-<?php echo $id ?>">
|
203 |
<div id="<?php echo $id; ?>_{{{data.index}}}"
|
204 |
+
class="yith-toggle-row highlight <?php echo !empty( $subtitle ) ? 'with-subtitle' : ''; ?> <?php echo $class; ?>"
|
205 |
data-item_key="{{{data.index}}}" <?php echo $custom_attributes; ?>
|
206 |
data-item_key="{{{data.index}}}">
|
207 |
<div class="yith-toggle-title">
|
208 |
<h3>
|
209 |
<span class="title" data-title_format="<?php echo esc_attr( $title ) ?>"><?php echo $title ?></span>
|
210 |
|
211 |
+
<div class="subtitle"
|
212 |
+
data-subtitle_format="<?php echo esc_attr( $subtitle ) ?>"><?php echo $subtitle ?></div>
|
213 |
|
214 |
</h3>
|
215 |
<span class="yith-toggle">
|
216 |
<span class="yith-icon yith-icon-arrow_right"></span>
|
217 |
</span>
|
218 |
+
<?php
|
219 |
+
if ( !empty( $onoff_field ) && is_array( $onoff_field ) ):
|
220 |
+
$action = !empty( $onoff_field[ 'ajax_action' ] ) ? 'data-ajax_action="' . $onoff_field[ 'ajax_action' ] . '"' : '';
|
221 |
+
$onoff_field[ 'value' ] = $onoff_field[ 'default' ];
|
222 |
+
$onoff_field[ 'type' ] = 'onoff';
|
223 |
+
$onoff_field[ 'name' ] = $name . "[{{{data.index}}}][" . $onoff_id . "]";
|
224 |
+
$onoff_field[ 'id' ] = $onoff_id;
|
225 |
+
unset( $onoff_field[ 'yith-type' ] );
|
226 |
+
?>
|
227 |
<span class="yith-toggle-onoff" <?php echo $action; ?> >
|
228 |
<?php
|
229 |
echo yith_plugin_fw_get_field( $onoff_field, true );
|
230 |
?>
|
231 |
</span>
|
232 |
|
233 |
+
<?php endif; ?>
|
234 |
+
<?php if ( $sortable ): ?>
|
235 |
<span class="yith-icon yith-icon-drag ui-sortable-handle"></span>
|
236 |
+
<?php endif ?>
|
237 |
</div>
|
238 |
<div class="yith-toggle-content">
|
239 |
+
<?php
|
240 |
+
if ( $elements && count( $elements ) > 0 ) {
|
241 |
+
foreach ( $elements as $element ):
|
242 |
+
$element[ 'type' ] = isset( $element[ 'yith-type' ] ) ? $element[ 'yith-type' ] : $element[ 'type' ];
|
243 |
+
unset( $element[ 'yith-type' ] );
|
244 |
+
$element[ 'title' ] = $element[ 'name' ];
|
245 |
+
$element[ 'name' ] = $name . "[{{{data.index}}}][" . $element[ 'id' ] . "]";
|
246 |
+
$element[ 'id' ] = $element[ 'id' ] . '_{{{data.index}}}';
|
247 |
+
$class_element = isset( $element[ 'class_row' ] ) ? $element[ 'class_row' ] : '';
|
248 |
+
$is_required = !empty( $element[ 'required' ] );
|
249 |
+
if ( $is_required ) {
|
250 |
+
$class_element .= ' yith-plugin-fw--required';
|
251 |
+
}
|
252 |
+
?>
|
253 |
+
<div class="yith-toggle-content-row <?php echo $class_element . ' ' . $element[ 'type' ] ?>">
|
254 |
+
<label for="<?php echo $element[ 'id' ]; ?>"><?php echo $element[ 'title' ]; ?></label>
|
255 |
<div class="yith-plugin-fw-option-with-description">
|
256 |
+
<?php echo yith_plugin_fw_get_field( $element, true ); ?>
|
257 |
+
<span class="description"><?php echo !empty( $element[ 'desc' ] ) ? $element[ 'desc' ] : ''; ?></span>
|
258 |
</div>
|
259 |
</div>
|
260 |
+
<?php endforeach;
|
261 |
+
}
|
262 |
+
?>
|
263 |
<div class="yith-toggle-content-buttons">
|
264 |
<div class="spinner"></div>
|
265 |
+
<?php
|
266 |
+
if ( $save_button && !empty( $save_button[ 'id' ] ) ):
|
267 |
+
$save_button_class = isset( $save_button[ 'class' ] ) ? $save_button[ 'class' ] : '';
|
268 |
+
$save_button_name = isset( $save_button[ 'name' ] ) ? $save_button[ 'name' ] : '';
|
269 |
+
?>
|
270 |
+
<button id="<?php echo $save_button[ 'id' ]; ?>"
|
271 |
class="yith-save-button <?php echo $save_button_class; ?>">
|
272 |
+
<?php echo $save_button_name; ?>
|
273 |
</button>
|
274 |
+
<?php endif; ?>
|
275 |
+
<?php
|
276 |
+
if ( $delete_button && !empty( $delete_button[ 'id' ] ) ):
|
277 |
+
$delete_button_class = isset( $delete_button[ 'class' ] ) ? $delete_button[ 'class' ] : '';
|
278 |
+
$delete_button_name = isset( $delete_button[ 'name' ] ) ? $delete_button[ 'name' ] : '';
|
279 |
?>
|
280 |
+
<button id="<?php echo $delete_button[ 'id' ]; ?>"
|
281 |
class="button-secondary yith-delete-button <?php echo $delete_button_class; ?>">
|
282 |
+
<?php echo $delete_button_name; ?>
|
283 |
</button>
|
284 |
+
<?php endif; ?>
|
285 |
</div>
|
286 |
</div>
|
287 |
</div>
|
plugin-fw/templates/fields/upload.php
CHANGED
@@ -14,15 +14,17 @@
|
|
14 |
|
15 |
extract( $field );
|
16 |
?>
|
17 |
-
<div
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
24 |
</div>
|
25 |
-
<input type="text" id="<?php echo $id ?>" name="<?php echo $name ?>" value="<?php echo esc_attr( $value ) ?>" <?php if ( isset( $default ) ) : ?>data-std="<?php echo $default ?>"<?php endif ?> class="yith-plugin-fw-upload-img-url"/>
|
26 |
-
<button class="button-secondary yith-plugin-fw-upload-button" id="<?php echo $id ?>-button"><?php _e( 'Upload', 'yith-plugin-fw' ) ?></button>
|
27 |
-
<button type="button" id="<?php echo $id ?>-button-reset" class="yith-plugin-fw-upload-button-reset button"
|
28 |
-
data-default="<?php echo isset( $default ) ? $default : '' ?>"><?php _e( 'Reset', 'yith-plugin-fw' ) ?></button>
|
14 |
|
15 |
extract( $field );
|
16 |
?>
|
17 |
+
<div class="yith-plugin-fw-upload-container <?php echo !empty( $class ) ? $class : ''; ?>">
|
18 |
+
<div class="yith-plugin-fw-upload-img-preview" style="margin-top:10px;">
|
19 |
+
<?php
|
20 |
+
$file = $value;
|
21 |
+
if ( preg_match( '/(jpg|jpeg|png|gif|ico)$/', $file ) ) {
|
22 |
+
echo "<img src='$file' style='max-width:600px; max-height:300px;' />";
|
23 |
+
}
|
24 |
+
?>
|
25 |
+
</div>
|
26 |
+
<input type="text" id="<?php echo $id ?>" name="<?php echo $name ?>" value="<?php echo esc_attr( $value ) ?>" <?php if ( isset( $default ) ) : ?>data-std="<?php echo $default ?>"<?php endif ?> class="yith-plugin-fw-upload-img-url"/>
|
27 |
+
<button class="button-secondary yith-plugin-fw-upload-button" id="<?php echo $id ?>-button"><?php _e( 'Upload', 'yith-plugin-fw' ) ?></button>
|
28 |
+
<button type="button" id="<?php echo $id ?>-button-reset" class="yith-plugin-fw-upload-button-reset button"
|
29 |
+
data-default="<?php echo isset( $default ) ? $default : '' ?>"><?php _e( 'Reset', 'yith-plugin-fw' ) ?></button>
|
30 |
</div>
|
|
|
|
|
|
|
|
plugin-fw/templates/metaboxes/field-row.php
CHANGED
@@ -1,14 +1,12 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
* This file belongs to the YIT Plugin Framework.
|
4 |
-
*
|
5 |
* This source file is subject to the GNU GENERAL PUBLIC LICENSE (GPL 3.0)
|
6 |
* that is bundled with this package in the file LICENSE.txt.
|
7 |
* It is also available through the world-wide-web at this URL:
|
8 |
* http://www.gnu.org/licenses/gpl-3.0.txt
|
9 |
*
|
10 |
* @var array $field
|
11 |
-
*
|
12 |
* [Important Note] the stored value is:
|
13 |
* - array if WooCommerce version >= 3.0.0
|
14 |
* - string (comma-separated) otherwise
|
@@ -31,9 +29,15 @@ $default_field = array(
|
|
31 |
$field = wp_parse_args( $field, $default_field );
|
32 |
|
33 |
$display_field_only = isset( $field[ 'display-field-only' ] ) ? $field[ 'display-field-only' ] : false;
|
|
|
|
|
|
|
|
|
|
|
|
|
34 |
|
35 |
?>
|
36 |
-
<div id="<?php echo $field[ 'id' ] ?>-container" <?php echo yith_field_deps_data( $field ); ?> class="yith-plugin-fw-metabox-field-row">
|
37 |
<?php if ( $display_field_only ) :
|
38 |
yith_plugin_fw_get_field( $field, true );
|
39 |
else: ?>
|
1 |
<?php
|
2 |
/**
|
3 |
* This file belongs to the YIT Plugin Framework.
|
|
|
4 |
* This source file is subject to the GNU GENERAL PUBLIC LICENSE (GPL 3.0)
|
5 |
* that is bundled with this package in the file LICENSE.txt.
|
6 |
* It is also available through the world-wide-web at this URL:
|
7 |
* http://www.gnu.org/licenses/gpl-3.0.txt
|
8 |
*
|
9 |
* @var array $field
|
|
|
10 |
* [Important Note] the stored value is:
|
11 |
* - array if WooCommerce version >= 3.0.0
|
12 |
* - string (comma-separated) otherwise
|
29 |
$field = wp_parse_args( $field, $default_field );
|
30 |
|
31 |
$display_field_only = isset( $field[ 'display-field-only' ] ) ? $field[ 'display-field-only' ] : false;
|
32 |
+
$is_required = !empty( $field[ 'required' ] );
|
33 |
+
|
34 |
+
$extra_row_classes = $is_required ? array( 'yith-plugin-fw--required' ) : array();
|
35 |
+
$extra_row_classes = apply_filters( 'yith_plugin_fw_metabox_extra_row_classes', $extra_row_classes, $field );
|
36 |
+
$extra_row_classes = is_array( $extra_row_classes ) ? implode( ' ', $extra_row_classes ) : '';
|
37 |
+
|
38 |
|
39 |
?>
|
40 |
+
<div id="<?php echo $field[ 'id' ] ?>-container" <?php echo yith_field_deps_data( $field ); ?> class="yith-plugin-fw-metabox-field-row <?php echo $extra_row_classes ?>">
|
41 |
<?php if ( $display_field_only ) :
|
42 |
yith_plugin_fw_get_field( $field, true );
|
43 |
else: ?>
|
plugin-fw/templates/metaboxes/tab.php
CHANGED
@@ -1,11 +1,13 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
* This file belongs to the YIT Plugin Framework.
|
4 |
-
*
|
5 |
* This source file is subject to the GNU GENERAL PUBLIC LICENSE (GPL 3.0)
|
6 |
* that is bundled with this package in the file LICENSE.txt.
|
7 |
* It is also available through the world-wide-web at this URL:
|
8 |
* http://www.gnu.org/licenses/gpl-3.0.txt
|
|
|
|
|
|
|
9 |
*/
|
10 |
|
11 |
if ( !defined( 'ABSPATH' ) ) {
|
@@ -13,16 +15,16 @@ if ( !defined( 'ABSPATH' ) ) {
|
|
13 |
} // Exit if accessed directly
|
14 |
|
15 |
global $post;
|
16 |
-
$classes = apply_filters('yith_plugin_fw_metabox_class',
|
17 |
$classes = yith_plugin_fw_remove_duplicate_classes( $classes );
|
18 |
|
19 |
do_action( 'yit_before_metaboxes_tab' ) ?>
|
20 |
-
<div class="yith-plugin-fw metaboxes-tab <?php echo
|
21 |
<?php do_action( 'yit_before_metaboxes_labels' ) ?>
|
22 |
<ul class="metaboxes-tabs clearfix"<?php if ( count( $tabs ) <= 1 ) : ?> style="display:none;"<?php endif; ?>>
|
23 |
<?php
|
24 |
$i = 0;
|
25 |
-
foreach ( $tabs as $key
|
26 |
if ( !isset( $tab[ 'fields' ] ) || empty( $tab[ 'fields' ] ) ) {
|
27 |
continue;
|
28 |
}
|
@@ -54,7 +56,7 @@ do_action( 'yit_before_metaboxes_tab' ) ?>
|
|
54 |
// Use nonce for verification
|
55 |
wp_nonce_field( 'metaboxes-fields-nonce', 'yit_metaboxes_nonce' );
|
56 |
?>
|
57 |
-
<?php foreach ( $tabs as $key=> $tab ) :
|
58 |
|
59 |
?>
|
60 |
<div class="tabs-panel" id="<?php echo urldecode( $key ) ?>">
|
@@ -71,11 +73,11 @@ do_action( 'yit_before_metaboxes_tab' ) ?>
|
|
71 |
if ( $pos = strpos( $field_name, ']' ) ) {
|
72 |
$field_name = substr_replace( $field_name, '', $pos, 1 );
|
73 |
}
|
74 |
-
$value
|
75 |
-
$field[ 'value' ]
|
76 |
-
|
77 |
-
$container_classes
|
78 |
-
$container_classes
|
79 |
|
80 |
?>
|
81 |
<div class="<?php echo $container_classes ?>">
|
@@ -83,7 +85,7 @@ do_action( 'yit_before_metaboxes_tab' ) ?>
|
|
83 |
if ( $field_template_path = yith_plugin_fw_get_field_template_path( $field ) ) {
|
84 |
$display_row = 'hidden' !== $field[ 'type' ];
|
85 |
$display_row = isset( $field[ 'yith-display-row' ] ) ? !!$field[ 'yith-display-row' ] : $display_row;
|
86 |
-
$field[ 'display-field-only' ] = in_array( $field[ 'type' ], array( 'hidden', 'html', 'sep', 'simple-text', 'title') );
|
87 |
|
88 |
if ( $display_row ) {
|
89 |
|
@@ -110,4 +112,6 @@ do_action( 'yit_before_metaboxes_tab' ) ?>
|
|
110 |
<?php endforeach ?>
|
111 |
</div>
|
112 |
<?php endforeach ?>
|
113 |
-
</div>
|
|
|
|
1 |
<?php
|
2 |
/**
|
3 |
* This file belongs to the YIT Plugin Framework.
|
|
|
4 |
* This source file is subject to the GNU GENERAL PUBLIC LICENSE (GPL 3.0)
|
5 |
* that is bundled with this package in the file LICENSE.txt.
|
6 |
* It is also available through the world-wide-web at this URL:
|
7 |
* http://www.gnu.org/licenses/gpl-3.0.txt
|
8 |
+
*
|
9 |
+
* @var array $tabs
|
10 |
+
* @var string $class
|
11 |
*/
|
12 |
|
13 |
if ( !defined( 'ABSPATH' ) ) {
|
15 |
} // Exit if accessed directly
|
16 |
|
17 |
global $post;
|
18 |
+
$classes = apply_filters( 'yith_plugin_fw_metabox_class', $class, $post );
|
19 |
$classes = yith_plugin_fw_remove_duplicate_classes( $classes );
|
20 |
|
21 |
do_action( 'yit_before_metaboxes_tab' ) ?>
|
22 |
+
<div class="yith-plugin-fw metaboxes-tab <?php echo esc_attr( $classes ) ?>">
|
23 |
<?php do_action( 'yit_before_metaboxes_labels' ) ?>
|
24 |
<ul class="metaboxes-tabs clearfix"<?php if ( count( $tabs ) <= 1 ) : ?> style="display:none;"<?php endif; ?>>
|
25 |
<?php
|
26 |
$i = 0;
|
27 |
+
foreach ( $tabs as $key => $tab ) :
|
28 |
if ( !isset( $tab[ 'fields' ] ) || empty( $tab[ 'fields' ] ) ) {
|
29 |
continue;
|
30 |
}
|
56 |
// Use nonce for verification
|
57 |
wp_nonce_field( 'metaboxes-fields-nonce', 'yit_metaboxes_nonce' );
|
58 |
?>
|
59 |
+
<?php foreach ( $tabs as $key => $tab ) :
|
60 |
|
61 |
?>
|
62 |
<div class="tabs-panel" id="<?php echo urldecode( $key ) ?>">
|
73 |
if ( $pos = strpos( $field_name, ']' ) ) {
|
74 |
$field_name = substr_replace( $field_name, '', $pos, 1 );
|
75 |
}
|
76 |
+
$value = yit_get_post_meta( $post->ID, $field_name );
|
77 |
+
$field[ 'value' ] = $value != '' ? $value : ( isset( $field[ 'std' ] ) ? $field[ 'std' ] : '' );
|
78 |
+
$field[ 'checkboxgroup' ] = ( $field[ 'type' ] == 'checkbox' && isset( $field[ 'checkboxgroup' ] ) ) ? " " . $field[ 'checkboxgroup' ] : "";
|
79 |
+
$container_classes = "the-metabox " . $field[ 'type' ] . $field[ 'checkboxgroup' ] . " clearfix ";
|
80 |
+
$container_classes .= empty( $field[ 'label' ] ) ? 'no-label' : '';
|
81 |
|
82 |
?>
|
83 |
<div class="<?php echo $container_classes ?>">
|
85 |
if ( $field_template_path = yith_plugin_fw_get_field_template_path( $field ) ) {
|
86 |
$display_row = 'hidden' !== $field[ 'type' ];
|
87 |
$display_row = isset( $field[ 'yith-display-row' ] ) ? !!$field[ 'yith-display-row' ] : $display_row;
|
88 |
+
$field[ 'display-field-only' ] = in_array( $field[ 'type' ], array( 'hidden', 'html', 'sep', 'simple-text', 'title', 'list-table' ) );
|
89 |
|
90 |
if ( $display_row ) {
|
91 |
|
112 |
<?php endforeach ?>
|
113 |
</div>
|
114 |
<?php endforeach ?>
|
115 |
+
</div>
|
116 |
+
|
117 |
+
<?php do_action( 'yit_after_metaboxes_tab' );
|
plugin-fw/templates/panel/sub-tabs-nav.php
ADDED
@@ -0,0 +1,46 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* This file belongs to the YIT Plugin Framework.
|
4 |
+
* This source file is subject to the GNU GENERAL PUBLIC LICENSE (GPL 3.0)
|
5 |
+
* that is bundled with this package in the file LICENSE.txt.
|
6 |
+
* It is also available through the world-wide-web at this URL:
|
7 |
+
* http://www.gnu.org/licenses/gpl-3.0.txt
|
8 |
+
*
|
9 |
+
* @var array $sub_tabs
|
10 |
+
* @var string $current_tab
|
11 |
+
* @var string $current_sub_tab
|
12 |
+
* @var string $page
|
13 |
+
*/
|
14 |
+
!defined( 'ABSPATH' ) && exit; // Exit if accessed directly
|
15 |
+
|
16 |
+
?>
|
17 |
+
<?php if ( !empty( $sub_tabs ) ): ?>
|
18 |
+
<div class="yith-plugin-fw-sub-tabs-nav">
|
19 |
+
<h3 class="nav-tab-wrapper yith-nav-sub-tab-wrapper">
|
20 |
+
<?php foreach ( $sub_tabs as $_key => $_tab ):
|
21 |
+
$_defaults = array(
|
22 |
+
'title' => '',
|
23 |
+
'class' => '',
|
24 |
+
'icon' => '',
|
25 |
+
'url' => $this->get_nav_url( $page, $current_tab, $_key )
|
26 |
+
);
|
27 |
+
$_tab = (object) wp_parse_args( $_tab, $_defaults );
|
28 |
+
|
29 |
+
if ( is_array( $_tab->class ) ) {
|
30 |
+
$_tab->class = implode( ' ', $_tab->class );
|
31 |
+
}
|
32 |
+
|
33 |
+
if ( $current_sub_tab === $_key ) {
|
34 |
+
$_tab->class = 'nav-tab-active ' . $_tab->class;
|
35 |
+
}
|
36 |
+
?>
|
37 |
+
<a href="<?php echo $_tab->url ?>" class="yith-nav-sub-tab nav-tab <?php echo $_tab->class ?>">
|
38 |
+
<span class="yith-nav-sub-tab__title"><?php echo $_tab->title; ?></span>
|
39 |
+
<?php if ( $_tab->icon ) : ?>
|
40 |
+
<span class="yith-nav-sub-tab__icon yith-icon-<?php echo $_tab->icon ?>"></span>
|
41 |
+
<?php endif; ?>
|
42 |
+
</a>
|
43 |
+
<?php endforeach; ?>
|
44 |
+
</h3>
|
45 |
+
</div>
|
46 |
+
<?php endif; ?>
|
plugin-fw/templates/panel/woocommerce/woocommerce-form.php
CHANGED
@@ -1,9 +1,12 @@
|
|
1 |
<?php
|
|
|
|
|
|
|
2 |
$panel_content_class = apply_filters( 'yit_admin_panel_content_class', 'yit-admin-panel-content-wrap' );
|
3 |
?>
|
4 |
|
5 |
-
<div id="<?php echo $this->settings[ 'page' ] ?>_<?php echo $
|
6 |
-
<?php do_action( 'yit_framework_before_print_wc_panel_content', $
|
7 |
<div class="<?php echo $panel_content_class; ?>">
|
8 |
<form id="plugin-fw-wc" method="post">
|
9 |
<?php $this->add_fields() ?>
|
@@ -18,5 +21,5 @@ $panel_content_class = apply_filters( 'yit_admin_panel_content_class', 'yit-admi
|
|
18 |
onclick="return confirm('<?php echo $warning . '\n' . __( 'Are you sure?', 'yith-plugin-fw' ) ?>');"/>
|
19 |
</form>
|
20 |
</div>
|
21 |
-
<?php do_action( 'yit_framework_after_print_wc_panel_content', $
|
22 |
</div>
|
1 |
<?php
|
2 |
+
/**
|
3 |
+
* @var string $option_key
|
4 |
+
*/
|
5 |
$panel_content_class = apply_filters( 'yit_admin_panel_content_class', 'yit-admin-panel-content-wrap' );
|
6 |
?>
|
7 |
|
8 |
+
<div id="<?php echo $this->settings[ 'page' ] ?>_<?php echo $option_key ?>" class="yith-plugin-fw yit-admin-panel-container">
|
9 |
+
<?php do_action( 'yit_framework_before_print_wc_panel_content', $option_key ); ?>
|
10 |
<div class="<?php echo $panel_content_class; ?>">
|
11 |
<form id="plugin-fw-wc" method="post">
|
12 |
<?php $this->add_fields() ?>
|
21 |
onclick="return confirm('<?php echo $warning . '\n' . __( 'Are you sure?', 'yith-plugin-fw' ) ?>');"/>
|
22 |
</form>
|
23 |
</div>
|
24 |
+
<?php do_action( 'yit_framework_after_print_wc_panel_content', $option_key ); ?>
|
25 |
</div>
|
plugin-fw/templates/panel/woocommerce/woocommerce-option-row.php
CHANGED
@@ -12,8 +12,10 @@ $field = wp_parse_args( $field, $default_field );
|
|
12 |
|
13 |
$display_row = !in_array( $field[ 'type' ], array( 'hidden', 'html', 'sep', 'simple-text', 'title', 'list-table' ) );
|
14 |
$display_row = isset( $field[ 'yith-display-row' ] ) ? !!$field[ 'yith-display-row' ] : $display_row;
|
|
|
15 |
|
16 |
-
$extra_row_classes =
|
|
|
17 |
$extra_row_classes = is_array( $extra_row_classes ) ? implode( ' ', $extra_row_classes ) : '';
|
18 |
|
19 |
?>
|
12 |
|
13 |
$display_row = !in_array( $field[ 'type' ], array( 'hidden', 'html', 'sep', 'simple-text', 'title', 'list-table' ) );
|
14 |
$display_row = isset( $field[ 'yith-display-row' ] ) ? !!$field[ 'yith-display-row' ] : $display_row;
|
15 |
+
$is_required = !empty( $field[ 'required' ] );
|
16 |
|
17 |
+
$extra_row_classes = $is_required ? array( 'yith-plugin-fw--required' ) : array();
|
18 |
+
$extra_row_classes = apply_filters( 'yith_plugin_fw_panel_wc_extra_row_classes', $extra_row_classes, $field );
|
19 |
$extra_row_classes = is_array( $extra_row_classes ) ? implode( ' ', $extra_row_classes ) : '';
|
20 |
|
21 |
?>
|
plugin-fw/templates/panel/woocommerce/woocommerce-panel.php
CHANGED
@@ -1,16 +1,9 @@
|
|
1 |
-
<?php add_thickbox()
|
2 |
-
<div class="wrap <?php echo $wrap_class?>">
|
3 |
<div id="icon-users" class="icon32"><br/></div>
|
4 |
-
|
5 |
-
<?php if( !
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
$active_class .= 'premium' == $id ? ' yith-premium ': '';
|
10 |
-
?>
|
11 |
-
<a href="?page=<?php echo $page ?>&tab=<?php echo $id ?>" class="nav-tab <?php echo $active_class ?>"><?php echo $label ?></a>
|
12 |
-
<?php endforeach; ?>
|
13 |
-
</h2>
|
14 |
-
<?php $this->print_panel_content() ?>
|
15 |
-
<?php endif; ?>
|
16 |
</div>
|
1 |
+
<?php add_thickbox(); ?>
|
2 |
+
<div class="wrap <?php echo $wrap_class ?>">
|
3 |
<div id="icon-users" class="icon32"><br/></div>
|
4 |
+
<?php do_action( 'yith_plugin_fw_before_woocommerce_panel', $page ) ?>
|
5 |
+
<?php if ( !empty( $available_tabs ) ) {
|
6 |
+
$this->print_panel_content();
|
7 |
+
}
|
8 |
+
?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9 |
</div>
|
plugin-fw/yit-functions.php
CHANGED
@@ -1,7 +1,6 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
* This file belongs to the YIT Plugin Framework.
|
4 |
-
*
|
5 |
* This source file is subject to the GNU GENERAL PUBLIC LICENSE (GPL 3.0)
|
6 |
* that is bundled with this package in the file LICENSE.txt.
|
7 |
* It is also available through the world-wide-web at this URL:
|
@@ -19,7 +18,6 @@ if ( !function_exists( 'yit_plugin_locate_template' ) ) {
|
|
19 |
* @param string $plugin_basename
|
20 |
* @param string $path
|
21 |
* @param array $var
|
22 |
-
*
|
23 |
* @return string
|
24 |
* @since 2.0.0
|
25 |
*/
|
@@ -48,7 +46,6 @@ if ( !function_exists( 'yit_plugin_get_template' ) ) {
|
|
48 |
* @param string $path
|
49 |
* @param mixed $var
|
50 |
* @param bool $return
|
51 |
-
*
|
52 |
* @return string
|
53 |
* @since 2.0.0
|
54 |
*/
|
@@ -84,7 +81,6 @@ if ( !function_exists( 'yit_plugin_content' ) ) {
|
|
84 |
* @param string $more_text
|
85 |
* @param string $split
|
86 |
* @param string $in_paragraph
|
87 |
-
*
|
88 |
* @return string
|
89 |
* @since 2.0.0
|
90 |
*/
|
@@ -189,7 +185,6 @@ if ( !function_exists( 'yit_plugin_string' ) ) {
|
|
189 |
* @param string $string The main string. If it is empty or null, the functions return null.
|
190 |
* @param string $after What there is after the main string
|
191 |
* @param bool $echo If echo or only return it
|
192 |
-
*
|
193 |
* @return string The complete string, if the main string is not empty or null
|
194 |
* @since 2.0.0
|
195 |
*/
|
@@ -211,15 +206,12 @@ if ( !function_exists( 'yit_plugin_string' ) ) {
|
|
211 |
if ( !function_exists( 'yit_plugin_decode_title' ) ) {
|
212 |
/**
|
213 |
* Change some special characters to put easily html into a string
|
214 |
-
*
|
215 |
* E.G.
|
216 |
* string: This is [my title] with | a new line
|
217 |
* return: This is <span class="title-highlight">my title</span> with <br /> a new line
|
218 |
*
|
219 |
* @param string $title The string to convert
|
220 |
-
*
|
221 |
* @return string The html
|
222 |
-
*
|
223 |
* @since 1.0
|
224 |
*/
|
225 |
function yit_plugin_decode_title( $title ) {
|
@@ -235,9 +227,7 @@ if ( !function_exists( 'yit_plugin_get_attachment_id' ) ) {
|
|
235 |
* Return the ID of an attachment.
|
236 |
*
|
237 |
* @param string $url
|
238 |
-
*
|
239 |
* @return int
|
240 |
-
*
|
241 |
* @since 2.0.0
|
242 |
*/
|
243 |
|
@@ -297,7 +287,6 @@ if ( !function_exists( 'yit_plugin_get_attachment_id' ) ) {
|
|
297 |
if ( !function_exists( 'yit_enqueue_script' ) ) {
|
298 |
/**
|
299 |
* Enqueues script.
|
300 |
-
*
|
301 |
* Registers the script if src provided (does NOT overwrite) and enqueues.
|
302 |
*
|
303 |
* @since 2.0.0
|
@@ -318,7 +307,6 @@ if ( !function_exists( 'yit_enqueue_script' ) ) {
|
|
318 |
if ( !function_exists( 'yit_enqueue_style' ) ) {
|
319 |
/**
|
320 |
* Enqueues style.
|
321 |
-
*
|
322 |
* Registers the style if src provided (does NOT overwrite) and enqueues.
|
323 |
*
|
324 |
* @since 2.0.0
|
@@ -346,12 +334,10 @@ if ( !function_exists( 'yit_enqueue_style' ) ) {
|
|
346 |
if ( !function_exists( 'yit_get_post_meta' ) ) {
|
347 |
/**
|
348 |
* Retrieve the value of a metabox.
|
349 |
-
*
|
350 |
* This function retrieve the value of a metabox attached to a post. It return either a single value or an array.
|
351 |
*
|
352 |
* @param int $id Post ID.
|
353 |
* @param string $meta The meta key to retrieve.
|
354 |
-
*
|
355 |
* @return mixed Single value or array
|
356 |
* @since 2.0.0
|
357 |
*/
|
@@ -382,7 +368,6 @@ if ( !function_exists( 'yit_string' ) ) {
|
|
382 |
* @param string $string The main string. If it is empty or null, the functions return null.
|
383 |
* @param string $after What there is after the main string
|
384 |
* @param bool $echo If echo or only return it
|
385 |
-
*
|
386 |
* @return string The complete string, if the main string is not empty or null
|
387 |
* @since 2.0.0
|
388 |
*/
|
@@ -407,7 +392,6 @@ if ( !function_exists( 'yit_pagination' ) ) {
|
|
407 |
*
|
408 |
* @param string $pages
|
409 |
* @param int $range
|
410 |
-
*
|
411 |
* @return string
|
412 |
* @since 2.0.0
|
413 |
*/
|
@@ -501,7 +485,6 @@ if ( !function_exists( 'yit_layout_option' ) ) {
|
|
501 |
* @param bool $id
|
502 |
* @param string $type
|
503 |
* @param string $model
|
504 |
-
*
|
505 |
* @return array
|
506 |
* @since 2.0.0
|
507 |
*/
|
@@ -550,13 +533,10 @@ if ( !function_exists( 'yit_curPageURL' ) ) {
|
|
550 |
|
551 |
if ( !function_exists( 'yit_get_excluded_categories' ) ) {
|
552 |
/**
|
553 |
-
*
|
554 |
* Retrieve the escluded categories, set on Theme Options
|
555 |
*
|
556 |
* @param int $k
|
557 |
-
*
|
558 |
* @return string String with all id categories excluded, separated by a comma
|
559 |
-
*
|
560 |
* @since 2.0.0
|
561 |
*/
|
562 |
|
@@ -604,7 +584,6 @@ if ( !function_exists( 'yit_add_extra_theme_headers' ) ) {
|
|
604 |
* Check the framework core version
|
605 |
*
|
606 |
* @param $headers Array
|
607 |
-
*
|
608 |
* @return bool
|
609 |
* @since 2.0.0
|
610 |
* @author Andrea Grillo <andrea.grillo@yithemes.com>
|
@@ -677,7 +656,6 @@ if ( !function_exists( 'yit_avoid_duplicate' ) ) {
|
|
677 |
* @param mixed $value
|
678 |
* @param array $array
|
679 |
* @param string $check
|
680 |
-
*
|
681 |
* @return mixed
|
682 |
* @since 2.0.0
|
683 |
* @author Antonino Scarf� <antonino.scarfi@yithemes.com>
|
@@ -707,15 +685,12 @@ if ( !function_exists( 'yit_avoid_duplicate' ) ) {
|
|
707 |
if ( !function_exists( 'yit_title_special_characters' ) ) {
|
708 |
/**
|
709 |
* The chars used in yit_decode_title() and yit_encode_title()
|
710 |
-
*
|
711 |
* E.G.
|
712 |
* string: This is [my title] with | a new line
|
713 |
* return: This is <span class="highlight">my title</span> with <br /> a new line
|
714 |
*
|
715 |
* @param string $title The string to convert
|
716 |
-
*
|
717 |
* @return string The html
|
718 |
-
*
|
719 |
* @since 1.0
|
720 |
*/
|
721 |
function yit_title_special_characters( $chars ) {
|
@@ -731,15 +706,12 @@ if ( !function_exists( 'yit_title_special_characters' ) ) {
|
|
731 |
if ( !function_exists( 'yit_decode_title' ) ) {
|
732 |
/**
|
733 |
* Change some special characters to put easily html into a string
|
734 |
-
*
|
735 |
* E.G.
|
736 |
* string: This is [my title] with | a new line
|
737 |
* return: This is <span class="title-highlight">my title</span> with <br /> a new line
|
738 |
*
|
739 |
* @param string $title The string to convert
|
740 |
-
*
|
741 |
* @return string The html
|
742 |
-
*
|
743 |
* @since 1.0
|
744 |
*/
|
745 |
function yit_decode_title( $title ) {
|
@@ -752,15 +724,12 @@ if ( !function_exists( 'yit_decode_title' ) ) {
|
|
752 |
if ( !function_exists( 'yit_encode_title' ) ) {
|
753 |
/**
|
754 |
* Change some special characters to put easily html into a string
|
755 |
-
*
|
756 |
* E.G.
|
757 |
* string: This is [my title] with | a new line
|
758 |
* return: This is <span class="title-highlight">my title</span> with <br /> a new line
|
759 |
*
|
760 |
* @param string $title The string to convert
|
761 |
-
*
|
762 |
* @return string The html
|
763 |
-
*
|
764 |
* @since 1.0
|
765 |
*/
|
766 |
function yit_encode_title( $title ) {
|
@@ -773,15 +742,12 @@ if ( !function_exists( 'yit_encode_title' ) ) {
|
|
773 |
if ( !function_exists( 'yit_remove_chars_title' ) ) {
|
774 |
/**
|
775 |
* Change some special characters to put easily html into a string
|
776 |
-
*
|
777 |
* E.G.
|
778 |
* string: This is [my title] with | a new line
|
779 |
* return: This is <span class="title-highlight">my title</span> with <br /> a new line
|
780 |
*
|
781 |
* @param string $title The string to convert
|
782 |
-
*
|
783 |
* @return string The html
|
784 |
-
*
|
785 |
* @since 1.0
|
786 |
*/
|
787 |
function yit_remove_chars_title( $title ) {
|
@@ -814,7 +780,6 @@ if ( !function_exists( 'yit_load_js_file' ) ) {
|
|
814 |
* Load .min.js file if WP_Debug is not defined
|
815 |
*
|
816 |
* @param string $filename The file name
|
817 |
-
*
|
818 |
* @return string The file path
|
819 |
* @since 2.0.0
|
820 |
* @author Andrea Grillo <andrea.grillo@yithemes.com>
|
@@ -836,7 +801,6 @@ if ( !function_exists( 'yit_wpml_register_string' ) ) {
|
|
836 |
* @param $contenxt context name
|
837 |
* @param $name string name
|
838 |
* @param $value value to translate
|
839 |
-
*
|
840 |
* @since 2.0.0
|
841 |
* @author Andrea Frascaspata <andrea.frascaspata@yithemes.com>
|
842 |
*/
|
@@ -853,7 +817,6 @@ if ( !function_exists( 'yit_wpml_string_translate' ) ) {
|
|
853 |
* @param $contenxt context name
|
854 |
* @param $name string name
|
855 |
* @param $default_value value to translate
|
856 |
-
*
|
857 |
* @return string the string translated
|
858 |
* @since 2.0.0
|
859 |
* @author Andrea Frascaspata <andrea.frascaspata@yithemes.com>
|
@@ -872,7 +835,6 @@ if ( !function_exists( 'yit_wpml_object_id' ) ) {
|
|
872 |
* @param string $element_type
|
873 |
* @param bool $return_original_if_missing
|
874 |
* @param null|string $ulanguage_code
|
875 |
-
*
|
876 |
* @return int the translation id
|
877 |
* @since 2.0.0
|
878 |
* @author Antonio La Rocca <antonio.larocca@yithemes.com>
|
@@ -895,7 +857,6 @@ if ( !function_exists( 'yith_get_formatted_price' ) ) {
|
|
895 |
*
|
896 |
* @param float $price
|
897 |
* @param array $args (default: array())
|
898 |
-
*
|
899 |
* @return string
|
900 |
*/
|
901 |
function yith_get_formatted_price( $price, $args = array() ) {
|
@@ -928,7 +889,6 @@ if ( !function_exists( 'yith_get_terms' ) ) {
|
|
928 |
* Get terms
|
929 |
*
|
930 |
* @param $args
|
931 |
-
*
|
932 |
* @return array|int|WP_Error
|
933 |
*/
|
934 |
function yith_get_terms( $args ) {
|
@@ -964,7 +924,6 @@ if ( !function_exists( 'yith_panel_field_deps_data' ) ) {
|
|
964 |
/**
|
965 |
* @param $option
|
966 |
* @param YIT_Plugin_Panel|YIT_Plugin_Panel_WooCommerce $panel
|
967 |
-
*
|
968 |
* @return string
|
969 |
*/
|
970 |
function yith_panel_field_deps_data( $option, $panel ) {
|
@@ -986,7 +945,6 @@ if ( !function_exists( 'yith_plugin_fw_get_field' ) ) {
|
|
986 |
* @param array $field
|
987 |
* @param bool $echo
|
988 |
* @param bool $show_container
|
989 |
-
*
|
990 |
* @return string|void
|
991 |
*/
|
992 |
function yith_plugin_fw_get_field( $field, $echo = false, $show_container = true ) {
|
@@ -1167,230 +1125,224 @@ if ( !function_exists( 'yith_plugin_fw_is_panel' ) ) {
|
|
1167 |
}
|
1168 |
}
|
1169 |
|
1170 |
-
if( !
|
1171 |
-
|
1172 |
-
|
1173 |
-
|
1174 |
-
|
1175 |
-
|
1176 |
-
|
1177 |
-
|
1178 |
-
|
1179 |
-
|
1180 |
-
|
1181 |
-
|
1182 |
-
}
|
1183 |
}
|
1184 |
|
1185 |
/* === Gutenberg Support === */
|
1186 |
|
1187 |
-
if( !
|
1188 |
-
|
1189 |
-
|
1190 |
-
|
1191 |
}
|
1192 |
|
1193 |
-
if( !
|
1194 |
-
|
1195 |
-
|
1196 |
-
|
1197 |
-
|
1198 |
-
|
1199 |
-
|
1200 |
-
|
1201 |
-
|
1202 |
-
|
1203 |
-
|
1204 |
-
|
1205 |
-
|
1206 |
-
|
1207 |
-
|
1208 |
-
|
1209 |
-
|
1210 |
-
|
1211 |
-
|
1212 |
-
|
1213 |
-
|
1214 |
-
|
1215 |
-
}
|
1216 |
}
|
1217 |
|
1218 |
-
if( !
|
1219 |
-
|
1220 |
-
|
1221 |
-
|
1222 |
-
|
1223 |
-
|
1224 |
-
|
1225 |
-
|
1226 |
-
|
1227 |
}
|
1228 |
|
1229 |
-
if( !
|
1230 |
-
|
1231 |
-
|
1232 |
-
|
1233 |
-
|
1234 |
-
|
1235 |
-
|
1236 |
-
|
1237 |
-
|
1238 |
}
|
1239 |
|
1240 |
-
if( !
|
1241 |
-
|
1242 |
-
|
1243 |
-
|
1244 |
-
|
1245 |
-
|
1246 |
-
|
1247 |
-
|
1248 |
-
|
1249 |
}
|
1250 |
|
1251 |
-
if ( !
|
1252 |
-
|
1253 |
-
|
1254 |
-
|
1255 |
-
|
1256 |
-
|
1257 |
-
|
1258 |
-
|
1259 |
-
|
1260 |
-
|
1261 |
-
|
1262 |
-
|
1263 |
-
|
1264 |
-
|
1265 |
-
return $new_class . ' ' . $class;
|
1266 |
-
}
|
1267 |
}
|
1268 |
|
1269 |
-
if( !
|
1270 |
-
|
1271 |
-
|
1272 |
-
|
1273 |
-
|
1274 |
-
|
1275 |
-
|
1276 |
-
|
1277 |
-
|
1278 |
-
|
1279 |
-
|
1280 |
-
|
1281 |
-
|
1282 |
-
|
1283 |
-
|
1284 |
-
|
1285 |
-
|
1286 |
-
|
1287 |
-
|
1288 |
-
|
1289 |
-
|
1290 |
-
|
1291 |
-
|
1292 |
-
|
1293 |
-
|
1294 |
-
|
1295 |
-
|
1296 |
-
|
|
|
1297 |
}
|
1298 |
|
1299 |
|
1300 |
-
if( !
|
1301 |
-
|
1302 |
-
|
1303 |
-
|
1304 |
-
|
1305 |
-
|
1306 |
-
|
1307 |
-
|
1308 |
-
|
1309 |
-
|
1310 |
-
|
1311 |
-
|
1312 |
-
|
1313 |
-
|
1314 |
-
|
1315 |
-
|
1316 |
-
|
1317 |
-
|
1318 |
-
|
1319 |
-
|
1320 |
-
|
1321 |
-
|
1322 |
}
|
1323 |
|
1324 |
-
if( !
|
1325 |
-
|
1326 |
-
|
1327 |
-
|
1328 |
-
|
1329 |
-
|
1330 |
-
|
1331 |
-
|
1332 |
-
|
1333 |
-
|
1334 |
-
|
1335 |
-
|
1336 |
-
|
1337 |
-
|
1338 |
-
|
1339 |
-
|
1340 |
-
|
1341 |
-
|
1342 |
-
|
1343 |
-
|
1344 |
-
|
1345 |
-
|
1346 |
-
|
1347 |
-
|
1348 |
-
|
1349 |
-
|
1350 |
-
|
1351 |
-
|
1352 |
-
|
1353 |
-
|
1354 |
-
|
1355 |
-
|
1356 |
-
|
1357 |
-
|
1358 |
-
|
1359 |
-
|
1360 |
-
|
1361 |
-
|
1362 |
-
}
|
1363 |
}
|
1364 |
|
1365 |
-
if ( !
|
1366 |
-
|
1367 |
-
|
1368 |
-
|
1369 |
-
|
1370 |
-
|
1371 |
-
|
1372 |
-
|
1373 |
-
|
1374 |
-
|
1375 |
-
|
1376 |
-
|
1377 |
-
|
1378 |
-
|
1379 |
-
|
1380 |
-
|
1381 |
-
|
1382 |
-
|
1383 |
-
return $classes;
|
1384 |
-
}
|
1385 |
}
|
1386 |
|
1387 |
-
if ( !
|
1388 |
|
1389 |
-
|
1390 |
-
|
1391 |
-
|
1392 |
|
1393 |
|
1394 |
-
|
1395 |
-
|
1396 |
}
|
1 |
<?php
|
2 |
/**
|
3 |
* This file belongs to the YIT Plugin Framework.
|
|
|
4 |
* This source file is subject to the GNU GENERAL PUBLIC LICENSE (GPL 3.0)
|
5 |
* that is bundled with this package in the file LICENSE.txt.
|
6 |
* It is also available through the world-wide-web at this URL:
|
18 |
* @param string $plugin_basename
|
19 |
* @param string $path
|
20 |
* @param array $var
|
|
|
21 |
* @return string
|
22 |
* @since 2.0.0
|
23 |
*/
|
46 |
* @param string $path
|
47 |
* @param mixed $var
|
48 |
* @param bool $return
|
|
|
49 |
* @return string
|
50 |
* @since 2.0.0
|
51 |
*/
|
81 |
* @param string $more_text
|
82 |
* @param string $split
|
83 |
* @param string $in_paragraph
|
|
|
84 |
* @return string
|
85 |
* @since 2.0.0
|
86 |
*/
|
185 |
* @param string $string The main string. If it is empty or null, the functions return null.
|
186 |
* @param string $after What there is after the main string
|
187 |
* @param bool $echo If echo or only return it
|
|
|
188 |
* @return string The complete string, if the main string is not empty or null
|
189 |
* @since 2.0.0
|
190 |
*/
|
206 |
if ( !function_exists( 'yit_plugin_decode_title' ) ) {
|
207 |
/**
|
208 |
* Change some special characters to put easily html into a string
|
|
|
209 |
* E.G.
|
210 |
* string: This is [my title] with | a new line
|
211 |
* return: This is <span class="title-highlight">my title</span> with <br /> a new line
|
212 |
*
|
213 |
* @param string $title The string to convert
|
|
|
214 |
* @return string The html
|
|
|
215 |
* @since 1.0
|
216 |
*/
|
217 |
function yit_plugin_decode_title( $title ) {
|
227 |
* Return the ID of an attachment.
|
228 |
*
|
229 |
* @param string $url
|
|
|
230 |
* @return int
|
|
|
231 |
* @since 2.0.0
|
232 |
*/
|
233 |
|
287 |
if ( !function_exists( 'yit_enqueue_script' ) ) {
|
288 |
/**
|
289 |
* Enqueues script.
|
|
|
290 |
* Registers the script if src provided (does NOT overwrite) and enqueues.
|
291 |
*
|
292 |
* @since 2.0.0
|
307 |
if ( !function_exists( 'yit_enqueue_style' ) ) {
|
308 |
/**
|
309 |
* Enqueues style.
|
|
|
310 |
* Registers the style if src provided (does NOT overwrite) and enqueues.
|
311 |
*
|
312 |
* @since 2.0.0
|
334 |
if ( !function_exists( 'yit_get_post_meta' ) ) {
|
335 |
/**
|
336 |
* Retrieve the value of a metabox.
|
|
|
337 |
* This function retrieve the value of a metabox attached to a post. It return either a single value or an array.
|
338 |
*
|
339 |
* @param int $id Post ID.
|
340 |
* @param string $meta The meta key to retrieve.
|
|
|
341 |
* @return mixed Single value or array
|
342 |
* @since 2.0.0
|
343 |
*/
|
368 |
* @param string $string The main string. If it is empty or null, the functions return null.
|
369 |
* @param string $after What there is after the main string
|
370 |
* @param bool $echo If echo or only return it
|
|
|
371 |
* @return string The complete string, if the main string is not empty or null
|
372 |
* @since 2.0.0
|
373 |
*/
|
392 |
*
|
393 |
* @param string $pages
|
394 |
* @param int $range
|
|
|
395 |
* @return string
|
396 |
* @since 2.0.0
|
397 |
*/
|
485 |
* @param bool $id
|
486 |
* @param string $type
|
487 |
* @param string $model
|
|
|
488 |
* @return array
|
489 |
* @since 2.0.0
|
490 |
*/
|
533 |
|
534 |
if ( !function_exists( 'yit_get_excluded_categories' ) ) {
|
535 |
/**
|
|
|
536 |
* Retrieve the escluded categories, set on Theme Options
|
537 |
*
|
538 |
* @param int $k
|
|
|
539 |
* @return string String with all id categories excluded, separated by a comma
|
|
|
540 |
* @since 2.0.0
|
541 |
*/
|
542 |
|
584 |
* Check the framework core version
|
585 |
*
|
586 |
* @param $headers Array
|
|
|
587 |
* @return bool
|
588 |
* @since 2.0.0
|
589 |
* @author Andrea Grillo <andrea.grillo@yithemes.com>
|
656 |
* @param mixed $value
|
657 |
* @param array $array
|
658 |
* @param string $check
|
|
|
659 |
* @return mixed
|
660 |
* @since 2.0.0
|
661 |
* @author Antonino Scarf� <antonino.scarfi@yithemes.com>
|
685 |
if ( !function_exists( 'yit_title_special_characters' ) ) {
|
686 |
/**
|
687 |
* The chars used in yit_decode_title() and yit_encode_title()
|
|
|
688 |
* E.G.
|
689 |
* string: This is [my title] with | a new line
|
690 |
* return: This is <span class="highlight">my title</span> with <br /> a new line
|
691 |
*
|
692 |
* @param string $title The string to convert
|
|
|
693 |
* @return string The html
|
|
|
694 |
* @since 1.0
|
695 |
*/
|
696 |
function yit_title_special_characters( $chars ) {
|
706 |
if ( !function_exists( 'yit_decode_title' ) ) {
|
707 |
/**
|
708 |
* Change some special characters to put easily html into a string
|
|
|
709 |
* E.G.
|
710 |
* string: This is [my title] with | a new line
|
711 |
* return: This is <span class="title-highlight">my title</span> with <br /> a new line
|
712 |
*
|
713 |
* @param string $title The string to convert
|
|
|
714 |
* @return string The html
|
|
|
715 |
* @since 1.0
|
716 |
*/
|
717 |
function yit_decode_title( $title ) {
|
724 |
if ( !function_exists( 'yit_encode_title' ) ) {
|
725 |
/**
|
726 |
* Change some special characters to put easily html into a string
|
|
|
727 |
* E.G.
|
728 |
* string: This is [my title] with | a new line
|
729 |
* return: This is <span class="title-highlight">my title</span> with <br /> a new line
|
730 |
*
|
731 |
* @param string $title The string to convert
|
|
|
732 |
* @return string The html
|
|
|
733 |
* @since 1.0
|
734 |
*/
|
735 |
function yit_encode_title( $title ) {
|
742 |
if ( !function_exists( 'yit_remove_chars_title' ) ) {
|
743 |
/**
|
744 |
* Change some special characters to put easily html into a string
|
|
|
745 |
* E.G.
|
746 |
* string: This is [my title] with | a new line
|
747 |
* return: This is <span class="title-highlight">my title</span> with <br /> a new line
|
748 |
*
|
749 |
* @param string $title The string to convert
|
|
|
750 |
* @return string The html
|
|
|
751 |
* @since 1.0
|
752 |
*/
|
753 |
function yit_remove_chars_title( $title ) {
|
780 |
* Load .min.js file if WP_Debug is not defined
|
781 |
*
|
782 |
* @param string $filename The file name
|
|
|
783 |
* @return string The file path
|
784 |
* @since 2.0.0
|
785 |
* @author Andrea Grillo <andrea.grillo@yithemes.com>
|
801 |
* @param $contenxt context name
|
802 |
* @param $name string name
|
803 |
* @param $value value to translate
|
|
|
804 |
* @since 2.0.0
|
805 |
* @author Andrea Frascaspata <andrea.frascaspata@yithemes.com>
|
806 |
*/
|
817 |
* @param $contenxt context name
|
818 |
* @param $name string name
|
819 |
* @param $default_value value to translate
|
|
|
820 |
* @return string the string translated
|
821 |
* @since 2.0.0
|
822 |
* @author Andrea Frascaspata <andrea.frascaspata@yithemes.com>
|
835 |
* @param string $element_type
|
836 |
* @param bool $return_original_if_missing
|
837 |
* @param null|string $ulanguage_code
|
|
|
838 |
* @return int the translation id
|
839 |
* @since 2.0.0
|
840 |
* @author Antonio La Rocca <antonio.larocca@yithemes.com>
|
857 |
*
|
858 |
* @param float $price
|
859 |
* @param array $args (default: array())
|
|
|
860 |
* @return string
|
861 |
*/
|
862 |
function yith_get_formatted_price( $price, $args = array() ) {
|
889 |
* Get terms
|
890 |
*
|
891 |
* @param $args
|
|
|
892 |
* @return array|int|WP_Error
|
893 |
*/
|
894 |
function yith_get_terms( $args ) {
|
924 |
/**
|
925 |
* @param $option
|
926 |
* @param YIT_Plugin_Panel|YIT_Plugin_Panel_WooCommerce $panel
|
|
|
927 |
* @return string
|
928 |
*/
|
929 |
function yith_panel_field_deps_data( $option, $panel ) {
|
945 |
* @param array $field
|
946 |
* @param bool $echo
|
947 |
* @param bool $show_container
|
|
|
948 |
* @return string|void
|
949 |
*/
|
950 |
function yith_plugin_fw_get_field( $field, $echo = false, $show_container = true ) {
|
1125 |
}
|
1126 |
}
|
1127 |
|
1128 |
+
if ( !function_exists( 'yith_plugin_fw_force_regenerate_plugin_update_transient' ) ) {
|
1129 |
+
/**
|
1130 |
+
* Delete the update plugins transient
|
1131 |
+
*
|
1132 |
+
* @return void
|
1133 |
+
* @since 1.0
|
1134 |
+
* @see update_plugins transient and pre_set_site_transient_update_plugins hooks
|
1135 |
+
* @author Andrea Grillo <andrea.grillo@yithemes.com>
|
1136 |
+
*/
|
1137 |
+
function yith_plugin_fw_force_regenerate_plugin_update_transient() {
|
1138 |
+
delete_site_transient( 'update_plugins' );
|
1139 |
+
}
|
|
|
1140 |
}
|
1141 |
|
1142 |
/* === Gutenberg Support === */
|
1143 |
|
1144 |
+
if ( !function_exists( 'yith_plugin_fw_is_gutenberg_enabled' ) ) {
|
1145 |
+
function yith_plugin_fw_is_gutenberg_enabled() {
|
1146 |
+
return function_exists( 'YITH_Gutenberg' );
|
1147 |
+
}
|
1148 |
}
|
1149 |
|
1150 |
+
if ( !function_exists( 'yith_plugin_fw_gutenberg_add_blocks' ) ) {
|
1151 |
+
/**
|
1152 |
+
* Add new blocks to Gutenberg
|
1153 |
+
*
|
1154 |
+
* @param $blocks string|array new blocks
|
1155 |
+
* @return bool true if add a new blocks, false otherwise
|
1156 |
+
* @author Andrea Grillo <andrea.grillo@yithemes.com>
|
1157 |
+
*/
|
1158 |
+
function yith_plugin_fw_gutenberg_add_blocks( $blocks ) {
|
1159 |
+
$added = false;
|
1160 |
+
if ( yith_plugin_fw_is_gutenberg_enabled() ) {
|
1161 |
+
// ADD Blocks
|
1162 |
+
$added = YITH_Gutenberg()->add_blocks( $blocks );
|
1163 |
+
|
1164 |
+
//ADD Blocks arguments
|
1165 |
+
if ( $added ) {
|
1166 |
+
YITH_Gutenberg()->set_block_args( $blocks );
|
1167 |
+
}
|
1168 |
+
}
|
1169 |
+
|
1170 |
+
return $added;
|
1171 |
+
}
|
|
|
1172 |
}
|
1173 |
|
1174 |
+
if ( !function_exists( 'yith_plugin_fw_gutenberg_get_registered_blocks' ) ) {
|
1175 |
+
/**
|
1176 |
+
* Return an array with the registered blocks
|
1177 |
+
*
|
1178 |
+
* @return array
|
1179 |
+
*/
|
1180 |
+
function yith_plugin_fw_gutenberg_get_registered_blocks() {
|
1181 |
+
return yith_plugin_fw_is_gutenberg_enabled() ? YITH_Gutenberg()->get_registered_blocks() : array();
|
1182 |
+
}
|
1183 |
}
|
1184 |
|
1185 |
+
if ( !function_exists( 'yith_plugin_fw_gutenberg_get_to_register_blocks' ) ) {
|
1186 |
+
/**
|
1187 |
+
* Return an array with the blocks to register
|
1188 |
+
*
|
1189 |
+
* @return array
|
1190 |
+
*/
|
1191 |
+
function yith_plugin_fw_gutenberg_get_to_register_blocks() {
|
1192 |
+
return yith_plugin_fw_is_gutenberg_enabled() ? YITH_Gutenberg()->get_to_register_blocks() : array();
|
1193 |
+
}
|
1194 |
}
|
1195 |
|
1196 |
+
if ( !function_exists( 'yith_plugin_fw_get_default_logo' ) ) {
|
1197 |
+
/**
|
1198 |
+
* Get the default SVG logo
|
1199 |
+
*
|
1200 |
+
* @return string default logo image url
|
1201 |
+
*/
|
1202 |
+
function yith_plugin_fw_get_default_logo() {
|
1203 |
+
return YIT_CORE_PLUGIN_URL . '/assets/images/yith-icon.svg';
|
1204 |
+
}
|
1205 |
}
|
1206 |
|
1207 |
+
if ( !function_exists( 'yith_set_wrapper_class' ) ) {
|
1208 |
+
/**
|
1209 |
+
* Return the class for the new plugin panel style.
|
1210 |
+
*
|
1211 |
+
* @param $class array|string the list of additional classes to add inside the panel wrapper.
|
1212 |
+
* @return string
|
1213 |
+
* @author Emanuela Castorina
|
1214 |
+
*/
|
1215 |
+
function yith_set_wrapper_class( $class = '' ) {
|
1216 |
+
$new_class = 'yith-plugin-ui';
|
1217 |
+
$class = ( !empty( $class ) && is_array( $class ) ) ? implode( ' ', $class ) : $class;
|
1218 |
+
|
1219 |
+
return $new_class . ' ' . $class;
|
1220 |
+
}
|
|
|
|
|
1221 |
}
|
1222 |
|
1223 |
+
if ( !function_exists( 'yith_get_date_format' ) ) {
|
1224 |
+
/**
|
1225 |
+
* get all available date format
|
1226 |
+
*
|
1227 |
+
* @since 3.1
|
1228 |
+
* @author Salvatore Strano
|
1229 |
+
* @return array
|
1230 |
+
*/
|
1231 |
+
|
1232 |
+
function yith_get_date_format( $js = true ) {
|
1233 |
+
|
1234 |
+
$date_formats = array(
|
1235 |
+
'F j, Y' => 'F j, Y',
|
1236 |
+
'Y-m-d' => 'Y-m-d',
|
1237 |
+
'm/d/Y' => 'm/d/Y',
|
1238 |
+
'd/m/Y' => 'd/m/Y',
|
1239 |
+
);
|
1240 |
+
|
1241 |
+
if ( $js ) {
|
1242 |
+
$date_formats = array(
|
1243 |
+
'MM d, yy' => 'F j, Y',
|
1244 |
+
'yy-mm-dd' => 'Y-m-d',
|
1245 |
+
'mm/dd/yy' => 'm/d/Y',
|
1246 |
+
'dd/mm/yy' => 'd/m/Y',
|
1247 |
+
);
|
1248 |
+
}
|
1249 |
+
|
1250 |
+
return apply_filters( 'yith_plugin_fw_date_formats', $date_formats, $js );
|
1251 |
+
}
|
1252 |
}
|
1253 |
|
1254 |
|
1255 |
+
if ( !function_exists( 'yith_format_toggle_title' ) ) {
|
1256 |
+
/**
|
1257 |
+
* replace the placeholders with the values of the element id
|
1258 |
+
* for toggle element field.
|
1259 |
+
*
|
1260 |
+
* @return array
|
1261 |
+
* @author Salvatore Strano
|
1262 |
+
* @since 3.1
|
1263 |
+
*/
|
1264 |
+
|
1265 |
+
function yith_format_toggle_title( $title, $value ) {
|
1266 |
+
preg_match_all( '/(?<=\%%).+?(?=\%%)/', $title, $matches );
|
1267 |
+
if ( isset( $matches[ 0 ] ) ) {
|
1268 |
+
foreach ( $matches[ 0 ] as $element_id ) {
|
1269 |
+
if ( isset( $value[ $element_id ] ) ) {
|
1270 |
+
$title = str_replace( '%%' . $element_id . '%%', $value[ $element_id ], $title );
|
1271 |
+
}
|
1272 |
+
}
|
1273 |
+
}
|
1274 |
+
|
1275 |
+
return $title;
|
1276 |
+
}
|
1277 |
}
|
1278 |
|
1279 |
+
if ( !function_exists( 'yith_plugin_fw_load_update_and_licence_files' ) ) {
|
1280 |
+
/**
|
1281 |
+
* Load premium file for license and update system
|
1282 |
+
*
|
1283 |
+
* @author Andrea Grillo <andrea.grillo@yithemes.com>
|
1284 |
+
* @return void
|
1285 |
+
*/
|
1286 |
+
function yith_plugin_fw_load_update_and_licence_files() {
|
1287 |
+
global $plugin_upgrade_fw_data;
|
1288 |
+
|
1289 |
+
/**
|
1290 |
+
* If the init.php was load by old plugin-fw version
|
1291 |
+
* load the upgrade and license key from local folder
|
1292 |
+
*/
|
1293 |
+
if ( empty( $plugin_upgrade_fw_data ) ) {
|
1294 |
+
$plugin_upgrade_path = plugin_dir_path( __DIR__ ) . 'plugin-upgrade';
|
1295 |
+
if ( file_exists( $plugin_upgrade_path ) ) {
|
1296 |
+
$required_files = array(
|
1297 |
+
$plugin_upgrade_path . '/lib/yit-licence.php',
|
1298 |
+
$plugin_upgrade_path . '/lib/yit-plugin-licence.php',
|
1299 |
+
$plugin_upgrade_path . '/lib/yit-theme-licence.php',
|
1300 |
+
$plugin_upgrade_path . '/lib/yit-plugin-upgrade.php'
|
1301 |
+
);
|
1302 |
+
|
1303 |
+
$plugin_upgrade_fw_data = array( '1.0' => $required_files );
|
1304 |
+
}
|
1305 |
+
}
|
1306 |
+
|
1307 |
+
if ( !empty( $plugin_upgrade_fw_data ) && is_array( $plugin_upgrade_fw_data ) ) {
|
1308 |
+
foreach ( $plugin_upgrade_fw_data as $fw_version => $core_files ) {
|
1309 |
+
foreach ( $core_files as $core_file ) {
|
1310 |
+
if ( file_exists( $core_file ) ) {
|
1311 |
+
include_once $core_file;
|
1312 |
+
}
|
1313 |
+
}
|
1314 |
+
}
|
1315 |
+
}
|
1316 |
+
}
|
|
|
1317 |
}
|
1318 |
|
1319 |
+
if ( !function_exists( 'yith_plugin_fw_remove_duplicate_classes' ) ) {
|
1320 |
+
/**
|
1321 |
+
* Remove the duplicate classes from a string.
|
1322 |
+
*
|
1323 |
+
* @param $classes string
|
1324 |
+
* @return string
|
1325 |
+
* @since 3.2.2
|
1326 |
+
* @author Emanuela Castorina <emanuela.castorina@yithemes.com>
|
1327 |
+
*/
|
1328 |
+
function yith_plugin_fw_remove_duplicate_classes( $classes ) {
|
1329 |
+
$class_array = explode( ' ', $classes );
|
1330 |
+
$class_unique = array_unique( array_filter( $class_array ) );
|
1331 |
+
if ( $class_unique ) {
|
1332 |
+
$classes = implode( ' ', $class_unique );
|
1333 |
+
}
|
1334 |
+
|
1335 |
+
return $classes;
|
1336 |
+
}
|
|
|
|
|
1337 |
}
|
1338 |
|
1339 |
+
if ( !function_exists( 'yith_plugin_fw_add_requirements' ) ) {
|
1340 |
|
1341 |
+
function yith_plugin_fw_add_requirements( $plugin_name, $requirements ) {
|
1342 |
+
if ( !empty( $requirements ) ) {
|
1343 |
+
YITH_System_Status()->add_requirements( $plugin_name, $requirements );
|
1344 |
|
1345 |
|
1346 |
+
}
|
1347 |
+
}
|
1348 |
}
|