Version Description
- Added tooltip
- Default stylesheet enable/disable option
- Display style added to show Rounded / Squared shaped style
Download this release
Release Info
Developer | EmranAhmed |
Plugin | WooCommerce Variation Swatches |
Version | 1.0.2 |
Comparing to | |
See all releases |
Code changes from version 1.0.1 to 1.0.2
- README.txt +48 -4
- assets/css/admin.css +30 -4
- assets/css/admin.min.css +3 -3
- assets/css/frontend-tooltip.css +60 -0
- assets/css/frontend-tooltip.min.css +8 -0
- assets/css/frontend.css +17 -8
- assets/css/frontend.min.css +3 -3
- assets/js/admin.js +16 -7
- assets/js/admin.min.js +1 -1
- assets/js/frontend.js +15 -16
- assets/js/frontend.min.js +1 -1
- includes/class-wvs-settings-api.php +466 -0
- includes/class-wvs-term-meta.php +2 -2
- includes/functions.php +48 -8
- includes/hooks.php +3 -2
- languages/woo-variation-swatches.pot +19 -11
- webpack.mix.js +2 -1
- woo-variation-swatches.php +123 -14
README.txt
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
=== Woo Variation Swatches ===
|
2 |
Contributors: EmranAhmed, wpeshaan
|
3 |
-
Tags: woocommerce, variation swatches, product attributes, product color, product size, variable product attributes, variation product swatches, color variation swatch, image variation swatch
|
4 |
Requires at least: 4.8
|
5 |
Tested up to: 4.9
|
6 |
Requires PHP: 5.6
|
@@ -18,6 +18,8 @@ Woo Variation Swatches is easy to use WooCommerce product variation swatches plu
|
|
18 |
|
19 |
Woo Variation Swatches not only offers the color, image and label attributes in the single WooCommerce product. It also enables them in product quick view. If you're using WooCommerce themes like Flatsome that comes with default Quick View option, you don’t need to hassle to load color and image swatches for variable product attributes in quick view separately.
|
20 |
|
|
|
|
|
21 |
= Key Feature Comes with this Plugin =
|
22 |
|
23 |
* Work on variable product
|
@@ -26,11 +28,46 @@ Woo Variation Swatches not only offers the color, image and label attributes in
|
|
26 |
* Enable attributes into color swatches
|
27 |
* Enable attributes into label/text/button swatches
|
28 |
* Control attribute setting globally.
|
|
|
|
|
|
|
|
|
29 |
* No extra option and no conclusion.
|
30 |
|
31 |
-
=
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
32 |
|
33 |
-
> [Facebook Group](https://www.facebook.com/groups/GetWooPlugins/) | [Github](https://github.com/EmranAhmed/woo-variation-swatches/?utm_source=wordpress.org&utm_campaign=Woo+Variation+Swatches) | [Website](https://getwooplugins.com/?utm_source=wordpress.org&utm_campaign=Woo+Variation+Swatches)
|
34 |
|
35 |
== Installation ==
|
36 |
|
@@ -91,9 +128,16 @@ Yes, it supports any kinds of product quick view.
|
|
91 |
5. Attribute Color Type Preview
|
92 |
6. Attribute Button / Label Type Preview
|
93 |
7. Variation Product Edit view
|
|
|
94 |
|
95 |
== Changelog ==
|
96 |
|
|
|
|
|
|
|
|
|
|
|
|
|
97 |
= 1.0.1 =
|
98 |
|
99 |
* Fix text type select list
|
@@ -102,4 +146,4 @@ Yes, it supports any kinds of product quick view.
|
|
102 |
|
103 |
* Initial release
|
104 |
|
105 |
-
== Upgrade Notice ==
|
1 |
=== Woo Variation Swatches ===
|
2 |
Contributors: EmranAhmed, wpeshaan
|
3 |
+
Tags: woocommerce variation, woocommerce, variation swatches, woocommerce attributes, product attributes, product color, product size, variable product attributes, variation product swatches, color variation swatch, image variation swatch
|
4 |
Requires at least: 4.8
|
5 |
Tested up to: 4.9
|
6 |
Requires PHP: 5.6
|
18 |
|
19 |
Woo Variation Swatches not only offers the color, image and label attributes in the single WooCommerce product. It also enables them in product quick view. If you're using WooCommerce themes like Flatsome that comes with default Quick View option, you don’t need to hassle to load color and image swatches for variable product attributes in quick view separately.
|
20 |
|
21 |
+
In the free WooCommerce attribute variation plugin, besides creating size, brand, image, color, and label variation swatches, you can handle the swatches shape style <strong>Rounded and Circle</strong>. On top of that, it allows you beautiful tooltips on variation swatch hover. Based on your requirement you enable and disable hover from the settings. To maximize and personalize your development process, the product attributes swatches comes an option to disable default plugin stylesheet so that you can personally write your own CSS.
|
22 |
+
|
23 |
= Key Feature Comes with this Plugin =
|
24 |
|
25 |
* Work on variable product
|
28 |
* Enable attributes into color swatches
|
29 |
* Enable attributes into label/text/button swatches
|
30 |
* Control attribute setting globally.
|
31 |
+
* Compatible with popular themes and plugins
|
32 |
+
* Option to select ROUNDED and CIRCLED variation shape.
|
33 |
+
* Flexible tooltip insert and dispaly settings
|
34 |
+
* Option to disable plugin stylesheet.
|
35 |
* No extra option and no conclusion.
|
36 |
|
37 |
+
= Sites Built With Woo Variation Swatches Plugin =
|
38 |
+
<blockquote>
|
39 |
+
<ul>
|
40 |
+
<li> <a href="http://bit.ly/woovs-demo-01">plotnikoff.ru</a></li>
|
41 |
+
</ul>
|
42 |
+
|
43 |
+
</blockquote>
|
44 |
+
|
45 |
+
= Officially tested WooCommerce Themes =
|
46 |
+
|
47 |
+
* [Flatsome Theme](http://bit.ly/flatsomeyoutube)
|
48 |
+
|
49 |
+
= Officially tested plugins =
|
50 |
+
|
51 |
+
* WPML
|
52 |
+
* Polylang
|
53 |
+
|
54 |
+
= Forum and Feature Request =
|
55 |
+
|
56 |
+
<blockquote>
|
57 |
+
<h4>For feature request and bug reporting</h4>
|
58 |
+
<ul>
|
59 |
+
<li> <a href="http://bit.ly/getwoopluginsgroup">Join Our Facebook Group</a></li>
|
60 |
+
</ul>
|
61 |
+
<h4>For contribution</h4>
|
62 |
+
<ul>
|
63 |
+
<li><a href="https://github.com/EmranAhmed/woo-variation-swatches/?utm_source=wordpress.org&utm_campaign=Woo+Variation+Swatches">Join Project in Github</a></li>
|
64 |
+
</ul>
|
65 |
+
<h4>For more information</h4>
|
66 |
+
<ul>
|
67 |
+
<li><a href="https://getwooplugins.com/?utm_source=wordpress.org&utm_campaign=Woo+Variation+Swatches">Visit Our Official Website</a></li>
|
68 |
+
</ul>
|
69 |
+
</blockquote>
|
70 |
|
|
|
71 |
|
72 |
== Installation ==
|
73 |
|
128 |
5. Attribute Color Type Preview
|
129 |
6. Attribute Button / Label Type Preview
|
130 |
7. Variation Product Edit view
|
131 |
+
8. Settings Panel
|
132 |
|
133 |
== Changelog ==
|
134 |
|
135 |
+
= 1.0.2 =
|
136 |
+
|
137 |
+
* Added tooltip
|
138 |
+
* Default stylesheet enable/disable option
|
139 |
+
* Display style added to show Rounded / Squared shaped style
|
140 |
+
|
141 |
= 1.0.1 =
|
142 |
|
143 |
* Fix text type select list
|
146 |
|
147 |
* Initial release
|
148 |
|
149 |
+
== Upgrade Notice ==
|
assets/css/admin.css
CHANGED
@@ -1,8 +1,8 @@
|
|
1 |
/*!
|
2 |
-
* Woo Variation Swatches v1.0.
|
3 |
*
|
4 |
* Author: Emran Ahmed ( emran.bd.08@gmail.com )
|
5 |
-
* Date:
|
6 |
* Released under the GPLv3 license.
|
7 |
*/
|
8 |
.button.button-danger {
|
@@ -22,7 +22,7 @@
|
|
22 |
background: #C9302C;
|
23 |
}
|
24 |
|
25 |
-
[data-depends]
|
26 |
display: none;
|
27 |
}
|
28 |
|
@@ -46,5 +46,31 @@
|
|
46 |
vertical-align: top;
|
47 |
}
|
48 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
49 |
|
50 |
-
/*# sourceMappingURL=data:application/json;charset=utf-8;base64,
|
1 |
/*!
|
2 |
+
* Woo Variation Swatches v1.0.2
|
3 |
*
|
4 |
* Author: Emran Ahmed ( emran.bd.08@gmail.com )
|
5 |
+
* Date: 2018-1-9 02:17:48
|
6 |
* Released under the GPLv3 license.
|
7 |
*/
|
8 |
.button.button-danger {
|
22 |
background: #C9302C;
|
23 |
}
|
24 |
|
25 |
+
[data-depends] {
|
26 |
display: none;
|
27 |
}
|
28 |
|
46 |
vertical-align: top;
|
47 |
}
|
48 |
|
49 |
+
.gwp-rate-stars {
|
50 |
+
display: inline-block;
|
51 |
+
color: #FFB900;
|
52 |
+
position: relative;
|
53 |
+
top: 3px;
|
54 |
+
}
|
55 |
+
|
56 |
+
.gwp-rate-stars svg,
|
57 |
+
.gwp-rate-stars svg a {
|
58 |
+
fill: #FFB900;
|
59 |
+
stroke: #FFB900;
|
60 |
+
cursor: pointer;
|
61 |
+
}
|
62 |
+
|
63 |
+
.gwp-rate-stars svg:hover,
|
64 |
+
.gwp-rate-stars svg a:hover {
|
65 |
+
fill: #FFB900;
|
66 |
+
}
|
67 |
+
|
68 |
+
.gwp-rate-stars svg:hover ~ svg,
|
69 |
+
.gwp-rate-stars svg:hover ~ svg a,
|
70 |
+
.gwp-rate-stars svg a:hover ~ svg,
|
71 |
+
.gwp-rate-stars svg a:hover ~ svg a {
|
72 |
+
fill: none;
|
73 |
+
}
|
74 |
+
|
75 |
|
76 |
+
/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXNzZXRzL2Nzcy9hZG1pbi5jc3MiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9zcmMvc2Nzcy9zcmMvc2Nzcy9iYWNrZW5kLnNjc3MiLCJ3ZWJwYWNrOi8vLy4vYmFja2VuZC5zY3NzIiwid2VicGFjazovLy8uL3NyYy9zY3NzL2JhY2tlbmQuc2NzcyJdLCJzb3VyY2VzQ29udGVudCI6WyIuYnV0dG9uLmJ1dHRvbi1kYW5nZXIge1xuICBjb2xvciAgICAgICAgICAgIDogI0ZGRkZGRjtcbiAgYmFja2dyb3VuZC1jb2xvciA6ICNBRjJEMkI7XG4gIGJvcmRlci1jb2xvciAgICAgOiAjQTYyRDJCO1xuICBib3gtc2hhZG93ICAgICAgIDogMCAxcHggMCAjQTcyRDJCO1xuICB2ZXJ0aWNhbC1hbGlnbiAgIDogdG9wO1xuICAmOmhvdmVyLCAmOmZvY3VzLCAmOmFjdGl2ZSwgJi5hY3RpdmUge1xuICAgIGNvbG9yICAgICAgOiAjRkZG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lFzVFVGQlVTeEhRVVZJTEVkQlFVY3NSVUZhV0N4QlFWbHRRaXhsUVZwS0xFTkJUVklzUjBGQlJ5eERRVUZETEVOQlFVTXNRVUZKVkN4TlFVRlJMRWRCUlVrc1IwRkJSeXhEUVVGRExFTkJRVU1zUTBGQlF6dEZRVU5pTEVsQlFVa3NSVUZCUnl4SlFVRkpPME5CUTFZaWZRPT0gKi9cblxuXG4vLyBXRUJQQUNLIEZPT1RFUiAvL1xuLy8gLi9zcmMvc2Nzcy9iYWNrZW5kLnNjc3MiXSwibWFwcGluZ3MiOiI7Ozs7Ozs7QUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQUE7QUFDQTtBQ0NBO0FBQ0E7QUREQTs7OztBQUNBO0FBQ0E7QUNNQTtBQUNBO0FDRkE7QUZBQTtBQ0tBO0FBQ0E7QURIQTtBQUNBO0FDS0E7QUFDQTtBRExBO0FBQ0E7QUFDQTtBQ09BO0FBQ0E7QURaQTtBQU9BO0FBQ0E7QUFDQTtBQ1FBO0FBQ0E7QURQQTtBQUNBO0FBQ0E7QUNTQTtBQUNBO0FETkE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQ1FBO0FBQ0E7QURiQTs7QUFPQTtBQUNBO0FBQ0E7QUNVQTtBQUNBO0FEcEJBOztBQVdBO0FDYUE7QUFDQTtBRHpCQTs7OztBQWFBO0FDa0JBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9*/
|
assets/css/admin.min.css
CHANGED
@@ -1,8 +1,8 @@
|
|
1 |
/*!
|
2 |
-
* Woo Variation Swatches v1.0.
|
3 |
*
|
4 |
* Author: Emran Ahmed ( emran.bd.08@gmail.com )
|
5 |
-
* Date:
|
6 |
* Released under the GPLv3 license.
|
7 |
*/
|
8 |
-
.button.button-danger{color:#fff;background-color:#af2d2b;border-color:#a62d2b;-webkit-box-shadow:0 1px 0 #a72d2b;box-shadow:0 1px 0 #a72d2b;vertical-align:top}.button.button-danger.active,.button.button-danger:active,.button.button-danger:focus,.button.button-danger:hover{color:#fff;background:#c9302c}[data-depends]
|
1 |
/*!
|
2 |
+
* Woo Variation Swatches v1.0.2
|
3 |
*
|
4 |
* Author: Emran Ahmed ( emran.bd.08@gmail.com )
|
5 |
+
* Date: 2018-1-9 02:17:54
|
6 |
* Released under the GPLv3 license.
|
7 |
*/
|
8 |
+
.button.button-danger{color:#fff;background-color:#af2d2b;border-color:#a62d2b;-webkit-box-shadow:0 1px 0 #a72d2b;box-shadow:0 1px 0 #a72d2b;vertical-align:top}.button.button-danger.active,.button.button-danger:active,.button.button-danger:focus,.button.button-danger:hover{color:#fff;background:#c9302c}[data-depends]{display:none}.meta-image-field-wrapper{display:table}.meta-image-field-wrapper .button{margin:5px 0;display:block}.meta-image-field-wrapper .image-preview{display:table-cell;width:60px;padding-right:10px}.meta-image-field-wrapper .button-wrapper{display:table-cell;vertical-align:top}.gwp-rate-stars{display:inline-block;color:#ffb900;position:relative;top:3px}.gwp-rate-stars svg,.gwp-rate-stars svg a{fill:#ffb900;stroke:#ffb900;cursor:pointer}.gwp-rate-stars svg:hover,.gwp-rate-stars svg a:hover{fill:#ffb900}.gwp-rate-stars svg:hover~svg,.gwp-rate-stars svg:hover~svg a,.gwp-rate-stars svg a:hover~svg,.gwp-rate-stars svg a:hover~svg a{fill:none}
|
assets/css/frontend-tooltip.css
ADDED
@@ -0,0 +1,60 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*!
|
2 |
+
* Woo Variation Swatches v1.0.2
|
3 |
+
*
|
4 |
+
* Author: Emran Ahmed ( emran.bd.08@gmail.com )
|
5 |
+
* Date: 2018-1-9 02:17:48
|
6 |
+
* Released under the GPLv3 license.
|
7 |
+
*/
|
8 |
+
.variable-items-wrapper [data-tooltip] {
|
9 |
+
position: relative;
|
10 |
+
cursor: pointer;
|
11 |
+
}
|
12 |
+
|
13 |
+
.variable-items-wrapper [data-tooltip]:before,
|
14 |
+
.variable-items-wrapper [data-tooltip]:after {
|
15 |
+
visibility: hidden;
|
16 |
+
opacity: 0;
|
17 |
+
pointer-events: none;
|
18 |
+
-webkit-box-sizing: inherit;
|
19 |
+
box-sizing: inherit;
|
20 |
+
position: absolute;
|
21 |
+
bottom: 130%;
|
22 |
+
left: 50%;
|
23 |
+
z-index: 9;
|
24 |
+
}
|
25 |
+
|
26 |
+
.variable-items-wrapper [data-tooltip]:before {
|
27 |
+
margin-bottom: 5px;
|
28 |
+
margin-left: -50px;
|
29 |
+
padding: 7px;
|
30 |
+
width: 100px;
|
31 |
+
border-radius: 3px;
|
32 |
+
background-color: #000000;
|
33 |
+
background-color: rgba(51, 51, 51, 0.9);
|
34 |
+
color: #FFFFFF;
|
35 |
+
content: attr(data-tooltip);
|
36 |
+
text-align: center;
|
37 |
+
font-size: 14px;
|
38 |
+
line-height: 1.2;
|
39 |
+
}
|
40 |
+
|
41 |
+
.variable-items-wrapper [data-tooltip]:after {
|
42 |
+
margin-left: -5px;
|
43 |
+
width: 0;
|
44 |
+
border-top: 5px solid #000000;
|
45 |
+
border-top: 5px solid rgba(51, 51, 51, 0.9);
|
46 |
+
border-right: 5px solid transparent;
|
47 |
+
border-left: 5px solid transparent;
|
48 |
+
content: " ";
|
49 |
+
font-size: 0;
|
50 |
+
line-height: 0;
|
51 |
+
}
|
52 |
+
|
53 |
+
.variable-items-wrapper [data-tooltip]:hover:before,
|
54 |
+
.variable-items-wrapper [data-tooltip]:hover:after {
|
55 |
+
visibility: visible;
|
56 |
+
opacity: 1;
|
57 |
+
}
|
58 |
+
|
59 |
+
|
60 |
+
/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXNzZXRzL2Nzcy9mcm9udGVuZC10b29sdGlwLmNzcyIsInNvdXJjZXMiOlsid2VicGFjazovLy8uL3NyYy9zY3NzL3NyYy9zY3NzL3Rvb2x0aXAuc2NzcyIsIndlYnBhY2s6Ly8vLi90b29sdGlwLnNjc3MiXSwic291cmNlc0NvbnRlbnQiOlsiLnZhcmlhYmxlLWl0ZW1zLXdyYXBwZXIge1xuICBbZGF0YS10b29sdGlwXSB7XG4gICAgcG9zaXRpb24gOiByZWxhdGl2ZTtcbiAgICBjdXJzb3IgICA6IHBvaW50ZXI7XG4gICAgfVxuXG4gIFtkYXRhLXRvb2x0aXBdOmJlZm9yZSxcbiAgW2RhdGEtdG9vbHRpcF06YWZ0ZXIge1xuICAgIHZpc2liaWxpdHkgICAgIDogaGlkZGVuO1xuICAgIG9wYWNpdHkgICAgICAgIDogMDtcbiAgICBwb2ludGVyLWV2ZW50cyA6IG5vbmU7XG4gICAgYm94LXNpemluZyAgICAgOiBpbmhlcml0O1xuICAgIHBvc2l0aW9uICAgICAgIDogYWJzb2x1dGU7XG4gICAgYm90dG9tICAgICAgICAgOiAxMzAlO1xuICAgIGxlZnQgICAgICAgICAgIDogNTAlO1xuICAgIHotaW5kZXggICAgICAgIDogOTtcbiAgICB9XG5cbiAgW2RhdGEtdG9vbHRpcF06YmVmb3JlIHtcbiAgICBtYXJnaW4tYm90dG9tICAgIDogNXB4O1xuICAgIG1hcmdpbi1sZWZ0ICAgICAgOiAtNTBweDtcbiAgICBwYWRkaW5nICAgICAgICAgIDogN3B4O1xuICAgIHdpZHRoICAgICAgICAgICAgOiAxMDBweDtcbiAgICBib3JkZXItcmFkaXVzICAgIDogM3B4O1xuICAgIGJhY2tncm91bmQtY29sb3IgOiAjMDAwMDAwO1xuICAgIGJhY2tncm91bmQtY29sb3IgOiBoc2xhKDAsIDAlLCAyMCUsIDAuOSk7XG4gICAgY29sb3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gY29udGVudDogXCIgXCI7XG4gIGZvbnQtc2l6ZTogMDtcbiAgbGluZS1oZWlnaHQ6IDA7XG59XG5cbi52YXJpYWJsZS1pdGVtcy13cmFwcGVyIFtkYXRhLXRvb2x0aXBdOmhvdmVyOmJlZm9yZSxcbi52YXJpYWJsZS1pdGVtcy13cmFwcGVyIFtkYXRhLXRvb2x0aXBdOmhvdmVyOmFmdGVyIHtcbiAgdmlzaWJpbGl0eTogdmlzaWJsZTtcbiAgb3BhY2l0eTogMTtcbn1cblxuXG5cblxuLy8gV0VCUEFDSyBGT09URVIgLy9cbi8vIC4vdG9vbHRpcC5zY3NzIl0sIm1hcHBpbmdzIjoiOzs7Ozs7O0FBQUE7QUFFQTtBQUNBO0FDQUE7QUFDQTtBREVBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQ0FBO0FBQ0E7QURoQkE7QUFtQkE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FDQUE7QUFDQTtBREVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FDQUE7QUFDQTtBREVBOztBQUVBO0FBQ0E7QUNBQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==*/
|
assets/css/frontend-tooltip.min.css
ADDED
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*!
|
2 |
+
* Woo Variation Swatches v1.0.2
|
3 |
+
*
|
4 |
+
* Author: Emran Ahmed ( emran.bd.08@gmail.com )
|
5 |
+
* Date: 2018-1-9 02:17:54
|
6 |
+
* Released under the GPLv3 license.
|
7 |
+
*/
|
8 |
+
.variable-items-wrapper [data-tooltip]{position:relative;cursor:pointer}.variable-items-wrapper [data-tooltip]:after,.variable-items-wrapper [data-tooltip]:before{visibility:hidden;opacity:0;pointer-events:none;-webkit-box-sizing:inherit;box-sizing:inherit;position:absolute;bottom:130%;left:50%;z-index:9}.variable-items-wrapper [data-tooltip]:before{margin-bottom:5px;margin-left:-50px;padding:7px;width:100px;border-radius:3px;background-color:#000;background-color:rgba(51,51,51,.9);color:#fff;content:attr(data-tooltip);text-align:center;font-size:14px;line-height:1.2}.variable-items-wrapper [data-tooltip]:after{margin-left:-5px;width:0;border-top:5px solid #000;border-top:5px solid rgba(51,51,51,.9);border-right:5px solid transparent;border-left:5px solid transparent;content:" ";font-size:0;line-height:0}.variable-items-wrapper [data-tooltip]:hover:after,.variable-items-wrapper [data-tooltip]:hover:before{visibility:visible;opacity:1}
|
assets/css/frontend.css
CHANGED
@@ -1,8 +1,8 @@
|
|
1 |
/*!
|
2 |
-
* Woo Variation Swatches v1.0.
|
3 |
*
|
4 |
* Author: Emran Ahmed ( emran.bd.08@gmail.com )
|
5 |
-
* Date:
|
6 |
* Released under the GPLv3 license.
|
7 |
*/
|
8 |
.variable-items-wrapper {
|
@@ -23,7 +23,6 @@
|
|
23 |
border: 1px solid rgba(0, 0, 0, 0.2);
|
24 |
width: 30px;
|
25 |
height: 30px;
|
26 |
-
overflow: hidden;
|
27 |
display: -webkit-box;
|
28 |
display: -ms-flexbox;
|
29 |
display: flex;
|
@@ -35,16 +34,26 @@
|
|
35 |
align-items: center;
|
36 |
}
|
37 |
|
38 |
-
.variable-items-wrapper .variable-item.color-variable-item,
|
39 |
-
.variable-items-wrapper .variable-item.button-variable-item {
|
40 |
border-radius: 50%;
|
41 |
}
|
42 |
|
43 |
-
.variable-items-wrapper .variable-item.color-variable-item span,
|
44 |
-
.variable-items-wrapper .variable-item.button-variable-item span {
|
45 |
border-radius: 50%;
|
46 |
}
|
47 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
48 |
.variable-items-wrapper .variable-item span {
|
49 |
padding: 10px;
|
50 |
font-size: small;
|
@@ -70,4 +79,4 @@
|
|
70 |
}
|
71 |
|
72 |
|
73 |
-
/*# sourceMappingURL=data:application/json;charset=utf-8;base64,
|
1 |
/*!
|
2 |
+
* Woo Variation Swatches v1.0.2
|
3 |
*
|
4 |
* Author: Emran Ahmed ( emran.bd.08@gmail.com )
|
5 |
+
* Date: 2018-1-9 02:17:48
|
6 |
* Released under the GPLv3 license.
|
7 |
*/
|
8 |
.variable-items-wrapper {
|
23 |
border: 1px solid rgba(0, 0, 0, 0.2);
|
24 |
width: 30px;
|
25 |
height: 30px;
|
|
|
26 |
display: -webkit-box;
|
27 |
display: -ms-flexbox;
|
28 |
display: flex;
|
34 |
align-items: center;
|
35 |
}
|
36 |
|
37 |
+
.variable-items-wrapper .variable-item.color-variable-item.rounded-style,
|
38 |
+
.variable-items-wrapper .variable-item.button-variable-item.rounded-style {
|
39 |
border-radius: 50%;
|
40 |
}
|
41 |
|
42 |
+
.variable-items-wrapper .variable-item.color-variable-item.rounded-style span,
|
43 |
+
.variable-items-wrapper .variable-item.button-variable-item.rounded-style span {
|
44 |
border-radius: 50%;
|
45 |
}
|
46 |
|
47 |
+
.variable-items-wrapper .variable-item.color-variable-item.squared-style,
|
48 |
+
.variable-items-wrapper .variable-item.button-variable-item.squared-style {
|
49 |
+
border-radius: 0;
|
50 |
+
}
|
51 |
+
|
52 |
+
.variable-items-wrapper .variable-item.color-variable-item.squared-style span,
|
53 |
+
.variable-items-wrapper .variable-item.button-variable-item.squared-style span {
|
54 |
+
border-radius: 0;
|
55 |
+
}
|
56 |
+
|
57 |
.variable-items-wrapper .variable-item span {
|
58 |
padding: 10px;
|
59 |
font-size: small;
|
79 |
}
|
80 |
|
81 |
|
82 |
+
/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXNzZXRzL2Nzcy9mcm9udGVuZC5jc3MiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9zcmMvc2Nzcy9zcmMvc2Nzcy9mcm9udGVuZC5zY3NzIiwid2VicGFjazovLy8uL2Zyb250ZW5kLnNjc3MiXSwic291cmNlc0NvbnRlbnQiOlsiLnZhcmlhYmxlLWl0ZW1zLXdyYXBwZXIge1xuICBkaXNwbGF5ICAgOiBmbGV4O1xuICBmbGV4LXdyYXAgOiB3cmFwO1xuXG4gIC52YXJpYWJsZS1pdGVtIHtcbiAgICBib3gtc2l6aW5nICAgICAgOiBib3JkZXItYm94O1xuICAgIGxpc3Qtc3R5bGUgICAgICA6IG5vbmU7XG4gICAgcGFkZGluZyAgICAgICAgIDogMnB4O1xuICAgIG1hcmdpbiAgICAgICAgICA6IDJweDtcbiAgICBjdXJzb3IgICAgICAgICAgOiBwb2ludGVyO1xuICAgIGJvcmRlciAgICAgICAgICA6IDFweCBzb2xpZCByZ2JhKDAsIDAsIDAsIDAuMik7XG4gICAgd2lkdGggICAgICAgICAgIDogMzBweDtcbiAgICBoZWlnaHQgICAgICAgICAgOiAzMHB4O1xuICAgIGRpc3BsYXkgICAgICAgICA6IGZsZXg7XG4gICAganVzdGlmeS1jb250ZW50IDogY2VudGVyO1xuICAgIGFsaWduLWl0ZW1zICAgICA6IGNlbnRlcjtcbiAgICAmLmNvbG9yLXZhcmlhYmxlLWl0ZW0sXG4gICAgJi5idXR0b24tdmFyaWFibGUtaXRlbSB7XG4gICAgICAmLnJvdW5kZWQtc3R5bGUge1xuICAgICAgICBib3JkZXItcmFkaXVzIDogNTAlO1xuICAgICAgICBzcGFuIHtcbiAgICAgICAgICBib3JkZXItcmFkaXVzIDogNTAlO1xuICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgJi5zcXVhcmVkLXN0eWxlIHtcbiAgICAgICAgYm9yZGVyLXJhZGl1cyA6IDA7XG4gICAgICAgIHNwYW4ge1xuICAgICAgICAgIGJvcmRlci1yYWRpdXMgOiAwO1xuICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgfVxuXG4gICAgc3BhbiB7XG4gICAgICBwYWRkaW5nICAgOiAxMHB4O1xuICAgICA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7QUNRQTtBQUNBO0FEM0NBO0FBcUNBO0FDU0E7QUFDQTtBRG5EQTs7QUE4Q0E7QUNTQTtBQUNBO0FEcERBOztBQThDQTtBQUNBO0FDVUE7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=*/
|
assets/css/frontend.min.css
CHANGED
@@ -1,8 +1,8 @@
|
|
1 |
/*!
|
2 |
-
* Woo Variation Swatches v1.0.
|
3 |
*
|
4 |
* Author: Emran Ahmed ( emran.bd.08@gmail.com )
|
5 |
-
* Date:
|
6 |
* Released under the GPLv3 license.
|
7 |
*/
|
8 |
-
.variable-items-wrapper{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap}.variable-items-wrapper .variable-item{-webkit-box-sizing:border-box;box-sizing:border-box;list-style:none;padding:2px;margin:2px;cursor:pointer;border:1px solid rgba(0,0,0,.2);width:30px;height:30px;
|
1 |
/*!
|
2 |
+
* Woo Variation Swatches v1.0.2
|
3 |
*
|
4 |
* Author: Emran Ahmed ( emran.bd.08@gmail.com )
|
5 |
+
* Date: 2018-1-9 02:17:54
|
6 |
* Released under the GPLv3 license.
|
7 |
*/
|
8 |
+
.variable-items-wrapper{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap}.variable-items-wrapper .variable-item{-webkit-box-sizing:border-box;box-sizing:border-box;list-style:none;padding:2px;margin:2px;cursor:pointer;border:1px solid rgba(0,0,0,.2);width:30px;height:30px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.variable-items-wrapper .variable-item.button-variable-item.rounded-style,.variable-items-wrapper .variable-item.button-variable-item.rounded-style span,.variable-items-wrapper .variable-item.color-variable-item.rounded-style,.variable-items-wrapper .variable-item.color-variable-item.rounded-style span{border-radius:50%}.variable-items-wrapper .variable-item.button-variable-item.squared-style,.variable-items-wrapper .variable-item.button-variable-item.squared-style span,.variable-items-wrapper .variable-item.color-variable-item.squared-style,.variable-items-wrapper .variable-item.color-variable-item.squared-style span{border-radius:0}.variable-items-wrapper .variable-item span{padding:10px;font-size:small}.variable-items-wrapper .variable-item:last-of-type{margin-right:0}.variable-items-wrapper .variable-item.selected,.variable-items-wrapper .variable-item.selected:hover,.variable-items-wrapper .variable-item:hover{border:1px solid #000}.variable-items-wrapper .variable-item.disabled,.variable-items-wrapper .variable-item.disabled:hover{cursor:not-allowed;opacity:.5}
|
assets/js/admin.js
CHANGED
@@ -1,8 +1,8 @@
|
|
1 |
/*!
|
2 |
-
* Woo Variation Swatches v1.0.
|
3 |
*
|
4 |
* Author: Emran Ahmed ( emran.bd.08@gmail.com )
|
5 |
-
* Date:
|
6 |
* Released under the GPLv3 license.
|
7 |
*/
|
8 |
/******/ (function(modules) { // webpackBootstrap
|
@@ -76,7 +76,8 @@
|
|
76 |
|
77 |
__webpack_require__(1);
|
78 |
__webpack_require__(3);
|
79 |
-
|
|
|
80 |
|
81 |
|
82 |
/***/ }),
|
@@ -197,9 +198,11 @@ var PluginHelper = function ($) {
|
|
197 |
value: function SelectWoo() {
|
198 |
var selector = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'select.wvs-selectwoo';
|
199 |
|
200 |
-
$(
|
201 |
-
|
202 |
-
|
|
|
|
|
203 |
}
|
204 |
}, {
|
205 |
key: 'ColorPicker',
|
@@ -237,6 +240,12 @@ var PluginHelper = function ($) {
|
|
237 |
|
238 |
// removed by extract-text-webpack-plugin
|
239 |
|
|
|
|
|
|
|
|
|
|
|
|
|
240 |
/***/ })
|
241 |
/******/ ]);
|
242 |
-
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXNzZXRzL2pzL2FkbWluLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vL3dlYnBhY2svYm9vdHN0cmFwIDMzMGUxNTQ1Nzg2NGJmZDhlZmM2Iiwid2VicGFjaz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tZS5vcGVuKCk7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICAvLyBDcmVhdGUgdGhlIG1lZGlhIGZyYW1lLlxuICAgICAgICAgICAgICAgIGZpbGVfZnJhbWUgPSB3cC5tZWRpYS5mcmFtZXMuc2VsZWN0X2ltYWdlID0gd3AubWVkaWEoe1xuICAgICAgICAgICAgICAgICAgICB0aXRsZSAgICA6IFdWU1BsdWdpbk9iamVjdC5tZWRpYV90aXRsZSxcbiAgICAgICAgICAgICAgICAgICAgYnV0dG9uICAgOiB7XG4gICAgICAgICAgICAgICAgICAgICAgICB0ZXh0IDogV1ZTUGx1Z2luT2JqZWN0LmJ1dHRvbl90aXRsZVxuICAgICAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgICAgICBtdWx0aXBsZSA6IGZhbHNlLFxuICAgICAgICAgICAgICAgIH0pO1xuXG4gICAgICAgICAgICAgICAgLy8gV2hlbiBhbiBpbWFnZSBpcyBzZWxlY3RlZCwgcnVuIGEgY2FsbGJhY2suXG4gICAgICAgICAgICAgICAgZmlsZV9mcmFtZS5vbignc2VsZWN0JywgKCkgPT4ge1xuICAgICAgICAgICAgICAgICAgICBsZXQgYXR0YWNobWVudCA9IGZpbGVfZnJhbWUuc3RhdGUoKS5nZXQoJ3NlbGVjdGlvbicpLmZpcnN0KCkudG9KU09OKCk7XG5cbiAgICAgICAgICAgICAgICAgICAgaWYgKCQudHJpbShhdHRhY2htZW50LmlkKSAhPT0gJycpIHtcblxuICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHVybCA9ICggdHlwZW9mKGF0dGFjaG1lbnQuc2l6ZXMudGh1bWJuYWlsKSA9PT0gJ3VuZGVmaW5lZCcgKSA/IGF0dGFjaG1lbnQuc2l6ZXMuZnVsbC51cmwgOiBhdHRhY2htZW50LnNpemVzLnRodW1ibmFpbC51cmw7XG5cbiAgICAgICAgICAgICAgICAgICAgICAgICQodGhpcykucHJldigpLnZhbChhdHRhY2htZW50LmlkKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICQodGhpcykuY2xvc2VzdCgnLm1ldGEtaW1hZ2UtZmllbGQtd3JhcHBlcicpLmZpbmQoJ2ltZycpLmF0dHIoJ3NyYycsIHVybCk7XG4gICAgICAgICAgICAgICAgICAgICAgICAkKHRoaXMpLm5leHQoKS5zaG93KCk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgLy9maWxlX2ZyYW1lLmNsb3NlKCk7XG4gICAgICAgICAgICAgICAgfSk7XG5cbiAgICAgICAgICAgICAgICAvLyBXaGVuIG9wZW4gc2VsZWN0IHNlbGVjdGVkXG4gICAgICAgICAgICAgICAgZmlsZV9mcmFtZS5vbignb3BlbicsICgpID0+IHtcblxuICAgICAgICAgICAgICAgICAgICAvLyBHcmFiIG91ciBhdHRhY2htZW50IHNlbGVjdGlvbiBhbmQgY29uc3RydWN0IGEgSlNPTiByZXByZXNlbnRhdGlvbiBvZiB0aGUgbW9kZWwuXG4gICAgICAgICAgICAgICAgICAgIGxldCBzZWxlY3Rpb24gID0gZmlsZV9mcmFtZS5zdGF0ZSgpLmdldCgnc2VsZWN0aW9uJyk7XG4gICAgICAgICAgICAgICAgICAgIGxldCBjdXJyZW50ICAgID0gJCh0aGlzKS5wcmV2KCkudmFsKCk7XG4gICAgICAgICAgICAgICAgICAgIGxldCBhdHRhY2htZW50ID0gd3AubWVkaWEuYXR0YWNobWVudChjdXJyZW50KTtcbiAgICAgICAgICAgICAgICAgICAgYXR0YWNobWVudC5mZXRjaCgpO1xuICAgICAgICAgICAgICAgICAgICBzZWxlY3Rpb24uYWRkKGF0dGFjaG1lbnQgPyBbYXR0YWNobWVudF0gOiBbXSk7XG4gICAgICAgICAgICAgICAgfSk7XG5cbiAgICAgICAgICAgICAgICAvLyBGaW5hbGx5LCBvcGVuIHRoZSBtb2RhbC5cbiAgICAgICAgICAgICAgICBmaWxlX2ZyYW1lLm9wZW4oKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIHN0YXRpYyBSZW1vdmVJbWFnZShldmVudCkge1xuXG4gICAgICAgICAgICBldmVudC5wcmV2ZW50RGVmYXVsdCgpO1xuICAgICAgICAgICAgZXZlbnQuc3RvcFByb3BhZ2F0aW9uKCk7XG5cbiAgICAgICAgICAgIGxldCBwbGFjZWhvbGRlciA9ICQodGhpcykuY2xvc2VzdCgnLm1ldGEtaW1hZ2UtZmllbGQtd3JhcHBlcicpLmZpbmQoJ2ltZycpLmRhdGEoJ3BsYWNlaG9sZGVyJyk7XG4gICAgICAgICAgICAkKHRoaXMpLmNsb3Nlc3QoJy5tZXRhLWltYWdlLWZpZWxkLXdyYXBwZXInKS5maW5kKCdpbWcnKS5hdHRyKCdzcmMnLCBwbGFjZWhvbGRlcik7XG4gICAgICAgICAgICAkKHRoaXMpLnByZXYoKS5wcmV2KCkudmFsKCcnKTtcbiAgICAgICAgICAgICQodGhpcykuaGlkZSgpO1xuICAgICAgICAgICAgcmV0dXJuIGZhbHNlO1xuICAgICAgICB9XG5cbiAgICAgICAgc3RhdGljIFNlbGVjdFdvbyhzZWxlY3RvciA9ICdzZWxlY3Qud3ZzLXNlbGVjdHdvbycpIHtcbiAgICAgICAgICAgICQoc2VsZWN0b3IpLnNlbGVjdFdvbyh7XG4gICAgICAgICAgICAgICAgYWxsb3dDbGVhciA6IHRydWVcbiAgICAgICAgICAgIH0pO1xuICAgICAgICB9XG5cbiAgICAgICAgc3RhdGljIENvbG9yUGlja2VyKHNlbGVjdG9yID0gJ2lucHV0Lnd2cy1jb2xvci1waWNrZXInKSB7XG4gICAgICAgICAgICAkKHNlbGVjdG9yKS53cENvbG9yUGlja2VyKCk7XG4gICAgICAgIH1cblxuICAgICAgICBzdGF0aWMgRmllbGREZXBlbmRlbmN5KHNlbGVjdG9yID0gJ1tkYXRhLWRlcGVuZHNdJykge1xuICAgICAgICAgICAgJChzZWxlY3R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OztBIiwic291cmNlUm9vdCI6IiJ9
|
1 |
/*!
|
2 |
+
* Woo Variation Swatches v1.0.2
|
3 |
*
|
4 |
* Author: Emran Ahmed ( emran.bd.08@gmail.com )
|
5 |
+
* Date: 2018-1-9 02:17:48
|
6 |
* Released under the GPLv3 license.
|
7 |
*/
|
8 |
/******/ (function(modules) { // webpackBootstrap
|
76 |
|
77 |
__webpack_require__(1);
|
78 |
__webpack_require__(3);
|
79 |
+
__webpack_require__(4);
|
80 |
+
module.exports = __webpack_require__(5);
|
81 |
|
82 |
|
83 |
/***/ }),
|
198 |
value: function SelectWoo() {
|
199 |
var selector = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'select.wvs-selectwoo';
|
200 |
|
201 |
+
if ($().selectWoo) {
|
202 |
+
$(selector).selectWoo({
|
203 |
+
allowClear: true
|
204 |
+
});
|
205 |
+
}
|
206 |
}
|
207 |
}, {
|
208 |
key: 'ColorPicker',
|
240 |
|
241 |
// removed by extract-text-webpack-plugin
|
242 |
|
243 |
+
/***/ }),
|
244 |
+
/* 5 */
|
245 |
+
/***/ (function(module, exports) {
|
246 |
+
|
247 |
+
// removed by extract-text-webpack-plugin
|
248 |
+
|
249 |
/***/ })
|
250 |
/******/ ]);
|
251 |
+
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXNzZXRzL2pzL2FkbWluLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vL3dlYnBhY2svYm9vdHN0cmFwIGM0ZThkODk0ODU3OGZmZDM2Y2QxIiwid2VicGFjazovLy9zcmMvanMvYmFja2VuZC5qcyIsIndlYnBhY2s6Ly8vc3JjL2pzL1BsdWdpbkhlbHBlci5qcyIsIndlYnBhY2s6Ly8vLi9zcmMvc2Nzcy9iYWNrZW5kLnNjc3M/YmU2MSIsIndlYnBhY2s6Ly8vLi9zcmMvc2Nzcy9mcm9udGVuZC5zY3NzIiwid2VicGFjazovLy8uL3NyYy9zY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25zdCBQbHVnaW5IZWxwZXIgPSAoKCQpID0+IHtcbiAgICBjbGFzcyBQbHVnaW5IZWxwZXIge1xuXG4gICAgICAgIHN0YXRpYyBJbWFnZVVwbG9hZGVyKCkge1xuICAgICAgICAgICAgJChkb2N1bWVudCkub2ZmKCdjbGljaycsICdidXR0b24ud3ZzX3VwbG9hZF9pbWFnZV9idXR0b24nKTtcbiAgICAgICAgICAgICQoZG9jdW1lbnQpLm9uKCdjbGljaycsICdidXR0b24ud3ZzX3VwbG9hZF9pbWFnZV9idXR0b24nLCB0aGlzLkFkZEltYWdlKTtcbiAgICAgICAgICAgICQoZG9jdW1lbnQpLm9uKCdjbGljaycsICdidXR0b24ud3ZzX3JlbW92ZV9pbWFnZV9idXR0b24nLCB0aGlzLlJlbW92ZUltYWdlKTtcbiAgICAgICAgfVxuXG4gICAgICAgIHN0YXRpYyBBZGRJbWFnZShldmVudCkge1xuXG4gICAgICAgICAgICBldmVudC5wcmV2ZW50RGVmYXVsdCgpO1xuICAgICAgICAgICAgZXZlbnQuc3RvcFByb3BhZ2F0aW9uKCk7XG5cbiAgICAgICAgICAgIGxldCBmaWxlX2ZyYW1lO1xuXG4gICAgICAgICAgICBpZiAodHlwZW9mIHdwICE9PSAndW5kZWZpbmVkJyAmJiB3cC5tZWRpYSAmJiB3cC5tZWRpYS5lZGl0b3IpIHtcblxuICAgICAgICAgICAgICAgIC8vIElmIHRoZSBtZWRpYSBmcmFtZSBhbHJlYWR5IGV4aXN0cywgcmVvcGVuIGl0LlxuICAgICAgICAgICAgICAgIGlmIChmaWxlX2ZyYW1lKSB7XG4gICAgICAgICAgICAgICAgICAgIGZpbGVfZnJhbWUub3BlbigpO1xuICAgICAgICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgLy8gQ3JlYXRlIHRoZSBtZWRpYSBmcmFtZS5cbiAgICAgICAgICAgICAgICBmaWxlX2ZyYW1lID0gd3AubWVkaWEuZnJhbWVzLnNlbGVjdF9pbWFnZSA9IHdwLm1lZGlhKHtcbiAgICAgICAgICAgICAgICAgICAgdGl0bGUgICAgOiBXVlNQbHVnaW5PYmplY3QubWVkaWFfdGl0bGUsXG4gICAgICAgICAgICAgICAgICAgIGJ1dHRvbiAgIDoge1xuICAgICAgICAgICAgICAgICAgICAgICAgdGV4dCA6IFdWU1BsdWdpbk9iamVjdC5idXR0b25fdGl0bGVcbiAgICAgICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICAgICAgbXVsdGlwbGUgOiBmYWxzZSxcbiAgICAgICAgICAgICAgICB9KTtcblxuICAgICAgICAgICAgICAgIC8vIFdoZW4gYW4gaW1hZ2UgaXMgc2VsZWN0ZWQsIHJ1biBhIGNhbGxiYWNrLlxuICAgICAgICAgICAgICAgIGZpbGVfZnJhbWUub24oJ3NlbGVjdCcsICgpID0+IHtcbiAgICAgICAgICAgICAgICAgICAgbGV0IGF0dGFjaG1lbnQgPSBmaWxlX2ZyYW1lLnN0YXRlKCkuZ2V0KCdzZWxlY3Rpb24nKS5maXJzdCgpLnRvSlNPTigpO1xuXG4gICAgICAgICAgICAgICAgICAgIGlmICgkLnRyaW0oYXR0YWNobWVudC5pZCkgIT09ICcnKSB7XG5cbiAgICAgICAgICAgICAgICAgICAgICAgIGxldCB1cmwgPSAoIHR5cGVvZihhdHRhY2htZW50LnNpemVzLnRodW1ibmFpbCkgPT09ICd1bmRlZmluZWQnICkgPyBhdHRhY2htZW50LnNpemVzLmZ1bGwudXJsIDogYXR0YWNobWVudC5zaXplcy50aHVtYm5haWwudXJsO1xuXG4gICAgICAgICAgICAgICAgICAgICAgICAkKHRoaXMpLnByZXYoKS52YWwoYXR0YWNobWVudC5pZCk7XG4gICAgICAgICAgICAgICAgICAgICAgICAkKHRoaXMpLmNsb3Nlc3QoJy5tZXRhLWltYWdlLWZpZWxkLXdyYXBwZXInKS5maW5kKCdpbWcnKS5hdHRyKCdzcmMnLCB1cmwpO1xuICAgICAgICAgICAgICAgICAgICAgICAgJCh0aGlzKS5uZXh0KCkuc2hvdygpO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIC8vZmlsZV9mcmFtZS5jbG9zZSgpO1xuICAgICAgICAgICAgICAgIH0pO1xuXG4gICAgICAgICAgICAgICAgLy8gV2hlbiBvcGVuIHNlbGVjdCBzZWxlY3RlZFxuICAgICAgICAgICAgICAgIGZpbGVfZnJhbWUub24oJ29wZW4nLCAoKSA9PiB7XG5cbiAgICAgICAgICAgICAgICAgICAgLy8gR3JhYiBvdXIgYXR0YWNobWVudCBzZWxlY3Rpb24gYW5kIGNvbnN0cnVjdCBhIEpTT04gcmVwcmVzZW50YXRpb24gb2YgdGhlIG1vZGVsLlxuICAgICAgICAgICAgICAgICAgICBsZXQgc2VsZWN0aW9uICA9IGZpbGVfZnJhbWUuc3RhdGUoKS5nZXQoJ3NlbGVjdGlvbicpO1xuICAgICAgICAgICAgICAgICAgICBsZXQgY3VycmVudCAgICA9ICQodGhpcykucHJldigpLnZhbCgpO1xuICAgICAgICAgICAgICAgICAgICBsZXQgYXR0YWNobWVudCA9IHdwLm1lZGlhLmF0dGFjaG1lbnQoY3VycmVudCk7XG4gICAgICAgICAgICAgICAgICAgIGF0dGFjaG1lbnQuZmV0Y2goKTtcbiAgICAgICAgICAgICAgICAgICAgc2VsZWN0aW9uLmFkZChhdHRhY2htZW50ID8gW2F0dGFjaG1lbnRdIDogW10pO1xuICAgICAgICAgICAgICAgIH0pO1xuXG4gICAgICAgICAgICAgICAgLy8gRmluYWxseSwgb3BlbiB0aGUgbW9kYWwuXG4gICAgICAgICAgICAgICAgZmlsZV9mcmFtZS5vcGVuKCk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICBzdGF0aWMgUmVtb3ZlSW1hZ2UoZXZlbnQpIHtcblxuICAgICAgICAgICAgZXZlbnQucHJldmVudERlZmF1bHQoKTtcbiAgICAgICAgICAgIGV2ZW50LnN0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ZBO0FBQUE7QUFBQTtBQXdGQTtBQUNBO0FBQUE7QUFDQTtBQTFGQTtBQUNBO0FBREE7QUFBQTtBQUNBO0FBNEZBO0FBQ0E7QUFDQTs7Ozs7OztBQ2pHQTs7Ozs7O0FDQUE7Ozs7OztBQ0FBOzs7QSIsInNvdXJjZVJvb3QiOiIifQ==
|
assets/js/admin.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
!function(e){function t(o){if(n[o])return n[o].exports;var i=n[o]={i:o,l:!1,exports:{}};return e[o].call(i.exports,i,i.exports,t),i.l=!0,i.exports}var n={};t.m=e,t.c=n,t.d=function(e,n,o){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:o})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=0)}([function(e,t,n){n(1),n(3),e.exports=n(
|
1 |
+
!function(e){function t(o){if(n[o])return n[o].exports;var i=n[o]={i:o,l:!1,exports:{}};return e[o].call(i.exports,i,i.exports,t),i.l=!0,i.exports}var n={};t.m=e,t.c=n,t.d=function(e,n,o){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:o})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=0)}([function(e,t,n){n(1),n(3),n(4),e.exports=n(5)},function(e,t,n){jQuery(function(e){Promise.resolve().then(function(){return n(2)}).then(function(e){var t=e.PluginHelper;t.SelectWoo(),t.ColorPicker(),t.FieldDependency(),t.ImageUploader()})})},function(e,t,n){"use strict";function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0}),n.d(t,"PluginHelper",function(){return r});var i=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),r=function(e){return function(){function t(){o(this,t)}return i(t,null,[{key:"ImageUploader",value:function(){e(document).off("click","button.wvs_upload_image_button"),e(document).on("click","button.wvs_upload_image_button",this.AddImage),e(document).on("click","button.wvs_remove_image_button",this.RemoveImage)}},{key:"AddImage",value:function(t){var n=this;t.preventDefault(),t.stopPropagation();var o=void 0;if("undefined"!=typeof wp&&wp.media&&wp.media.editor){if(o)return void o.open();o=wp.media.frames.select_image=wp.media({title:WVSPluginObject.media_title,button:{text:WVSPluginObject.button_title},multiple:!1}),o.on("select",function(){var t=o.state().get("selection").first().toJSON();if(""!==e.trim(t.id)){var i=void 0===t.sizes.thumbnail?t.sizes.full.url:t.sizes.thumbnail.url;e(n).prev().val(t.id),e(n).closest(".meta-image-field-wrapper").find("img").attr("src",i),e(n).next().show()}}),o.on("open",function(){var t=o.state().get("selection"),i=e(n).prev().val(),r=wp.media.attachment(i);r.fetch(),t.add(r?[r]:[])}),o.open()}}},{key:"RemoveImage",value:function(t){t.preventDefault(),t.stopPropagation();var n=e(this).closest(".meta-image-field-wrapper").find("img").data("placeholder");return e(this).closest(".meta-image-field-wrapper").find("img").attr("src",n),e(this).prev().prev().val(""),e(this).hide(),!1}},{key:"SelectWoo",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"select.wvs-selectwoo";e().selectWoo&&e(t).selectWoo({allowClear:!0})}},{key:"ColorPicker",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"input.wvs-color-picker";e(t).wpColorPicker()}},{key:"FieldDependency",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"[data-depends]";e(t).FormFieldDependency()}}]),t}()}(jQuery)},function(e,t){},function(e,t){},function(e,t){}]);
|
assets/js/frontend.js
CHANGED
@@ -1,8 +1,8 @@
|
|
1 |
/*!
|
2 |
-
* Woo Variation Swatches v1.0.
|
3 |
*
|
4 |
* Author: Emran Ahmed ( emran.bd.08@gmail.com )
|
5 |
-
* Date:
|
6 |
* Released under the GPLv3 license.
|
7 |
*/
|
8 |
/******/ (function(modules) { // webpackBootstrap
|
@@ -67,28 +67,25 @@
|
|
67 |
/******/ __webpack_require__.p = "";
|
68 |
/******/
|
69 |
/******/ // Load entry module and return exports
|
70 |
-
/******/ return __webpack_require__(__webpack_require__.s =
|
71 |
/******/ })
|
72 |
/************************************************************************/
|
73 |
-
/******/ (
|
74 |
-
|
75 |
-
|
76 |
-
/* 2 */,
|
77 |
-
/* 3 */,
|
78 |
-
/* 4 */,
|
79 |
-
/* 5 */
|
80 |
/***/ (function(module, exports, __webpack_require__) {
|
81 |
|
82 |
-
module.exports = __webpack_require__(
|
83 |
|
84 |
|
85 |
/***/ }),
|
86 |
-
|
|
|
87 |
/***/ (function(module, exports, __webpack_require__) {
|
88 |
|
89 |
jQuery(function ($) {
|
90 |
Promise.resolve().then(function () {
|
91 |
-
return __webpack_require__(
|
92 |
}).then(function () {
|
93 |
// Init on Ajax Popup :)
|
94 |
$(document).on('wc_variation_form', '.variations_form', function () {
|
@@ -98,7 +95,8 @@ jQuery(function ($) {
|
|
98 |
}); // end of jquery main wrapper
|
99 |
|
100 |
/***/ }),
|
101 |
-
|
|
|
102 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
103 |
|
104 |
"use strict";
|
@@ -240,5 +238,6 @@ var CustomVariationSelect = function ($) {
|
|
240 |
/* harmony default export */ __webpack_exports__["default"] = (CustomVariationSelect);
|
241 |
|
242 |
/***/ })
|
243 |
-
|
244 |
-
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXNzZXRzL2pzL2Zyb250ZW5kLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vL3dlYnBhY2svYm9vdHN0cmFwIDMzMGUxNTQ1Nzg2NGJmZDhlZmM2Iiwid2VicGFjaz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pzIiwiLy8gPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PVxuLy8gV29vQ29tbWVyY2UgVmFyaWF0aW9uIENoYW5nZVxuLy8gPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PVxuXG5jb25zdCBDdXN0b21WYXJpYXRpb25TZWxlY3QgPSAoKCQpID0+IHtcblxuICAgIGNvbnN0IERlZmF1bHQgPSB7fTtcblxuICAgIGNsYXNzIEN1c3RvbVZhcmlhdGlvblNlbGVjdCB7XG5cbiAgICAgICAgY29uc3RydWN0b3IoZWxlbWVudCwgY29uZmlnKSB7XG5cbiAgICAgICAgICAgIC8vIEFzc2lnblxuICAgICAgICAgICAgdGhpcy5fZWxlbWVudCA9ICQoZWxlbWVudCk7XG4gICAgICAgICAgICB0aGlzLl9jb25maWcgID0gJC5leHRlbmQoe30sIERlZmF1bHQsIGNvbmZpZyk7XG5cbiAgICAgICAgICAgIC8vIENhbGxcbiAgICAgICAgICAgIC8vdGhpcy5hZGRJbnB1dE1hcmt1cCgpO1xuICAgICAgICAgICAgdGhpcy53cmFwcGVyQWN0aW9uKCk7XG4gICAgICAgICAgICB0aGlzLnJlc2V0RGF0YUFjdGlvbigpO1xuICAgICAgICAgICAgdGhpcy51cGRhdGVWYXJpYXRpb25WYWx1ZUFjdGlvbigpO1xuXG4gICAgICAgICAgICAkKGRvY3VtZW50KS50cmlnZ2VyKCdjdXN0b21fdmFyaWF0aW9uX3NlbGVjdCcpO1xuICAgICAgICB9XG5cbiAgICAgICAgc3RhdGljIF9qUXVlcnlJbnRlcmZhY2UoY29uZmlnKSB7XG4gICAgICAgICAgICByZXR1cm4gdGhpcy5lYWNoKGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgICAgICBuZXcgQ3VzdG9tVmFyaWF0aW9uU2VsZWN0KHRoaXMsIGNvbmZpZylcbiAgICAgICAgICAgIH0pXG4gICAgICAgIH1cblxuICAgICAgICB3cmFwcGVyQWN0aW9uKCkge1xuICAgICAgICAgICAgdGhpcy5fZWxlbWVudC5maW5kKCd1bC52YXJpYWJsZS1pdGVtcy13cmFwcGVyJykuZWFjaChmdW5jdGlvbiAoaSwgZWwpIHtcblxuICAgICAgICAgICAgICAgIGxldCBzZWxlY3QgPSAkKHRoaXMpLnByZXYoJ3NlbGVjdCcpLFxuICAgICAgICAgICAgICAgICAgICBsaSAgICAgPSAkKHRoaXMpLmZpbmQoJ2xpJyk7XG5cbiAgICAgICAgICAgICAgICAkKHRoaXMpLm9uKCdjbGljaycsICdsaScsIGZ1bmN0aW9uIChlKSB7XG4gICAgICAgICAgICAgICAgICAgIGUucHJldmVudERlZmF1bHQoKTtcbiAgICAgICAgICAgICAgICAgICAgZS5zdG9wUHJvcGFnYXRpb24oKTtcbiAgICAgICAgICAgICAgICAgICAgbGV0IHZhbHVlID0gJCh0aGlzKS5kYXRhKCd2YWx1ZScpO1xuICAgICAgICAgICAgICAgICAgICBzZWxlY3QudmFsKHZhbHVlKS50cmlnZ2VyKCdjaGFuZ2UnKTtcbiAgICAgICAgICAgICAgICAgICAgc2VsZWN0LnRyaWdnZXIoJ2NsaWNrJyk7XG4gICAgICAgICAgICAgICAgICAgIHNlbGVjdC50cmlnZ2VyKCdmb2N1c2luJyk7XG4gICAgICAgICAgICAgICAgICAgIHNlbGVjdC50cmlnZ2VyKCd0b3VjaHN0YXJ0Jyk7XG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICB9KTtcbiAgICAgICAgfVxuXG4gICAgICAgIHJlc2V0RGF0YUFjdGlvbigpIHtcbiAgICAgICAgICAgIHRoaXMuX2VsZW1lbnQub24oJ3Jlc2V0X2RhdGEnLCBmdW5jdGlvbiAoZXZlbnQpIHtcbiAgICAgICAgICAgICAgICAkKHRoaXMpLmZpbmQoJ3VsLnZhcmlhYmxlLWl0ZW1zLXdyYXBwZXInKS5lYWNoKGZ1bmN0aW9uICgpIHtcblxuICAgICAgICAgICAgICAgICAgICBsZXQgbGkgPSAkKHRoaXMpLmZpbmQoJ2xpJyk7XG4gICAgICAgICAgICAgICAgICAgIGxpLmVhY2goZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgJCh0aGlzKS5yZW1vdmVDbGFzcygnc2VsZWN0ZWQnKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICQodGhpcykucmVtb3ZlQ2xhc3MoJ2Rpc2FibGVkJyk7XG4gICAgICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgfSk7XG4gICAgICAgIH1cblxuICAgICAgICB1cGRhdGVWYXJpYXRpb25WYWx1ZUFjdGlvbigpIHtcbiAgICAgICAgICAgIHRoaXMuX2VsZW1lbnQub24oJ3dvb2NvbW1lcmNlX3VwZGF0ZV92YXJpYXRpb25fdmFsdWVzJywgZnVuY3Rpb24gKGV2ZW50KSB7XG4gICAgICAgICAgICAgICAgJCh0aGlzKS5maW5kKCd1bC52YXJpYWJsZS1pdGVtcy13cmFwcGVyJykuZWFjaChmdW5jdGlvbiAoKSB7XG5cbiAgICAgICAgICAgICAgICAgICAgbGV0IHNlbGVjdGVkID0gJycsXG4gICAgICAgICAgICAgICAgICAgICAgICBvcHRpb25zICA9ICQodGhpcykucHJldignc2VsZWN0JykuZmluZCgnb3B0aW9uJyksXG4gICAgICAgICAgICAgICAgICAgICAgICBjdXJyZW50ICA9ICQodGhpcykucHJldignc2VsZWN0JykuZmluZCgnb3B0aW9uOnNlbGVjdGVkJyksXG4gICAgICAgICAgICAgICAgICAgICAgICBlcSAgICAgICA9ICQodGhpcykucHJldignc2VsZWN0JykuZmluZCgnb3B0aW9uJykuZXEoMSksXG4gICAgICAgICAgICAgICAgICAgICAgICBsaSAgICAgICA9ICQodGhpcykuZmluZCgnbGknKSxcbiAgICAgICAgICAgICAgICAgICAgICAgIHNlbGVjdHMgID0gW107XG5cbiAgICAgICAgICAgICAgICAgICAgb3B0aW9ucy5lYWNoKGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmICgkKHRoaXMpLnZhbCgpICE9PSAnJykge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNlbGVjdHMucHVzaCgkKHRoaXMpLnZhbCgpKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBzZWxlY3RlZCA9IGN1cnJlbnQgPyBjdXJyZW50LnZhbCgpIDogZXEudmFsKCk7XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIH0pO1xuXG4gICAgICAgICAgICAgICAgICAgIF8uZGVsYXkoZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgbGkuZWFjaChmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHZhbHVlID0gJCh0aGlzKS5kYXRhKCd2YWx1ZScpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICQodGhpcykucmVtb3ZlQ2xhc3MoJ3NlbGVjdGVkIGRpc2FibGVkJyk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKF8uY29udGFpbnMoc2VsZWN0cywgdmFsdWUpKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICQodGhpcykucmVtb3ZlQ2xhc3MoJ2Rpc2FibGVkJyk7XG5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHZhbHVlID09PSBzZWxlY3RlZCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJCh0aGlzKS5hZGRDbGFzcygnc2VsZWN0ZWQnKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJ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E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFwQkE7QUFBQTtBQUFBO0FBNEJBO0FBQ0E7QUFDQTtBQUFBO0FBQ0E7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBM0NBO0FBQUE7QUFBQTtBQThDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBeERBO0FBQUE7QUFBQTtBQTJEQTtBQUNBO0FBQ0E7QUFDQTtBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFDQTtBQU1BO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBRUE7QUFDQTtBQUNBO0FBL0ZBO0FBQUE7QUFBQTtBQXNCQTtBQUNBO0FBQ0E7QUFDQTtBQXpCQTtBQUNBO0FBREE7QUFBQTtBQUNBO0FBaUdBOzs7Ozs7QUFNQTs7Ozs7O0FBTUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUVBO0FBQ0E7QUFDQTs7O0EiLCJzb3VyY2VSb290IjoiIn0=
|
|
1 |
/*!
|
2 |
+
* Woo Variation Swatches v1.0.2
|
3 |
*
|
4 |
* Author: Emran Ahmed ( emran.bd.08@gmail.com )
|
5 |
+
* Date: 2018-1-9 02:17:48
|
6 |
* Released under the GPLv3 license.
|
7 |
*/
|
8 |
/******/ (function(modules) { // webpackBootstrap
|
67 |
/******/ __webpack_require__.p = "";
|
68 |
/******/
|
69 |
/******/ // Load entry module and return exports
|
70 |
+
/******/ return __webpack_require__(__webpack_require__.s = 6);
|
71 |
/******/ })
|
72 |
/************************************************************************/
|
73 |
+
/******/ ({
|
74 |
+
|
75 |
+
/***/ 6:
|
|
|
|
|
|
|
|
|
76 |
/***/ (function(module, exports, __webpack_require__) {
|
77 |
|
78 |
+
module.exports = __webpack_require__(7);
|
79 |
|
80 |
|
81 |
/***/ }),
|
82 |
+
|
83 |
+
/***/ 7:
|
84 |
/***/ (function(module, exports, __webpack_require__) {
|
85 |
|
86 |
jQuery(function ($) {
|
87 |
Promise.resolve().then(function () {
|
88 |
+
return __webpack_require__(8);
|
89 |
}).then(function () {
|
90 |
// Init on Ajax Popup :)
|
91 |
$(document).on('wc_variation_form', '.variations_form', function () {
|
95 |
}); // end of jquery main wrapper
|
96 |
|
97 |
/***/ }),
|
98 |
+
|
99 |
+
/***/ 8:
|
100 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
101 |
|
102 |
"use strict";
|
238 |
/* harmony default export */ __webpack_exports__["default"] = (CustomVariationSelect);
|
239 |
|
240 |
/***/ })
|
241 |
+
|
242 |
+
/******/ });
|
243 |
+
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXNzZXRzL2pzL2Zyb250ZW5kLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vL3dlYnBhY2svYm9vdHN0cmFwIGM0ZThkODk0ODU3OGZmZDM2Y2QxIiwid2VicGFjazovLy9zcmMvanMvZnJvbnRlbmQuanMiLCJ3ZWJwYWNrOi8vL3NyYy9qcy9DdXN0b21WYXJpYXRpb25TZWxlY3QuanMiXSwic291cmNlc0NvbnRlbnQiOlsiIFx0Ly8gVGhlIG1vZHVsZSBjYWNoZVxuIFx0dmFyIGluc3RhbGxlZE1vZHVsZXMgPSB7fTtcblxuIFx0Ly8gVGhlIHJlcXVpcmUgZnVuY3Rpb25cbiBcdGZ1bmN0aW9uIF9fd2VicGFja19yZXF1aXJlX18obW9kdWxlSWQpIHtcblxuIFx0XHQv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zIEN1c3RvbVZhcmlhdGlvblNlbGVjdCB7XG5cbiAgICAgICAgY29uc3RydWN0b3IoZWxlbWVudCwgY29uZmlnKSB7XG5cbiAgICAgICAgICAgIC8vIEFzc2lnblxuICAgICAgICAgICAgdGhpcy5fZWxlbWVudCA9ICQoZWxlbWVudCk7XG4gICAgICAgICAgICB0aGlzLl9jb25maWcgID0gJC5leHRlbmQoe30sIERlZmF1bHQsIGNvbmZpZyk7XG5cbiAgICAgICAgICAgIC8vIENhbGxcbiAgICAgICAgICAgIC8vdGhpcy5hZGRJbnB1dE1hcmt1cCgpO1xuICAgICAgICAgICAgdGhpcy53cmFwcGVyQWN0aW9uKCk7XG4gICAgICAgICAgICB0aGlzLnJlc2V0RGF0YUFjdGlvbigpO1xuICAgICAgICAgICAgdGhpcy51cGRhdGVWYXJpYXRpb25WYWx1ZUFjdGlvbigpO1xuXG4gICAgICAgICAgICAkKGRvY3VtZW50KS50cmlnZ2VyKCdjdXN0b21fdmFyaWF0aW9uX3NlbGVjdCcpO1xuICAgICAgICB9XG5cbiAgICAgICAgc3RhdGljIF9qUXVlcnlJbnRlcmZhY2UoY29uZmlnKSB7XG4gICAgICAgICAgICByZXR1cm4gdGhpcy5lYWNoKGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgICAgICBuZXcgQ3VzdG9tVmFyaWF0aW9uU2VsZWN0KHRoaXMsIGNvbmZpZylcbiAgICAgICAgICAgIH0pXG4gICAgICAgIH1cblxuICAgICAgICB3cmFwcGVyQWN0aW9uKCkge1xuICAgICAgICAgICAgdGhpcy5fZWxlbWVudC5maW5kKCd1bC52YXJpYWJsZS1pdGVtcy13cmFwcGVyJykuZWFjaChmdW5jdGlvbiAoaSwgZWwpIHtcblxuICAgICAgICAgICAgICAgIGxldCBzZWxlY3QgPSAkKHRoaXMpLnByZXYoJ3NlbGVjdCcpLFxuICAgICAgICAgICAgICAgICAgICBsaSAgICAgPSAkKHRoaXMpLmZpbmQoJ2xpJyk7XG5cbiAgICAgICAgICAgICAgICAkKHRoaXMpLm9uKCdjbGljaycsICdsaScsIGZ1bmN0aW9uIChlKSB7XG4gICAgICAgICAgICAgICAgICAgIGUucHJldmVudERlZmF1bHQoKTtcbiAgICAgICAgICAgICAgICAgICAgZS5zdG9wUHJvcGFnYXRpb24oKTtcbiAgICAgICAgICAgICAgICAgICAgbGV0IHZhbHVlID0gJCh0aGlzKS5kYXRhKCd2YWx1ZScpO1xuICAgICAgICAgICAgICAgICAgICBzZWxlY3QudmFsKHZhbHVlKS50cmlnZ2VyKCdjaGFuZ2UnKTtcbiAgICAgICAgICAgICAgICAgICAgc2VsZWN0LnRyaWdnZXIoJ2NsaWNrJyk7XG4gICAgICAgICAgICAgICAgICAgIHNlbGVjdC50cmlnZ2VyKCdmb2N1c2luJyk7XG4gICAgICAgICAgICAgICAgICAgIHNlbGVjdC50cmlnZ2VyKCd0b3VjaHN0YXJ0Jyk7XG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICB9KTtcbiAgICAgICAgfVxuXG4gICAgICAgIHJlc2V0RGF0YUFjdGlvbigpIHtcbiAgICAgICAgICAgIHRoaXMuX2VsZW1lbnQub24oJ3Jlc2V0X2RhdGEnLCBmdW5jdGlvbiAoZXZlbnQpIHtcbiAgICAgICAgICAgICAgICAkKHRoaXMpLmZpbmQoJ3VsLnZhcmlhYmxlLWl0ZW1zLXdyYXBwZXInKS5lYWNoKGZ1bmN0aW9uICgpIHtcblxuICAgICAgICAgICAgICAgICAgICBsZXQgbGkgPSAkKHRoaXMpLmZpbmQoJ2xpJyk7XG4gICAgICAgICAgICAgICAgICAgIGxpLmVhY2goZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgJCh0aGlzKS5yZW1vdmVDbGFzcygnc2VsZWN0ZWQnKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICQodGhpcykucmVtb3ZlQ2xhc3MoJ2Rpc2FibGVkJyk7XG4gICAgICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgfSk7XG4gICAgICAgIH1cblxuICAgICAgICB1cGRhdGVWYXJpYXRpb25WYWx1ZUFjdGlvbigpIHtcbiAgICAgICAgICAgIHRoaXMuX2VsZW1lbnQub24oJ3dvb2NvbW1lcmNlX3VwZGF0ZV92YXJpYXRpb25fdmFsdWVzJywgZnVuY3Rpb24gKGV2ZW50KSB7XG4gICAgICAgICAgICAgICAgJCh0aGlzKS5maW5kKCd1bC52YXJpYWJsZS1pdGVtcy13cmFwcGVyJykuZWFjaChmdW5jdGlvbiAoKSB7XG5cbiAgICAgICAgICAgICAgICAgICAgbGV0IHNlbGVjdGVkID0gJycsXG4gICAgICAgICAgICAgICAgICAgICAgICBvcHRpb25zICA9ICQodGhpcykucHJldignc2VsZWN0JykuZmluZCgnb3B0aW9uJyksXG4gICAgICAgICAgICAgICAgICAgICAgICBjdXJyZW50ICA9ICQodGhpcykucHJldignc2VsZWN0JykuZmluZCgnb3B0aW9uOnNlbGVjdGVkJyksXG4gICAgICAgICAgICAgICAgICAgICAgICBlcSAgICAgICA9ICQodGhpcykucHJldignc2VsZWN0JykuZmluZCgnb3B0aW9uJykuZXEoMSksXG4gICAgICAgICAgICAgICAgICAgICAgICBsaSAgICAgICA9ICQodGhpcykuZmluZCgnbGknKSxcbiAgICAgICAgICAgICAgICAgICAgICAgIHNlbGVjdHMgID0gW107XG5cbiAgICAgICAgICAgICAgICAgICAgb3B0aW9ucy5lYWNoKGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmICgkKHRoaXMpLnZhbCgpICE9PSAnJykge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNlbGVjdHMucHVzaCgkKHRoaXMpLnZhbCgpKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBzZWxlY3RlZCA9IGN1cnJlbnQgPyBjdXJyZW50LnZhbCgpIDogZXEudmFsKCk7XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIH0pO1xuXG4gICAgICAgICAgICAgICAgICAgIF8uZGVsYXkoZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgbGkuZWFjaChmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHZhbHVlID0gJCh0aGlzKS5kYXRhKCd2YWx1ZScpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICQodGhpcykucmVtb3ZlQ2xhc3MoJ3NlbGVjdGVkIGRpc2FibGVkJyk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKF8uY29udGFpbnMoc2VsZWN0cywgdmFsdWUpKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICQodGhpcykucmVtb3ZlQ2xhc3MoJ2Rpc2FibGVkJyk7XG5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHZhbHVlID09PSBzZWxlY3RlZCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJCh0aGlzKS5hZGRDbGFzcygnc2VsZWN0ZWQnKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJCh0aGlzKS5hZGRDbGFzcygnZGlzYWJsZWQnKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICAgICAgfSwgMSk7XG5cbiAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIH0pO1xuICAgICAgICB9XG4gICAgfVxuXG4gICAgLyoqXG4gICAgICogLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tL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QUFDQTtBQXhEQTtBQUFBO0FBQUE7QUEyREE7QUFDQTtBQUNBO0FBQ0E7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQ0E7QUFNQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUVBO0FBQ0E7QUFDQTtBQS9GQTtBQUFBO0FBQUE7QUFzQkE7QUFDQTtBQUNBO0FBQ0E7QUF6QkE7QUFDQTtBQURBO0FBQUE7QUFDQTtBQWlHQTs7Ozs7O0FBTUE7Ozs7OztBQU1BO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFFQTtBQUNBO0FBQ0E7Ozs7QSIsInNvdXJjZVJvb3QiOiIifQ==
|
assets/js/frontend.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
!function(e){function t(i){if(n[i])return n[i].exports;var r=n[i]={i:i,l:!1,exports:{}};return e[i].call(r.exports,r,r.exports,t),r.l=!0,r.exports}var n={};t.m=e,t.c=n,t.d=function(e,n,i){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:i})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=
|
1 |
+
!function(e){function t(i){if(n[i])return n[i].exports;var r=n[i]={i:i,l:!1,exports:{}};return e[i].call(r.exports,r,r.exports,t),r.l=!0,r.exports}var n={};t.m=e,t.c=n,t.d=function(e,n,i){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:i})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=6)}({6:function(e,t,n){e.exports=n(7)},7:function(e,t,n){jQuery(function(e){Promise.resolve().then(function(){return n(8)}).then(function(){e(document).on("wc_variation_form",".variations_form",function(){e(this).CustomVariationSelect()})})})},8:function(e,t,n){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),a=function(e){var t={},n=function(){function n(r,a){i(this,n),this._element=e(r),this._config=e.extend({},t,a),this.wrapperAction(),this.resetDataAction(),this.updateVariationValueAction(),e(document).trigger("custom_variation_select")}return r(n,[{key:"wrapperAction",value:function(){this._element.find("ul.variable-items-wrapper").each(function(t,n){var i=e(this).prev("select");e(this).find("li");e(this).on("click","li",function(t){t.preventDefault(),t.stopPropagation();var n=e(this).data("value");i.val(n).trigger("change"),i.trigger("click"),i.trigger("focusin"),i.trigger("touchstart")})})}},{key:"resetDataAction",value:function(){this._element.on("reset_data",function(t){e(this).find("ul.variable-items-wrapper").each(function(){e(this).find("li").each(function(){e(this).removeClass("selected"),e(this).removeClass("disabled")})})})}},{key:"updateVariationValueAction",value:function(){this._element.on("woocommerce_update_variation_values",function(t){e(this).find("ul.variable-items-wrapper").each(function(){var t="",n=e(this).prev("select").find("option"),i=e(this).prev("select").find("option:selected"),r=e(this).prev("select").find("option").eq(1),a=e(this).find("li"),o=[];n.each(function(){""!==e(this).val()&&(o.push(e(this).val()),t=i?i.val():r.val())}),_.delay(function(){a.each(function(){var n=e(this).data("value");e(this).removeClass("selected disabled"),_.contains(o,n)?(e(this).removeClass("disabled"),n===t&&e(this).addClass("selected")):e(this).addClass("disabled")})},1)})})}}],[{key:"_jQueryInterface",value:function(e){return this.each(function(){new n(this,e)})}}]),n}();return e.fn.CustomVariationSelect=n._jQueryInterface,e.fn.CustomVariationSelect.Constructor=n,e.fn.CustomVariationSelect.noConflict=function(){return e.fn.CustomVariationSelect=e.fn.CustomVariationSelect,n._jQueryInterface},n}(jQuery);t.default=a}});
|
includes/class-wvs-settings-api.php
ADDED
@@ -0,0 +1,466 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
+
|
3 |
+
defined( 'ABSPATH' ) or die( 'Keep Quit' );
|
4 |
+
|
5 |
+
// 1. add settings: priority 1
|
6 |
+
// 2. initial class: priority 2
|
7 |
+
// 3. store defaults: priority 3
|
8 |
+
// 4. get defaults / do whatever you want to do
|
9 |
+
|
10 |
+
if ( ! class_exists( 'WVS_Settings_API' ) ):
|
11 |
+
|
12 |
+
class WVS_Settings_API {
|
13 |
+
|
14 |
+
private $setting_name = 'woo_variation_swatches';
|
15 |
+
private $slug;
|
16 |
+
private $plugin_class;
|
17 |
+
private $defaults = array();
|
18 |
+
|
19 |
+
private $fields = array();
|
20 |
+
|
21 |
+
public function __construct() {
|
22 |
+
|
23 |
+
$this->plugin_class = woo_variation_swatches();
|
24 |
+
|
25 |
+
$this->settings_name = apply_filters( 'wvs_settings_name', $this->setting_name );
|
26 |
+
|
27 |
+
$this->slug = sprintf( '%s-settings', sanitize_key( $this->plugin_class->dirname() ) );
|
28 |
+
|
29 |
+
$this->fields = apply_filters( 'wvs_settings', $this->fields );
|
30 |
+
|
31 |
+
add_action( 'admin_menu', array( $this, 'add_menu' ) );
|
32 |
+
|
33 |
+
add_action( 'init', array( $this, 'set_defaults' ), 8 );
|
34 |
+
|
35 |
+
add_action( 'admin_init', array( $this, 'settings_init' ), 90 );
|
36 |
+
|
37 |
+
add_filter( 'plugin_action_links_' . $this->plugin_class->basename(), array( $this, 'plugin_action_links' ) );
|
38 |
+
|
39 |
+
add_action( 'wp_before_admin_bar_render', array( $this, 'add_admin_bar' ), 999 );
|
40 |
+
|
41 |
+
add_action( 'admin_footer', array( $this, 'admin_inline_js' ) );
|
42 |
+
|
43 |
+
do_action( 'wvs_setting_api_init', $this );
|
44 |
+
}
|
45 |
+
|
46 |
+
public function admin_inline_js() {
|
47 |
+
?>
|
48 |
+
<script type="text/javascript">
|
49 |
+
jQuery(function ($) {
|
50 |
+
$('#<?php echo $this->slug ?>-wrap').on('click', '.nav-tab', function (event) {
|
51 |
+
event.preventDefault();
|
52 |
+
var target = $(this).data('target');
|
53 |
+
$(this).addClass('nav-tab-active').siblings().removeClass('nav-tab-active');
|
54 |
+
$('#' + target).show().siblings().hide();
|
55 |
+
});
|
56 |
+
});
|
57 |
+
</script>
|
58 |
+
<?php
|
59 |
+
}
|
60 |
+
|
61 |
+
public function add_menu() {
|
62 |
+
|
63 |
+
if ( empty( $this->fields ) ) {
|
64 |
+
return '';
|
65 |
+
}
|
66 |
+
|
67 |
+
$page_title = esc_html__( 'Woo Variation Swatches Settings', 'woo-variation-swatches' );
|
68 |
+
$menu_title = esc_html__( 'Swatches Settings', 'woo-variation-swatches' );
|
69 |
+
add_menu_page( $page_title, $menu_title, 'edit_theme_options', $this->slug, array( $this, 'settings_form' ), 'dashicons-admin-generic', 31 );
|
70 |
+
}
|
71 |
+
|
72 |
+
public function add_admin_bar() {
|
73 |
+
|
74 |
+
if ( empty( $this->fields ) ) {
|
75 |
+
return '';
|
76 |
+
}
|
77 |
+
|
78 |
+
global $wp_admin_bar;
|
79 |
+
|
80 |
+
$url = admin_url( sprintf( 'admin.php?page=%s', $this->slug ) );
|
81 |
+
$menu_title = esc_html__( 'Swatches Settings', 'woo-variation-swatches' );
|
82 |
+
|
83 |
+
$args = array(
|
84 |
+
'id' => $this->settings_name,
|
85 |
+
'title' => $menu_title,
|
86 |
+
'href' => $url,
|
87 |
+
'meta' => array(
|
88 |
+
'class' => sprintf( '%s-admin-toolbar', $this->slug )
|
89 |
+
)
|
90 |
+
);
|
91 |
+
$wp_admin_bar->add_menu( $args );
|
92 |
+
}
|
93 |
+
|
94 |
+
public function plugin_action_links( $links ) {
|
95 |
+
|
96 |
+
if ( empty( $this->fields ) ) {
|
97 |
+
return $links;
|
98 |
+
}
|
99 |
+
|
100 |
+
$url = admin_url( sprintf( 'admin.php?page=%s', $this->slug ) );
|
101 |
+
$plugin_links = array( sprintf( '<a href="%s">%s</a>', esc_url( $url ), esc_html__( 'Settings', 'woo-variation-swatches' ) ) );
|
102 |
+
|
103 |
+
return array_merge( $plugin_links, $links );
|
104 |
+
}
|
105 |
+
|
106 |
+
private function set_default( $key, $type, $value ) {
|
107 |
+
$this->defaults[ $key ] = array( 'type' => $type, 'value' => $value );
|
108 |
+
}
|
109 |
+
|
110 |
+
private function get_default( $key ) {
|
111 |
+
return $this->defaults[ $key ];
|
112 |
+
}
|
113 |
+
|
114 |
+
public function get_defaults() {
|
115 |
+
return $this->defaults;
|
116 |
+
}
|
117 |
+
|
118 |
+
public function set_defaults() {
|
119 |
+
foreach ( $this->fields as $tab_key => $tab ) {
|
120 |
+
$tab = apply_filters( 'wvs_settings_tab', $tab );
|
121 |
+
|
122 |
+
foreach ( $tab[ 'sections' ] as $section_key => $section ) {
|
123 |
+
|
124 |
+
$section = apply_filters( 'wvs_settings_section', $section, $tab );
|
125 |
+
|
126 |
+
$section[ 'id' ] = ! isset( $section[ 'id' ] ) ? $tab[ 'id' ] . '-section' : $section[ 'id' ];
|
127 |
+
|
128 |
+
$section[ 'fields' ] = apply_filters( 'wvs_settings_fields', $section[ 'fields' ], $section, $tab );
|
129 |
+
|
130 |
+
foreach ( $section[ 'fields' ] as $field ) {
|
131 |
+
$field[ 'default' ] = isset( $field[ 'default' ] ) ? $field[ 'default' ] : '';
|
132 |
+
$this->set_default( $field[ 'id' ], $field[ 'type' ], $field[ 'default' ] );
|
133 |
+
}
|
134 |
+
}
|
135 |
+
}
|
136 |
+
}
|
137 |
+
|
138 |
+
public function get_option( $option ) {
|
139 |
+
$default = $this->get_default( $option );
|
140 |
+
$options = get_option( $this->settings_name, wp_list_pluck( $this->get_defaults(), 'value' ) );
|
141 |
+
if ( isset( $options[ $option ] ) ) {
|
142 |
+
if ( $default[ 'type' ] === 'checkbox' ) {
|
143 |
+
return apply_filters( 'wvs_settings_get_option', TRUE, $option, $options, $default );
|
144 |
+
} else {
|
145 |
+
return apply_filters( 'wvs_settings_get_option', $options[ $option ], $option, $options, $default );
|
146 |
+
}
|
147 |
+
} else {
|
148 |
+
if ( $default[ 'type' ] === 'checkbox' ) {
|
149 |
+
return apply_filters( 'wvs_settings_get_option', FALSE, $option, $options, $default );
|
150 |
+
} else {
|
151 |
+
return apply_filters( 'wvs_settings_get_option', $default[ 'value' ], $option, $options, $default );
|
152 |
+
}
|
153 |
+
}
|
154 |
+
}
|
155 |
+
|
156 |
+
public function update_option( $key, $value ) {
|
157 |
+
$options = get_option( $this->settings_name );
|
158 |
+
$options[ $key ] = $value;
|
159 |
+
update_option( $this->settings_name, $options );
|
160 |
+
}
|
161 |
+
|
162 |
+
public function settings_init() {
|
163 |
+
|
164 |
+
register_setting( $this->settings_name, $this->settings_name );
|
165 |
+
|
166 |
+
foreach ( $this->fields as $tab_key => $tab ) {
|
167 |
+
|
168 |
+
$tab = apply_filters( 'wvs_settings_tab', $tab );
|
169 |
+
|
170 |
+
foreach ( $tab[ 'sections' ] as $section_key => $section ) {
|
171 |
+
|
172 |
+
$section = apply_filters( 'wvs_settings_section', $section, $tab );
|
173 |
+
|
174 |
+
$section[ 'id' ] = ! isset( $section[ 'id' ] ) ? $tab[ 'id' ] . '-section' : $section[ 'id' ];
|
175 |
+
|
176 |
+
// Adding Settings section id
|
177 |
+
$this->fields[ $tab_key ][ 'sections' ][ $section_key ][ 'id' ] = $section[ 'id' ];
|
178 |
+
|
179 |
+
add_settings_section( $tab[ 'id' ] . $section[ 'id' ], $section[ 'title' ], function () use ( $section ) {
|
180 |
+
if ( isset( $section[ 'desc' ] ) && ! empty( $section[ 'desc' ] ) ) {
|
181 |
+
echo '<div class="inside">' . $section[ 'desc' ] . '</div>';
|
182 |
+
}
|
183 |
+
}, $tab[ 'id' ] . $section[ 'id' ] );
|
184 |
+
|
185 |
+
$section[ 'fields' ] = apply_filters( 'wvs_settings_fields', $section[ 'fields' ], $section, $tab );
|
186 |
+
|
187 |
+
foreach ( $section[ 'fields' ] as $field ) {
|
188 |
+
|
189 |
+
//$field[ 'label_for' ] = $this->settings_name . '[' . $field[ 'id' ] . ']';
|
190 |
+
$field[ 'label_for' ] = $field[ 'id' ] . '-field';
|
191 |
+
$field[ 'default' ] = isset( $field[ 'default' ] ) ? $field[ 'default' ] : '';
|
192 |
+
|
193 |
+
// $this->set_default( $field[ 'id' ], $field[ 'default' ] );
|
194 |
+
|
195 |
+
if ( $field[ 'type' ] == 'checkbox' || $field[ 'type' ] == 'radio' ) {
|
196 |
+
unset( $field[ 'label_for' ] );
|
197 |
+
}
|
198 |
+
|
199 |
+
add_settings_field( $this->settings_name . '[' . $field[ 'id' ] . ']', $field[ 'title' ], array( $this, 'field_callback' ), $tab[ 'id' ] . $section[ 'id' ], $tab[ 'id' ] . $section[ 'id' ], $field );
|
200 |
+
}
|
201 |
+
}
|
202 |
+
}
|
203 |
+
}
|
204 |
+
|
205 |
+
public function field_callback( $field ) {
|
206 |
+
|
207 |
+
switch ( $field[ 'type' ] ) {
|
208 |
+
case 'radio':
|
209 |
+
$this->radio_field_callback( $field );
|
210 |
+
break;
|
211 |
+
|
212 |
+
case 'checkbox':
|
213 |
+
$this->checkbox_field_callback( $field );
|
214 |
+
break;
|
215 |
+
|
216 |
+
case 'select':
|
217 |
+
$this->select_field_callback( $field );
|
218 |
+
break;
|
219 |
+
|
220 |
+
case 'number':
|
221 |
+
$this->number_field_callback( $field );
|
222 |
+
break;
|
223 |
+
|
224 |
+
case 'post_select':
|
225 |
+
$this->post_select_field_callback( $field );
|
226 |
+
break;
|
227 |
+
|
228 |
+
default:
|
229 |
+
$this->text_field_callback( $field );
|
230 |
+
break;
|
231 |
+
}
|
232 |
+
|
233 |
+
do_action( 'wvs_settings_field_callback', $field );
|
234 |
+
}
|
235 |
+
|
236 |
+
public function checkbox_field_callback( $args ) {
|
237 |
+
$value = (bool) $this->get_option( $args[ 'id' ] );
|
238 |
+
$size = isset( $args[ 'size' ] ) && ! is_null( $args[ 'size' ] ) ? $args[ 'size' ] : 'regular';
|
239 |
+
$html = sprintf( '<fieldset><label><input type="checkbox" id="%2$s-field" name="%4$s[%2$s]" value="%3$s" %5$s/> %6$s</label></fieldset>', $size, $args[ 'id' ], $value, $this->settings_name, checked( $value, TRUE, FALSE ), esc_attr( $args[ 'desc' ] ) );
|
240 |
+
|
241 |
+
echo $html;
|
242 |
+
}
|
243 |
+
|
244 |
+
public function radio_field_callback( $args ) {
|
245 |
+
$size = isset( $args[ 'size' ] ) && ! is_null( $args[ 'size' ] ) ? $args[ 'size' ] : 'regular';
|
246 |
+
$options = apply_filters( "wvs_settings_{$args[ 'id' ]}_radio_options", $args[ 'options' ] );
|
247 |
+
$value = esc_attr( $this->get_option( $args[ 'id' ] ) );
|
248 |
+
$html = '<fieldset>';
|
249 |
+
$html .= implode( '<br />', array_map( function ( $key, $option ) use ( $size, $args, $value ) {
|
250 |
+
return sprintf( '<label><input type="radio" id="%2$s-field" name="%4$s[%2$s]" value="%3$s" %5$s/> %6$s</label>', $size, $args[ 'id' ], $key, $this->settings_name, checked( $value, $key, FALSE ), $option );
|
251 |
+
}, array_keys( $options ), $options ) );
|
252 |
+
$html .= '</fieldset>';
|
253 |
+
|
254 |
+
echo $html;
|
255 |
+
}
|
256 |
+
|
257 |
+
public function select_field_callback( $args ) {
|
258 |
+
$options = apply_filters( "wvs_settings_{$args[ 'id' ]}_select_options", $args[ 'options' ] );
|
259 |
+
$value = esc_attr( $this->get_option( $args[ 'id' ] ) );
|
260 |
+
$options = array_map( function ( $key, $option ) use ( $value ) {
|
261 |
+
return "<option value='{$key}'" . selected( $key, $value, FALSE ) . ">{$option}</option>";
|
262 |
+
}, array_keys( $options ), $options );
|
263 |
+
$size = isset( $args[ 'size' ] ) && ! is_null( $args[ 'size' ] ) ? $args[ 'size' ] : 'regular';
|
264 |
+
$html = sprintf( '<select class="%1$s-text" id="%2$s-field" name="%4$s[%2$s]">%3$s</select>', $size, $args[ 'id' ], implode( '', $options ), $this->settings_name );
|
265 |
+
$html .= $this->get_field_description( $args );
|
266 |
+
|
267 |
+
echo $html;
|
268 |
+
}
|
269 |
+
|
270 |
+
public function get_field_description( $args ) {
|
271 |
+
if ( ! empty( $args[ 'desc' ] ) ) {
|
272 |
+
$desc = sprintf( '<p class="description">%s</p>', $args[ 'desc' ] );
|
273 |
+
} else {
|
274 |
+
$desc = '';
|
275 |
+
}
|
276 |
+
|
277 |
+
return $desc;
|
278 |
+
}
|
279 |
+
|
280 |
+
public function post_select_field_callback( $args ) {
|
281 |
+
|
282 |
+
$options = apply_filters( "wvs_settings_{$args[ 'id' ]}_post_select_options", $args[ 'options' ] );
|
283 |
+
|
284 |
+
$value = esc_attr( $this->get_option( $args[ 'id' ] ) );
|
285 |
+
|
286 |
+
$options = array_map( function ( $option ) use ( $value ) {
|
287 |
+
return "<option value='{$option->ID}'" . selected( $option->ID, $value, FALSE ) . ">$option->post_title</option>";
|
288 |
+
}, $options );
|
289 |
+
|
290 |
+
$size = isset( $args[ 'size' ] ) && ! is_null( $args[ 'size' ] ) ? $args[ 'size' ] : 'regular';
|
291 |
+
$html = sprintf( '<select class="%1$s-text" id="%2$s-field" name="%4$s[%2$s]">%3$s</select>', $size, $args[ 'id' ], implode( '', $options ), $this->settings_name );
|
292 |
+
$html .= $this->get_field_description( $args );
|
293 |
+
echo $html;
|
294 |
+
}
|
295 |
+
|
296 |
+
public function text_field_callback( $args ) {
|
297 |
+
$value = esc_attr( $this->get_option( $args[ 'id' ] ) );
|
298 |
+
$size = isset( $args[ 'size' ] ) && ! is_null( $args[ 'size' ] ) ? $args[ 'size' ] : 'regular';
|
299 |
+
$html = sprintf( '<input type="text" class="%1$s-text" id="%2$s-field" name="%4$s[%2$s]" value="%3$s"/>', $size, $args[ 'id' ], $value, $this->settings_name );
|
300 |
+
$html .= $this->get_field_description( $args );
|
301 |
+
|
302 |
+
echo $html;
|
303 |
+
}
|
304 |
+
|
305 |
+
public function number_field_callback( $args ) {
|
306 |
+
$value = esc_attr( $this->get_option( $args[ 'id' ] ) );
|
307 |
+
$size = isset( $args[ 'size' ] ) && ! is_null( $args[ 'size' ] ) ? $args[ 'size' ] : 'small';
|
308 |
+
|
309 |
+
$min = isset( $args[ 'min' ] ) && ! is_null( $args[ 'min' ] ) ? 'min="' . $args[ 'min' ] . '"' : '';
|
310 |
+
$max = isset( $args[ 'max' ] ) && ! is_null( $args[ 'max' ] ) ? 'max="' . $args[ 'max' ] . '"' : '';
|
311 |
+
$step = isset( $args[ 'step' ] ) && ! is_null( $args[ 'step' ] ) ? 'step="' . $args[ 'step' ] . '"' : '';
|
312 |
+
$suffix = isset( $args[ 'suffix' ] ) && ! is_null( $args[ 'suffix' ] ) ? ' <span>' . $args[ 'suffix' ] . '</span>' : '';
|
313 |
+
|
314 |
+
$html = sprintf( '<input type="number" class="%1$s-text" id="%2$s-field" name="%4$s[%2$s]" value="%3$s" %5$s %6$s %7$s /> %8$s', $size, $args[ 'id' ], $value, $this->settings_name, $min, $max, $step, $suffix );
|
315 |
+
$html .= $this->get_field_description( $args );
|
316 |
+
|
317 |
+
echo $html;
|
318 |
+
}
|
319 |
+
|
320 |
+
public function settings_form() {
|
321 |
+
if ( ! current_user_can( 'manage_options' ) ) {
|
322 |
+
wp_die( __( 'You do not have sufficient permissions to access this page.' ) );
|
323 |
+
}
|
324 |
+
?>
|
325 |
+
<div id="<?php echo $this->slug ?>-wrap" class="wrap settings-wrap">
|
326 |
+
|
327 |
+
<h1><?php echo get_admin_page_title() ?></h1>
|
328 |
+
|
329 |
+
<form method="post" action="<?php echo esc_url( admin_url( 'options.php' ) ) ?>" enctype="multipart/form-data">
|
330 |
+
<?php
|
331 |
+
settings_errors();
|
332 |
+
settings_fields( $this->settings_name );
|
333 |
+
?>
|
334 |
+
|
335 |
+
<?php $this->options_tabs(); ?>
|
336 |
+
|
337 |
+
<div id="settings-tabs">
|
338 |
+
<?php foreach ( $this->fields as $tab ): ?>
|
339 |
+
|
340 |
+
<div id="<?php echo $tab[ 'id' ] ?>"
|
341 |
+
class="settings-tab wvs-setting-tab"
|
342 |
+
style="<?php echo( ! isset( $tab[ 'active' ] ) ? 'display: none' : '' ) ?>">
|
343 |
+
<?php foreach ( $tab[ 'sections' ] as $section ):
|
344 |
+
$this->do_settings_sections( $tab[ 'id' ] . $section[ 'id' ] );
|
345 |
+
endforeach; ?>
|
346 |
+
</div>
|
347 |
+
|
348 |
+
<?php endforeach; ?>
|
349 |
+
</div>
|
350 |
+
<?php
|
351 |
+
submit_button();
|
352 |
+
?>
|
353 |
+
</form>
|
354 |
+
</div>
|
355 |
+
<?php
|
356 |
+
}
|
357 |
+
|
358 |
+
public function options_tabs() {
|
359 |
+
?>
|
360 |
+
<h2 class="nav-tab-wrapper wp-clearfix">
|
361 |
+
<?php foreach ( $this->fields as $tabs ): ?>
|
362 |
+
<a data-target="<?php echo $tabs[ 'id' ] ?>"
|
363 |
+
class="wvs-setting-nav-tab nav-tab <?php echo ( isset( $tabs[ 'active' ] ) and $tabs[ 'active' ] ) ? 'nav-tab-active' : '' ?> "
|
364 |
+
href="#<?php echo $tabs[ 'id' ] ?>"><?php echo $tabs[ 'title' ] ?></a>
|
365 |
+
<?php endforeach; ?>
|
366 |
+
</h2>
|
367 |
+
<?php
|
368 |
+
}
|
369 |
+
|
370 |
+
private function do_settings_sections( $page ) {
|
371 |
+
global $wp_settings_sections, $wp_settings_fields;
|
372 |
+
|
373 |
+
if ( ! isset( $wp_settings_sections[ $page ] ) ) {
|
374 |
+
return;
|
375 |
+
}
|
376 |
+
|
377 |
+
foreach ( (array) $wp_settings_sections[ $page ] as $section ) {
|
378 |
+
if ( $section[ 'title' ] ) {
|
379 |
+
echo "<h2>{$section['title']}</h2>\n";
|
380 |
+
}
|
381 |
+
|
382 |
+
if ( $section[ 'callback' ] ) {
|
383 |
+
call_user_func( $section[ 'callback' ], $section );
|
384 |
+
}
|
385 |
+
|
386 |
+
if ( ! isset( $wp_settings_fields ) || ! isset( $wp_settings_fields[ $page ] ) || ! isset( $wp_settings_fields[ $page ][ $section[ 'id' ] ] ) ) {
|
387 |
+
continue;
|
388 |
+
}
|
389 |
+
|
390 |
+
echo '<table class="form-table">';
|
391 |
+
$this->do_settings_fields( $page, $section[ 'id' ] );
|
392 |
+
echo '</table>';
|
393 |
+
}
|
394 |
+
}
|
395 |
+
|
396 |
+
public function array2html_attr( $attributes, $do_not_add = array() ) {
|
397 |
+
|
398 |
+
$attributes = wp_parse_args( $attributes, array() );
|
399 |
+
|
400 |
+
if ( ! empty( $do_not_add ) and is_array( $do_not_add ) ) {
|
401 |
+
foreach ( $do_not_add as $att_name ) {
|
402 |
+
unset( $attributes[ $att_name ] );
|
403 |
+
}
|
404 |
+
}
|
405 |
+
|
406 |
+
|
407 |
+
$attributes_array = array();
|
408 |
+
|
409 |
+
foreach ( $attributes as $key => $value ) {
|
410 |
+
|
411 |
+
if ( is_bool( $attributes[ $key ] ) and $attributes[ $key ] === TRUE ) {
|
412 |
+
return $attributes[ $key ] ? $key : '';
|
413 |
+
} elseif ( is_bool( $attributes[ $key ] ) and $attributes[ $key ] === FALSE ) {
|
414 |
+
$attributes_array[] = '';
|
415 |
+
} else {
|
416 |
+
$attributes_array[] = $key . '="' . $value . '"';
|
417 |
+
}
|
418 |
+
}
|
419 |
+
|
420 |
+
return implode( ' ', $attributes_array );
|
421 |
+
}
|
422 |
+
|
423 |
+
private function build_dependency( $require_array ) {
|
424 |
+
$b_array = array();
|
425 |
+
foreach ( $require_array as $k => $v ) {
|
426 |
+
$b_array[ '#' . $k . '-field' ] = $v;
|
427 |
+
}
|
428 |
+
|
429 |
+
return 'data-depends="[' . esc_attr( wp_json_encode( $b_array ) ) . ']"';
|
430 |
+
}
|
431 |
+
|
432 |
+
private function do_settings_fields( $page, $section ) {
|
433 |
+
global $wp_settings_fields;
|
434 |
+
|
435 |
+
if ( ! isset( $wp_settings_fields[ $page ][ $section ] ) ) {
|
436 |
+
return;
|
437 |
+
}
|
438 |
+
|
439 |
+
foreach ( (array) $wp_settings_fields[ $page ][ $section ] as $field ) {
|
440 |
+
/*$class = '';
|
441 |
+
|
442 |
+
if ( ! empty( $field[ 'args' ][ 'class' ] ) ) {
|
443 |
+
$class = ' class="' . esc_attr( $field[ 'args' ][ 'class' ] ) . '"';
|
444 |
+
}*/
|
445 |
+
|
446 |
+
$custom_attributes = $this->array2html_attr( isset( $field[ 'args' ][ 'attributes' ] ) ? $field[ 'args' ][ 'attributes' ] : array() );
|
447 |
+
|
448 |
+
$wrapper_id = ! empty( $field[ 'args' ][ 'id' ] ) ? esc_attr( $field[ 'args' ][ 'id' ] ) . '-wrapper' : '';
|
449 |
+
$dependency = ! empty( $field[ 'args' ][ 'require' ] ) ? $this->build_dependency( $field[ 'args' ][ 'require' ] ) : '';
|
450 |
+
|
451 |
+
printf( '<tr id="%s" %s %s>', $wrapper_id, $custom_attributes, $dependency );
|
452 |
+
|
453 |
+
if ( ! empty( $field[ 'args' ][ 'label_for' ] ) ) {
|
454 |
+
echo '<th scope="row"><label for="' . esc_attr( $field[ 'args' ][ 'label_for' ] ) . '">' . $field[ 'title' ] . '</label></th>';
|
455 |
+
} else {
|
456 |
+
echo '<th scope="row">' . $field[ 'title' ] . '</th>';
|
457 |
+
}
|
458 |
+
|
459 |
+
echo '<td>';
|
460 |
+
call_user_func( $field[ 'callback' ], $field[ 'args' ] );
|
461 |
+
echo '</td>';
|
462 |
+
echo '</tr>';
|
463 |
+
}
|
464 |
+
}
|
465 |
+
}
|
466 |
+
endif;
|
includes/class-wvs-term-meta.php
CHANGED
@@ -190,8 +190,8 @@
|
|
190 |
</div>
|
191 |
<div class="button-wrapper">
|
192 |
<input type="hidden" id="<?php echo $field[ 'id' ] ?>" name="<?php echo $field[ 'id' ] ?>" value="<?php echo esc_attr( $field[ 'value' ] ) ?>"/>
|
193 |
-
<button type="button" class="wvs_upload_image_button button button-primary button-small"><?php esc_html_e( 'Upload / Add image', '
|
194 |
-
<button type="button" style="<?php echo( empty( $field[ 'value' ] ) ? 'display:none' : '' ) ?>" class="wvs_remove_image_button button button-danger button-small"><?php esc_html_e( 'Remove image', '
|
195 |
</div>
|
196 |
</div>
|
197 |
<?php
|
190 |
</div>
|
191 |
<div class="button-wrapper">
|
192 |
<input type="hidden" id="<?php echo $field[ 'id' ] ?>" name="<?php echo $field[ 'id' ] ?>" value="<?php echo esc_attr( $field[ 'value' ] ) ?>"/>
|
193 |
+
<button type="button" class="wvs_upload_image_button button button-primary button-small"><?php esc_html_e( 'Upload / Add image', 'woo-variation-swatches' ); ?></button>
|
194 |
+
<button type="button" style="<?php echo( empty( $field[ 'value' ] ) ? 'display:none' : '' ) ?>" class="wvs_remove_image_button button button-danger button-small"><?php esc_html_e( 'Remove image', 'woo-variation-swatches' ); ?></button>
|
195 |
</div>
|
196 |
</div>
|
197 |
<?php
|
includes/functions.php
CHANGED
@@ -17,6 +17,49 @@
|
|
17 |
|
18 |
endif;
|
19 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
20 |
//-------------------------------------------------------------------------------
|
21 |
// Add WooCommerce taxonomy Meta
|
22 |
//-------------------------------------------------------------------------------
|
@@ -101,7 +144,6 @@
|
|
101 |
//-------------------------------------------------------------------------------
|
102 |
|
103 |
if ( ! function_exists( 'wvs_color_variation_attribute_options' ) ) :
|
104 |
-
|
105 |
function wvs_color_variation_attribute_options( $args = array() ) {
|
106 |
|
107 |
$args = wp_parse_args( $args, array(
|
@@ -160,7 +202,7 @@
|
|
160 |
$get_term_meta = sanitize_hex_color( get_term_meta( $term->term_id, 'product_attribute_color', TRUE ) );
|
161 |
$selected_class = ( sanitize_title( $args[ 'selected' ] ) == $term->slug ) ? 'selected' : '';
|
162 |
?>
|
163 |
-
<li data-toggle="tooltip" data-placement="top" class="variable-item color-variable-item color-variable-item-<?php echo $term->slug ?> <?php echo $selected_class ?>" title="<?php echo esc_html( $term->name ) ?>" data-value="<?php echo esc_attr( $term->slug ) ?>"><span style="background-color:<?php echo esc_attr( $get_term_meta ) ?>;"></span></li>
|
164 |
<?php
|
165 |
}
|
166 |
}
|
@@ -168,7 +210,6 @@
|
|
168 |
}
|
169 |
echo '</ul>';
|
170 |
}
|
171 |
-
|
172 |
endif;
|
173 |
|
174 |
//-------------------------------------------------------------------------------
|
@@ -176,7 +217,6 @@
|
|
176 |
//-------------------------------------------------------------------------------
|
177 |
|
178 |
if ( ! function_exists( 'wvs_image_variation_attribute_options' ) ) :
|
179 |
-
|
180 |
function wvs_image_variation_attribute_options( $args = array() ) {
|
181 |
|
182 |
$args = wp_parse_args( $args, array(
|
@@ -225,7 +265,7 @@
|
|
225 |
|
226 |
echo '</select>';
|
227 |
|
228 |
-
echo '<ul class="list-inline variable-items-wrapper image-variable-wrapper">';
|
229 |
if ( ! empty( $options ) ) {
|
230 |
if ( $product && taxonomy_exists( $attribute ) ) {
|
231 |
$terms = wc_get_product_terms( $product->get_id(), $attribute, array( 'fields' => 'all' ) );
|
@@ -236,7 +276,8 @@
|
|
236 |
$image = wp_get_attachment_image_url( $attachment_id );
|
237 |
$selected_class = ( sanitize_title( $args[ 'selected' ] ) == $term->slug ) ? 'selected' : '';
|
238 |
?>
|
239 |
-
<li data-toggle="tooltip" data-placement="top" class="variable-item image-variable-item image-variable-item-<?php echo $term->slug ?> <?php echo $selected_class ?>" title="<?php echo esc_html( $term->name ) ?>" data-value="<?php echo esc_attr( $term->slug ) ?>"><img alt="<?php echo esc_html( $term->name ) ?>" src="<?php echo esc_url( $image ) ?>"
|
|
|
240 |
<?php
|
241 |
}
|
242 |
}
|
@@ -251,7 +292,6 @@
|
|
251 |
//-------------------------------------------------------------------------------
|
252 |
|
253 |
if ( ! function_exists( 'wvs_button_variation_attribute_options' ) ) :
|
254 |
-
|
255 |
function wvs_button_variation_attribute_options( $args = array() ) {
|
256 |
|
257 |
$args = wp_parse_args( $args, array(
|
@@ -309,7 +349,7 @@
|
|
309 |
if ( in_array( $term->slug, $options ) ) {
|
310 |
$selected_class = ( sanitize_title( $args[ 'selected' ] ) == $term->slug ) ? 'selected' : '';
|
311 |
?>
|
312 |
-
<li data-toggle="tooltip" data-placement="top" class="variable-item button-variable-item image-variable-item-<?php echo $term->slug ?> <?php echo $selected_class ?>" title="<?php echo esc_html( $term->name ) ?>" data-value="<?php echo esc_attr( $term->slug ) ?>"><span><?php echo esc_html( $term->name ) ?></span></li>
|
313 |
<?php
|
314 |
}
|
315 |
}
|
17 |
|
18 |
endif;
|
19 |
|
20 |
+
//-------------------------------------------------------------------------------
|
21 |
+
// Add settings
|
22 |
+
//-------------------------------------------------------------------------------
|
23 |
+
|
24 |
+
if ( ! function_exists( 'wvs_settings' ) ):
|
25 |
+
function wvs_settings() {
|
26 |
+
woo_variation_swatches()->add_setting( 'general', esc_html__( 'General', 'woo-variation-swatches' ), array(
|
27 |
+
array(
|
28 |
+
'title' => esc_html__( 'Display Section', 'woo-variation-swatches' ),
|
29 |
+
'desc' => esc_html__( 'Simply change some visual styles', 'woo-variation-swatches' ),
|
30 |
+
'fields' => array(
|
31 |
+
array(
|
32 |
+
'id' => 'tooltip',
|
33 |
+
'type' => 'checkbox',
|
34 |
+
'title' => esc_html__( 'Tooltip', 'woo-variation-swatches' ),
|
35 |
+
'desc' => esc_html__( 'Show / Hide tooltip on each product attribute.', 'woo-variation-swatches' ),
|
36 |
+
'default' => TRUE
|
37 |
+
),
|
38 |
+
array(
|
39 |
+
'id' => 'style',
|
40 |
+
'type' => 'radio',
|
41 |
+
'title' => esc_html__( 'Shape style', 'woo-variation-swatches' ),
|
42 |
+
'desc' => esc_html__( 'Attribute Shape Style', 'woo-variation-swatches' ),
|
43 |
+
'options' => array(
|
44 |
+
'rounded' => esc_html__( 'Rounded Shape', 'woo-variation-swatches' ),
|
45 |
+
'squared' => esc_html__( 'Squared Shape', 'woo-variation-swatches' )
|
46 |
+
),
|
47 |
+
'default' => 'rounded'
|
48 |
+
),
|
49 |
+
array(
|
50 |
+
'id' => 'stylesheet',
|
51 |
+
'type' => 'checkbox',
|
52 |
+
'title' => esc_html__( 'Stylesheet', 'woo-variation-swatches' ),
|
53 |
+
'desc' => esc_html__( 'Enable / Disable plugin default Stylesheet', 'woo-variation-swatches' ),
|
54 |
+
'default' => TRUE
|
55 |
+
)
|
56 |
+
)
|
57 |
+
)
|
58 |
+
), TRUE );
|
59 |
+
}
|
60 |
+
|
61 |
+
endif;
|
62 |
+
|
63 |
//-------------------------------------------------------------------------------
|
64 |
// Add WooCommerce taxonomy Meta
|
65 |
//-------------------------------------------------------------------------------
|
144 |
//-------------------------------------------------------------------------------
|
145 |
|
146 |
if ( ! function_exists( 'wvs_color_variation_attribute_options' ) ) :
|
|
|
147 |
function wvs_color_variation_attribute_options( $args = array() ) {
|
148 |
|
149 |
$args = wp_parse_args( $args, array(
|
202 |
$get_term_meta = sanitize_hex_color( get_term_meta( $term->term_id, 'product_attribute_color', TRUE ) );
|
203 |
$selected_class = ( sanitize_title( $args[ 'selected' ] ) == $term->slug ) ? 'selected' : '';
|
204 |
?>
|
205 |
+
<li data-toggle="tooltip" data-tooltip="<?php echo esc_html( $term->name ) ?>" data-placement="top" class="variable-item color-variable-item color-variable-item-<?php echo $term->slug ?> <?php echo $selected_class ?> <?php echo woo_variation_swatches()->get_option( 'style' ) ?>-style" title="<?php echo esc_html( $term->name ) ?>" data-value="<?php echo esc_attr( $term->slug ) ?>"><span style="background-color:<?php echo esc_attr( $get_term_meta ) ?>;"></span></li>
|
206 |
<?php
|
207 |
}
|
208 |
}
|
210 |
}
|
211 |
echo '</ul>';
|
212 |
}
|
|
|
213 |
endif;
|
214 |
|
215 |
//-------------------------------------------------------------------------------
|
217 |
//-------------------------------------------------------------------------------
|
218 |
|
219 |
if ( ! function_exists( 'wvs_image_variation_attribute_options' ) ) :
|
|
|
220 |
function wvs_image_variation_attribute_options( $args = array() ) {
|
221 |
|
222 |
$args = wp_parse_args( $args, array(
|
265 |
|
266 |
echo '</select>';
|
267 |
|
268 |
+
echo '<ul class="list-inline variable-items-wrapper image-variable-wrapper ">';
|
269 |
if ( ! empty( $options ) ) {
|
270 |
if ( $product && taxonomy_exists( $attribute ) ) {
|
271 |
$terms = wc_get_product_terms( $product->get_id(), $attribute, array( 'fields' => 'all' ) );
|
276 |
$image = wp_get_attachment_image_url( $attachment_id );
|
277 |
$selected_class = ( sanitize_title( $args[ 'selected' ] ) == $term->slug ) ? 'selected' : '';
|
278 |
?>
|
279 |
+
<li data-toggle="tooltip" data-tooltip="<?php echo esc_html( $term->name ) ?>" data-placement="top" class="variable-item image-variable-item image-variable-item-<?php echo $term->slug ?> <?php echo $selected_class ?> <?php echo woo_variation_swatches()->get_option( 'style' ) ?>-style" title="<?php echo esc_html( $term->name ) ?>" data-value="<?php echo esc_attr( $term->slug ) ?>"><img alt="<?php echo esc_html( $term->name ) ?>" src="<?php echo esc_url( $image ) ?>">
|
280 |
+
</li>
|
281 |
<?php
|
282 |
}
|
283 |
}
|
292 |
//-------------------------------------------------------------------------------
|
293 |
|
294 |
if ( ! function_exists( 'wvs_button_variation_attribute_options' ) ) :
|
|
|
295 |
function wvs_button_variation_attribute_options( $args = array() ) {
|
296 |
|
297 |
$args = wp_parse_args( $args, array(
|
349 |
if ( in_array( $term->slug, $options ) ) {
|
350 |
$selected_class = ( sanitize_title( $args[ 'selected' ] ) == $term->slug ) ? 'selected' : '';
|
351 |
?>
|
352 |
+
<li data-toggle="tooltip" data-tooltip="<?php echo esc_html( $term->name ) ?>" data-placement="top" class="variable-item button-variable-item image-variable-item-<?php echo $term->slug ?> <?php echo $selected_class ?> <?php echo woo_variation_swatches()->get_option( 'style' ) ?>-style" title="<?php echo esc_html( $term->name ) ?>" data-value="<?php echo esc_attr( $term->slug ) ?>"><span><?php echo esc_html( $term->name ) ?></span></li>
|
353 |
<?php
|
354 |
}
|
355 |
}
|
includes/hooks.php
CHANGED
@@ -3,9 +3,10 @@
|
|
3 |
|
4 |
add_filter( 'product_attributes_type_selector', 'wvs_product_attributes_types' );
|
5 |
|
|
|
|
|
6 |
add_action( 'admin_init', 'wvs_add_product_taxonomy_meta' );
|
7 |
|
8 |
add_action( 'woocommerce_product_option_terms', 'wvs_product_option_terms', 10, 2 );
|
9 |
|
10 |
-
add_filter( 'woocommerce_dropdown_variation_attribute_options_html', 'wvs_variation_attribute_options_html', 200, 2 );
|
11 |
-
|
3 |
|
4 |
add_filter( 'product_attributes_type_selector', 'wvs_product_attributes_types' );
|
5 |
|
6 |
+
add_action( 'init', 'wvs_settings', 2 );
|
7 |
+
|
8 |
add_action( 'admin_init', 'wvs_add_product_taxonomy_meta' );
|
9 |
|
10 |
add_action( 'woocommerce_product_option_terms', 'wvs_product_option_terms', 10, 2 );
|
11 |
|
12 |
+
add_filter( 'woocommerce_dropdown_variation_attribute_options_html', 'wvs_variation_attribute_options_html', 200, 2 );
|
|
languages/woo-variation-swatches.pot
CHANGED
@@ -1,4 +1,4 @@
|
|
1 |
-
# Copyright (C)
|
2 |
# This file is distributed under the same license as the Woo Variation Swatches package.
|
3 |
msgid ""
|
4 |
msgstr ""
|
@@ -16,42 +16,50 @@ msgstr ""
|
|
16 |
"X-Poedit-SourceCharset: UTF-8\n"
|
17 |
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
18 |
|
19 |
-
#: ../woo-variation-swatches.php:
|
20 |
msgid "Choose an Image"
|
21 |
msgstr ""
|
22 |
|
23 |
-
#: ../woo-variation-swatches.php:
|
24 |
msgid "Use Image"
|
25 |
msgstr ""
|
26 |
|
27 |
-
#: ../woo-variation-swatches.php:
|
28 |
msgid "Add Media"
|
29 |
msgstr ""
|
30 |
|
31 |
-
#: ../woo-variation-swatches.php:
|
32 |
msgid "View Documentation"
|
33 |
msgstr ""
|
34 |
|
35 |
-
#: ../woo-variation-swatches.php:
|
36 |
msgid "Documentation"
|
37 |
msgstr ""
|
38 |
|
39 |
-
#: ../woo-variation-swatches.php:
|
40 |
msgid "Support"
|
41 |
msgstr ""
|
42 |
|
43 |
-
#: ../woo-variation-swatches.php:
|
|
|
|
|
|
|
|
|
44 |
msgid "Please check PHP version requirement."
|
45 |
msgstr ""
|
46 |
|
47 |
-
#: ../woo-variation-swatches.php:
|
48 |
msgid "It's required to use latest version of PHP to use <strong>Woo Variation Swatches</strong>."
|
49 |
msgstr ""
|
50 |
|
51 |
-
#: ../woo-variation-swatches.php:
|
52 |
msgid "WooCommerce"
|
53 |
msgstr ""
|
54 |
|
55 |
-
#: ../woo-variation-swatches.php:
|
56 |
msgid "<strong>Woo Variation Switcher</strong> is an add-on of "
|
57 |
msgstr ""
|
|
|
|
|
|
|
|
1 |
+
# Copyright (C) 2018 Woo Variation Swatches
|
2 |
# This file is distributed under the same license as the Woo Variation Swatches package.
|
3 |
msgid ""
|
4 |
msgstr ""
|
16 |
"X-Poedit-SourceCharset: UTF-8\n"
|
17 |
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
18 |
|
19 |
+
#: ../woo-variation-swatches.php:116
|
20 |
msgid "Choose an Image"
|
21 |
msgstr ""
|
22 |
|
23 |
+
#: ../woo-variation-swatches.php:117
|
24 |
msgid "Use Image"
|
25 |
msgstr ""
|
26 |
|
27 |
+
#: ../woo-variation-swatches.php:118
|
28 |
msgid "Add Media"
|
29 |
msgstr ""
|
30 |
|
31 |
+
#: ../woo-variation-swatches.php:173
|
32 |
msgid "View Documentation"
|
33 |
msgstr ""
|
34 |
|
35 |
+
#: ../woo-variation-swatches.php:173
|
36 |
msgid "Documentation"
|
37 |
msgstr ""
|
38 |
|
39 |
+
#: ../woo-variation-swatches.php:174, ../woo-variation-swatches.php:174
|
40 |
msgid "Support"
|
41 |
msgstr ""
|
42 |
|
43 |
+
#: ../woo-variation-swatches.php:175
|
44 |
+
msgid "Review"
|
45 |
+
msgstr ""
|
46 |
+
|
47 |
+
#: ../woo-variation-swatches.php:205
|
48 |
msgid "Please check PHP version requirement."
|
49 |
msgstr ""
|
50 |
|
51 |
+
#: ../woo-variation-swatches.php:207
|
52 |
msgid "It's required to use latest version of PHP to use <strong>Woo Variation Swatches</strong>."
|
53 |
msgstr ""
|
54 |
|
55 |
+
#: ../woo-variation-swatches.php:217
|
56 |
msgid "WooCommerce"
|
57 |
msgstr ""
|
58 |
|
59 |
+
#: ../woo-variation-swatches.php:219
|
60 |
msgid "<strong>Woo Variation Switcher</strong> is an add-on of "
|
61 |
msgstr ""
|
62 |
+
|
63 |
+
#: ../woo-variation-swatches.php:315
|
64 |
+
msgid "Woo Variation Swatches Plugin try to load \"%s\" but template \"%s\" was not found."
|
65 |
+
msgstr ""
|
webpack.mix.js
CHANGED
@@ -60,7 +60,7 @@ if (Mix.inProduction()) {
|
|
60 |
}
|
61 |
|
62 |
mix.banner({
|
63 |
-
banner : "Woo Variation Swatches v1.0.
|
64 |
});
|
65 |
|
66 |
mix.notification({
|
@@ -77,3 +77,4 @@ mix.js(`src/js/frontend.js`, `assets/js/frontend${min}.js`);
|
|
77 |
mix.babel(`src/js/FormFieldDependency.js`, `assets/js/form-field-dependency${min}.js`);
|
78 |
mix.sass(`src/scss/backend.scss`, `assets/css/admin${min}.css`);
|
79 |
mix.sass(`src/scss/frontend.scss`, `assets/css/frontend${min}.css`);
|
|
60 |
}
|
61 |
|
62 |
mix.banner({
|
63 |
+
banner : "Woo Variation Swatches v1.0.2 \n\nAuthor: Emran Ahmed ( emran.bd.08@gmail.com ) \nDate: " + new Date().toLocaleString() + "\nReleased under the GPLv3 license."
|
64 |
});
|
65 |
|
66 |
mix.notification({
|
77 |
mix.babel(`src/js/FormFieldDependency.js`, `assets/js/form-field-dependency${min}.js`);
|
78 |
mix.sass(`src/scss/backend.scss`, `assets/css/admin${min}.css`);
|
79 |
mix.sass(`src/scss/frontend.scss`, `assets/css/frontend${min}.css`);
|
80 |
+
mix.sass(`src/scss/tooltip.scss`, `assets/css/frontend-tooltip${min}.css`);
|
woo-variation-swatches.php
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
* Plugin URI: https://wordpress.org/plugins/woo-variation-swatches/
|
5 |
* Description: WooCommerce Product Variation Swatches
|
6 |
* Author: Emran Ahmed
|
7 |
-
* Version: 1.0.
|
8 |
* Domain Path: /languages
|
9 |
* Requires at least: 4.8
|
10 |
* Tested up to: 4.9
|
@@ -20,11 +20,12 @@
|
|
20 |
|
21 |
final class Woo_Variation_Swatches {
|
22 |
|
23 |
-
protected $_version = '1.0.
|
24 |
|
25 |
protected static $_instance = NULL;
|
|
|
26 |
|
27 |
-
public static function
|
28 |
if ( is_null( self::$_instance ) ) {
|
29 |
self::$_instance = new self();
|
30 |
}
|
@@ -33,7 +34,6 @@
|
|
33 |
}
|
34 |
|
35 |
public function __construct() {
|
36 |
-
|
37 |
$this->constants();
|
38 |
$this->includes();
|
39 |
$this->hooks();
|
@@ -41,7 +41,6 @@
|
|
41 |
}
|
42 |
|
43 |
public function constants() {
|
44 |
-
|
45 |
$this->define( 'WVS_PLUGIN_VERSION', esc_attr( $this->_version ) );
|
46 |
$this->define( 'WVS_PLUGIN_URI', plugin_dir_url( __FILE__ ) );
|
47 |
$this->define( 'WVS_PLUGIN_PATH', plugin_dir_path( __FILE__ ) );
|
@@ -59,6 +58,7 @@
|
|
59 |
|
60 |
public function includes() {
|
61 |
if ( $this->is_required_php_version() ) {
|
|
|
62 |
require_once $this->include_path( 'class-wvs-term-meta.php' );
|
63 |
require_once $this->include_path( 'functions.php' );
|
64 |
require_once $this->include_path( 'hooks.php' );
|
@@ -78,18 +78,29 @@
|
|
78 |
}
|
79 |
|
80 |
public function hooks() {
|
|
|
|
|
|
|
81 |
add_action( 'admin_notices', array( $this, 'php_requirement_notice' ) );
|
82 |
add_action( 'admin_notices', array( $this, 'wc_requirement_notice' ) );
|
83 |
-
|
84 |
-
add_filter( 'plugin_row_meta', array( $this, 'plugin_row_meta' ), 10, 2 );
|
85 |
add_action( 'admin_enqueue_scripts', array( $this, 'admin_enqueue_scripts' ) );
|
86 |
add_action( 'wp_enqueue_scripts', array( $this, 'enqueue_scripts' ) );
|
|
|
|
|
87 |
}
|
88 |
|
89 |
public function enqueue_scripts() {
|
90 |
$suffix = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min';
|
91 |
wp_enqueue_script( 'woo-variation-swatches', $this->assets_uri( "/js/frontend{$suffix}.js" ), array( 'jquery' ), $this->version(), TRUE );
|
92 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
93 |
}
|
94 |
|
95 |
public function admin_enqueue_scripts() {
|
@@ -110,6 +121,12 @@
|
|
110 |
) );
|
111 |
}
|
112 |
|
|
|
|
|
|
|
|
|
|
|
|
|
113 |
public function add_setting( $tab_id, $tab_title, $tab_sections, $active = FALSE ) {
|
114 |
// Example:
|
115 |
|
@@ -128,7 +145,7 @@
|
|
128 |
// ]
|
129 |
// ] // fields end
|
130 |
// ]
|
131 |
-
//])
|
132 |
|
133 |
add_filter( 'wvs_settings', function ( $fields ) use ( $tab_id, $tab_title, $tab_sections, $active ) {
|
134 |
array_push( $fields, array(
|
@@ -142,16 +159,20 @@
|
|
142 |
} );
|
143 |
}
|
144 |
|
|
|
|
|
|
|
|
|
145 |
public function add_term_meta( $taxonomy, $post_type, $fields ) {
|
146 |
return new WVS_Term_Meta( $taxonomy, $post_type, $fields );
|
147 |
}
|
148 |
|
149 |
public function plugin_row_meta( $links, $file ) {
|
150 |
if ( $file == $this->basename() ) {
|
151 |
-
$
|
152 |
-
|
153 |
-
|
154 |
-
);
|
155 |
|
156 |
return array_merge( $links, $row_meta );
|
157 |
}
|
@@ -252,10 +273,98 @@
|
|
252 |
public function template_uri() {
|
253 |
return apply_filters( 'wvs_template_uri', untrailingslashit( $this->plugin_uri() ) . '/templates' );
|
254 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
255 |
}
|
256 |
|
257 |
function woo_variation_swatches() {
|
258 |
-
return Woo_Variation_Swatches::
|
259 |
}
|
260 |
|
261 |
add_action( 'plugins_loaded', 'woo_variation_swatches' );
|
4 |
* Plugin URI: https://wordpress.org/plugins/woo-variation-swatches/
|
5 |
* Description: WooCommerce Product Variation Swatches
|
6 |
* Author: Emran Ahmed
|
7 |
+
* Version: 1.0.2
|
8 |
* Domain Path: /languages
|
9 |
* Requires at least: 4.8
|
10 |
* Tested up to: 4.9
|
20 |
|
21 |
final class Woo_Variation_Swatches {
|
22 |
|
23 |
+
protected $_version = '1.0.2';
|
24 |
|
25 |
protected static $_instance = NULL;
|
26 |
+
private $_settings_api;
|
27 |
|
28 |
+
public static function instance() {
|
29 |
if ( is_null( self::$_instance ) ) {
|
30 |
self::$_instance = new self();
|
31 |
}
|
34 |
}
|
35 |
|
36 |
public function __construct() {
|
|
|
37 |
$this->constants();
|
38 |
$this->includes();
|
39 |
$this->hooks();
|
41 |
}
|
42 |
|
43 |
public function constants() {
|
|
|
44 |
$this->define( 'WVS_PLUGIN_VERSION', esc_attr( $this->_version ) );
|
45 |
$this->define( 'WVS_PLUGIN_URI', plugin_dir_url( __FILE__ ) );
|
46 |
$this->define( 'WVS_PLUGIN_PATH', plugin_dir_path( __FILE__ ) );
|
58 |
|
59 |
public function includes() {
|
60 |
if ( $this->is_required_php_version() ) {
|
61 |
+
require_once $this->include_path( 'class-wvs-settings-api.php' );
|
62 |
require_once $this->include_path( 'class-wvs-term-meta.php' );
|
63 |
require_once $this->include_path( 'functions.php' );
|
64 |
require_once $this->include_path( 'hooks.php' );
|
78 |
}
|
79 |
|
80 |
public function hooks() {
|
81 |
+
add_action( 'init', array( $this, 'language' ) );
|
82 |
+
add_action( 'init', array( $this, 'settings_api' ), 5 );
|
83 |
+
|
84 |
add_action( 'admin_notices', array( $this, 'php_requirement_notice' ) );
|
85 |
add_action( 'admin_notices', array( $this, 'wc_requirement_notice' ) );
|
86 |
+
|
|
|
87 |
add_action( 'admin_enqueue_scripts', array( $this, 'admin_enqueue_scripts' ) );
|
88 |
add_action( 'wp_enqueue_scripts', array( $this, 'enqueue_scripts' ) );
|
89 |
+
|
90 |
+
add_filter( 'plugin_row_meta', array( $this, 'plugin_row_meta' ), 10, 2 );
|
91 |
}
|
92 |
|
93 |
public function enqueue_scripts() {
|
94 |
$suffix = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min';
|
95 |
wp_enqueue_script( 'woo-variation-swatches', $this->assets_uri( "/js/frontend{$suffix}.js" ), array( 'jquery' ), $this->version(), TRUE );
|
96 |
+
|
97 |
+
if ( $this->get_option( 'stylesheet' ) ) {
|
98 |
+
wp_enqueue_style( 'woo-variation-swatches', $this->assets_uri( "/css/frontend{$suffix}.css" ), array(), $this->version() );
|
99 |
+
}
|
100 |
+
|
101 |
+
if ( $this->get_option( 'tooltip' ) ) {
|
102 |
+
wp_enqueue_style( 'woo-variation-swatches-tooltip', $this->assets_uri( "/css/frontend-tooltip{$suffix}.css" ), array(), $this->version() );
|
103 |
+
}
|
104 |
}
|
105 |
|
106 |
public function admin_enqueue_scripts() {
|
121 |
) );
|
122 |
}
|
123 |
|
124 |
+
public function settings_api() {
|
125 |
+
$this->_settings_api = new WVS_Settings_API( $this );
|
126 |
+
|
127 |
+
return $this->_settings_api;
|
128 |
+
}
|
129 |
+
|
130 |
public function add_setting( $tab_id, $tab_title, $tab_sections, $active = FALSE ) {
|
131 |
// Example:
|
132 |
|
145 |
// ]
|
146 |
// ] // fields end
|
147 |
// ]
|
148 |
+
//], active ? true | false)
|
149 |
|
150 |
add_filter( 'wvs_settings', function ( $fields ) use ( $tab_id, $tab_title, $tab_sections, $active ) {
|
151 |
array_push( $fields, array(
|
159 |
} );
|
160 |
}
|
161 |
|
162 |
+
public function get_option( $id ) {
|
163 |
+
return $this->_settings_api->get_option( $id );
|
164 |
+
}
|
165 |
+
|
166 |
public function add_term_meta( $taxonomy, $post_type, $fields ) {
|
167 |
return new WVS_Term_Meta( $taxonomy, $post_type, $fields );
|
168 |
}
|
169 |
|
170 |
public function plugin_row_meta( $links, $file ) {
|
171 |
if ( $file == $this->basename() ) {
|
172 |
+
$review_url = "https://wordpress.org/support/plugin/woo-variation-swatches/reviews/?rate=5#new-post";
|
173 |
+
$row_meta[ 'documentation' ] = '<a href="' . esc_url( apply_filters( 'wvs_documentation_url', '#' ) ) . '" title="' . esc_attr( esc_html__( 'View Documentation', 'woo-variation-swatches' ) ) . '">' . esc_html__( 'Documentation', 'woo-variation-swatches' ) . '</a>';
|
174 |
+
$row_meta[ 'support' ] = '<a href="' . esc_url( apply_filters( 'wvs_support_url', 'https://wordpress.org/support/plugin/woo-variation-swatches/' ) ) . '" title="' . esc_attr( esc_html__( 'Support', 'woo-variation-swatches' ) ) . '">' . esc_html__( 'Support', 'woo-variation-swatches' ) . '</a>';
|
175 |
+
$row_meta[ 'rating' ] = sprintf( '<span class="gwp-rate-stars"><svg xmlns="http://www.w3.org/2000/svg" width="15" height="15" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><a xlink:href="%1$s" title="%2$s" target="_blank"><polygon points="12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2"/></a></svg><svg xmlns="http://www.w3.org/2000/svg" width="15" height="15" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><a xlink:href="%1$s" title="%2$s" target="_blank"><polygon points="12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2"/></a></svg><svg xmlns="http://www.w3.org/2000/svg" width="15" height="15" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><a xlink:href="%1$s" title="%2$s" target="_blank"><polygon points="12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2"/></a></svg><svg xmlns="http://www.w3.org/2000/svg" width="15" height="15" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><a xlink:href="%1$s" title="%2$s" target="_blank"><polygon points="12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2"/></a></svg><svg xmlns="http://www.w3.org/2000/svg" width="15" height="15" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><a xlink:href="%1$s" title="%2$s" target="_blank"><polygon points="12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2"/></a></svg></span>', esc_url( $review_url ), esc_html__( 'Review', 'woo-variation-swatches' ) );
|
176 |
|
177 |
return array_merge( $links, $row_meta );
|
178 |
}
|
273 |
public function template_uri() {
|
274 |
return apply_filters( 'wvs_template_uri', untrailingslashit( $this->plugin_uri() ) . '/templates' );
|
275 |
}
|
276 |
+
|
277 |
+
public function locate_template( $template_name, $third_party_path = FALSE ) {
|
278 |
+
|
279 |
+
$template_name = ltrim( $template_name, '/' );
|
280 |
+
$template_path = $this->template_override_dir();
|
281 |
+
$default_path = $this->template_path();
|
282 |
+
|
283 |
+
if ( $third_party_path && is_string( $third_party_path ) ) {
|
284 |
+
$default_path = untrailingslashit( $third_party_path );
|
285 |
+
}
|
286 |
+
|
287 |
+
// Look within passed path within the theme - this is priority.
|
288 |
+
$template = locate_template( array(
|
289 |
+
trailingslashit( $template_path ) . trim( $template_name ),
|
290 |
+
'wvs-template-' . trim( $template_name )
|
291 |
+
) );
|
292 |
+
|
293 |
+
// Get default template/
|
294 |
+
if ( empty( $template ) ) {
|
295 |
+
$template = trailingslashit( $default_path ) . trim( $template_name );
|
296 |
+
}
|
297 |
+
|
298 |
+
// Return what we found.
|
299 |
+
return apply_filters( 'wvs_locate_template', $template, $template_name, $template_path );
|
300 |
+
}
|
301 |
+
|
302 |
+
public function get_template( $template_name, $template_args = array(), $third_party_path = FALSE ) {
|
303 |
+
|
304 |
+
$template_name = ltrim( $template_name, '/' );
|
305 |
+
|
306 |
+
$located = apply_filters( 'wvs_get_template', $this->locate_template( $template_name, $third_party_path ) );
|
307 |
+
|
308 |
+
do_action( 'wvs_before_get_template', $template_name, $template_args );
|
309 |
+
|
310 |
+
extract( $template_args );
|
311 |
+
|
312 |
+
if ( file_exists( $located ) ) {
|
313 |
+
include $located;
|
314 |
+
} else {
|
315 |
+
trigger_error( sprintf( esc_html__( 'Woo Variation Swatches Plugin try to load "%s" but template "%s" was not found.', 'woo-variation-swatches' ), $located, $template_name ), E_USER_WARNING );
|
316 |
+
}
|
317 |
+
|
318 |
+
do_action( 'wvs_after_get_template', $template_name, $template_args );
|
319 |
+
}
|
320 |
+
|
321 |
+
public function get_theme_file_path( $file, $third_party_path = FALSE ) {
|
322 |
+
|
323 |
+
$file = ltrim( $file, '/' );
|
324 |
+
$template_dir = $this->template_override_dir();
|
325 |
+
$default_path = $this->template_path();
|
326 |
+
|
327 |
+
if ( $third_party_path && is_string( $third_party_path ) ) {
|
328 |
+
$default_path = untrailingslashit( $third_party_path );
|
329 |
+
}
|
330 |
+
|
331 |
+
// @TODO: Use get_theme_file_path
|
332 |
+
if ( file_exists( get_stylesheet_directory() . '/' . $template_dir . '/' . $file ) ) {
|
333 |
+
$path = get_stylesheet_directory() . '/' . $template_dir . '/' . $file;
|
334 |
+
} elseif ( file_exists( get_template_directory() . '/' . $template_dir . '/' . $file ) ) {
|
335 |
+
$path = get_template_directory() . '/' . $template_dir . '/' . $file;
|
336 |
+
} else {
|
337 |
+
$path = trailingslashit( $default_path ) . $file;
|
338 |
+
}
|
339 |
+
|
340 |
+
return apply_filters( 'wvs_get_theme_file_path', $path, $file );
|
341 |
+
}
|
342 |
+
|
343 |
+
public function get_theme_file_uri( $file, $third_party_uri = FALSE ) {
|
344 |
+
|
345 |
+
$file = ltrim( $file, '/' );
|
346 |
+
$template_dir = $this->template_override_dir();
|
347 |
+
$default_uri = $this->template_uri();
|
348 |
+
|
349 |
+
if ( $third_party_uri && is_string( $third_party_uri ) ) {
|
350 |
+
$default_uri = untrailingslashit( $third_party_uri );
|
351 |
+
}
|
352 |
+
|
353 |
+
// @TODO: Use get_theme_file_uri
|
354 |
+
if ( file_exists( get_stylesheet_directory() . '/' . $template_dir . '/' . $file ) ) {
|
355 |
+
$uri = get_stylesheet_directory_uri() . '/' . $template_dir . '/' . $file;
|
356 |
+
} elseif ( file_exists( get_template_directory() . '/' . $template_dir . '/' . $file ) ) {
|
357 |
+
$uri = get_template_directory_uri() . '/' . $template_dir . '/' . $file;
|
358 |
+
} else {
|
359 |
+
$uri = trailingslashit( $default_uri ) . $file;
|
360 |
+
}
|
361 |
+
|
362 |
+
return apply_filters( 'wvs_get_theme_file_uri', $uri, $file );
|
363 |
+
}
|
364 |
}
|
365 |
|
366 |
function woo_variation_swatches() {
|
367 |
+
return Woo_Variation_Swatches::instance();
|
368 |
}
|
369 |
|
370 |
add_action( 'plugins_loaded', 'woo_variation_swatches' );
|