Version Description
- Initial release
=
Download this release
Release Info
Developer | yithemes |
Plugin | ![]() |
Version | 1.0.0 |
Comparing to | |
See all releases |
Version 1.0.0
- README.txt +92 -0
- assets/css/admin.css +26 -0
- assets/css/frontend.css +84 -0
- assets/images/ajax-loader.gif +0 -0
- assets/js/yith-wcan-admin.js +38 -0
- assets/js/yith-wcan-frontend.js +89 -0
- assets/js/yith-wcan-frontend.min.js +15 -0
- class.yith-wcan-admin.php +106 -0
- class.yith-wcan-frontend.php +130 -0
- class.yith-wcan-helper.php +45 -0
- class.yith-wcan.php +79 -0
- functions.yith-wcan.php +101 -0
- init.php +57 -0
- languages/default.po +192 -0
- languages/yit-it_IT.mo +0 -0
- languages/yit-it_IT.po +191 -0
- languages/yit.pot +187 -0
- screenshot-1.png +0 -0
- screenshot-2.png +0 -0
- screenshot-3.png +0 -0
- widgets/class.yith-wcan-navigation-widget.php +577 -0
- yit-common/assets/css/yith-panel.css +78 -0
- yit-common/assets/js/google_fonts.json +1 -0
- yit-common/assets/js/yith-panel.js +296 -0
- yit-common/google_fonts.php +68 -0
- yit-common/yit-functions.php +208 -0
- yit-common/yith-panel.php +504 -0
README.txt
ADDED
@@ -0,0 +1,92 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
=== YITH WooCommerce Ajax Navigation ===
|
2 |
+
|
3 |
+
Contributors: yithemes
|
4 |
+
Tags: woocommerce, widget, ajax, ajax filtered nav, ajax navigation, ajax filtered navigation
|
5 |
+
Requires at least: 3.5.1
|
6 |
+
Tested up to: 3.5.1
|
7 |
+
Stable tag: 1.0.0
|
8 |
+
License: GPLv2 or later
|
9 |
+
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
+
|
11 |
+
YITH WooCommerce Ajax Navigation allows you to filter the products in the Shop page without reloading the page.
|
12 |
+
|
13 |
+
|
14 |
+
== Description ==
|
15 |
+
|
16 |
+
YITH WooCommerce Ajax Navigation allows you to filter the products in the Shop page without reloading the page. The plugin also includes two new types of Product Attributes visualizations: Color and Label.
|
17 |
+
With Color display type you're able to assign a color (selected from a Color Picker) to each Product Attributes. With Label Color display you're able to assign a label (3 chars max) to your Product Attributes.
|
18 |
+
|
19 |
+
Working demos are available here:
|
20 |
+
**[LIVE DEMO 1](http://demo.yithemes.com/room09/shop/)** - **[LIVE DEMO 2](http://demo.yithemes.com/bazar/shop/)**
|
21 |
+
|
22 |
+
Full documentation is available [here](http://yithemes.com/docs-plugins/yith_ajax_navigation/).
|
23 |
+
|
24 |
+
|
25 |
+
= Installation =
|
26 |
+
|
27 |
+
Once you have installed the plugin, you just need to activate the plugin in order to enable it.
|
28 |
+
|
29 |
+
= Configuration =
|
30 |
+
|
31 |
+
The widget works with Product Attributes. This means you need to create the Attributes and to assign them to your products. Once you have customized your products with Product Attributes you're able to use the Widget.
|
32 |
+
|
33 |
+
= Developer =
|
34 |
+
|
35 |
+
Are you a developer? Want to customize the templates or the style of the plugin? Read on the [documentation](http://yithemes.com/docs-plugins/yith_ajax_navigation/) and discover how to do that.
|
36 |
+
|
37 |
+
= Support =
|
38 |
+
|
39 |
+
Hi there, we have good news here: all our plugins are released for free. Wow!
|
40 |
+
Already knew it, right?! Great, but maybe you do not know that: if you're looking for how to install the plugins or how to use them within your Wordpress installations, which is the right way to ask support?
|
41 |
+
That's the way:
|
42 |
+
|
43 |
+
* Register on http://yithemes.com
|
44 |
+
* Go to Support > Get Support
|
45 |
+
|
46 |
+
Here we provide support, not on wordpress.org were, usually we do not read topics. It's better to follow us or write on our forum!
|
47 |
+
|
48 |
+
== Installation ==
|
49 |
+
|
50 |
+
1. Unzip the downloaded zip file.
|
51 |
+
2. Upload the plugin folder into the `wp-content/plugins/` directory of your WordPress site.
|
52 |
+
3. Activate `YITH WooCommerce Ajax Navigation` from Plugins page
|
53 |
+
|
54 |
+
== Frequently Asked Questions ==
|
55 |
+
|
56 |
+
= The widget is not displayed in my sidebar. Why? =
|
57 |
+
In order to display the widget you need to assign it to the sidebar in the Shop page and you need to add Product Attributes to your product. Read the Getting Started section to learn how to add them.
|
58 |
+
|
59 |
+
== Screenshots ==
|
60 |
+
|
61 |
+
1. The widget in action with "Color" type selected
|
62 |
+
2. The widget in action with "Label" type selected
|
63 |
+
3. The final result
|
64 |
+
|
65 |
+
== Changelog ==
|
66 |
+
|
67 |
+
= 1.0.0 =
|
68 |
+
|
69 |
+
* Initial release
|
70 |
+
|
71 |
+
== Suggestions ==
|
72 |
+
|
73 |
+
If you have suggestions about how to improve YITH WooCommerce Ajax Navigation, you can [write us](mailto:plugins@yithemes.com "Your Inspiration Themes") so we can bundle them into YITH WooCommerce Ajax Navigation.
|
74 |
+
|
75 |
+
== Translators ==
|
76 |
+
|
77 |
+
= Available Languages =
|
78 |
+
* English (Default)
|
79 |
+
* Italiano
|
80 |
+
|
81 |
+
If you have created your own language pack, or have an update for an existing one, you can send [gettext PO and MO file](http://codex.wordpress.org/Translating_WordPress "Translating WordPress")
|
82 |
+
[use](http://yithemes.com/contact/ "Your Inspiration Themes") so we can bundle it into YITH WooCommerce Ajax Navigation Languages.
|
83 |
+
|
84 |
+
== Documentation ==
|
85 |
+
|
86 |
+
Full documentation is available [here](http://yithemes.com/docs-plugins/yith_ajax_navigation/).
|
87 |
+
|
88 |
+
== Upgrade notice ==
|
89 |
+
|
90 |
+
= 1.0.0 =
|
91 |
+
|
92 |
+
Initial release
|
assets/css/admin.css
ADDED
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* widget area */
|
2 |
+
.yith_wcan_placeholder + .spinner {
|
3 |
+
background-position: center;
|
4 |
+
float: left;
|
5 |
+
margin: 10px 0;
|
6 |
+
width: 100%;
|
7 |
+
}
|
8 |
+
|
9 |
+
.yith_wcan_placeholder table {
|
10 |
+
width: 100%;
|
11 |
+
}
|
12 |
+
|
13 |
+
.yith_wcan_placeholder th {
|
14 |
+
text-align: left;
|
15 |
+
}
|
16 |
+
|
17 |
+
.yith_wcan_placeholder td {
|
18 |
+
vertical-align: top;
|
19 |
+
}
|
20 |
+
|
21 |
+
/*
|
22 |
+
.yith_wcan_placeholder .wp-color-result:after,
|
23 |
+
.yith_wcan_placeholder .wp-color-result.wp-picker-open:after{
|
24 |
+
content: "";
|
25 |
+
}
|
26 |
+
*/
|
assets/css/frontend.css
ADDED
@@ -0,0 +1,84 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
.yith-wcan-group:after {
|
2 |
+
content: "";
|
3 |
+
display: table;
|
4 |
+
clear: both;
|
5 |
+
}
|
6 |
+
|
7 |
+
.yith-wcan-loading {
|
8 |
+
background: url('../images/ajax-loader.gif') no-repeat center;
|
9 |
+
height: 100px;
|
10 |
+
}
|
11 |
+
|
12 |
+
.woocommerce .widget_layered_nav ul.yith-wcan li span,
|
13 |
+
.woocommerce-page .widget_layered_nav ul.yith-wcan li span {
|
14 |
+
cursor: not-allowed;
|
15 |
+
}
|
16 |
+
|
17 |
+
/* Colors Type */
|
18 |
+
.yith-wcan-color li {
|
19 |
+
float: left;
|
20 |
+
}
|
21 |
+
|
22 |
+
.woocommerce .widget_layered_nav ul.yith-wcan-color li a,
|
23 |
+
.woocommerce-page .widget_layered_nav ul.yith-wcan-color li a,
|
24 |
+
.woocommerce .widget_layered_nav ul.yith-wcan-color li span,
|
25 |
+
.woocommerce-page .widget_layered_nav ul.yith-wcan-color li span {
|
26 |
+
border: 1px solid #ddd;
|
27 |
+
display: block;
|
28 |
+
height: 20px;
|
29 |
+
margin: 5px 5px 5px 0;
|
30 |
+
padding: 0;
|
31 |
+
width: 20px;
|
32 |
+
overflow: hidden;
|
33 |
+
text-indent: 100%;
|
34 |
+
white-space: nowrap;
|
35 |
+
}
|
36 |
+
|
37 |
+
.woocommerce .widget_layered_nav ul.yith-wcan-color li a:hover,
|
38 |
+
.woocommerce-page .widget_layered_nav ul.yith-wcan-color li a:hover,
|
39 |
+
.woocommerce .widget_layered_nav ul.yith-wcan-color li.chosen a,
|
40 |
+
.woocommerce-page .widget_layered_nav ul.yith-wcan-color li.chosen a,
|
41 |
+
.woocommerce .widget_layered_nav ul.yith-wcan-color li span:hover,
|
42 |
+
.woocommerce-page .widget_layered_nav ul.yith-wcan-color li span:hover,
|
43 |
+
.woocommerce .widget_layered_nav ul.yith-wcan-color li.chosen span,
|
44 |
+
.woocommerce-page .widget_layered_nav ul.yith-wcan-color li.chosen span {
|
45 |
+
border: 1px solid #444;
|
46 |
+
background-image: none;
|
47 |
+
|
48 |
+
-webkit-border-radius: 0;
|
49 |
+
-moz-border-radius: 0;
|
50 |
+
border-radius: 0;
|
51 |
+
}
|
52 |
+
|
53 |
+
/* Labels Type */
|
54 |
+
.yith-wcan-label li {
|
55 |
+
float: left;
|
56 |
+
}
|
57 |
+
|
58 |
+
.woocommerce .widget_layered_nav ul.yith-wcan-label li a,
|
59 |
+
.woocommerce-page .widget_layered_nav ul.yith-wcan-label li a,
|
60 |
+
.woocommerce .widget_layered_nav ul.yith-wcan-label li span,
|
61 |
+
.woocommerce-page .widget_layered_nav ul.yith-wcan-label li span {
|
62 |
+
background: #efefef;
|
63 |
+
border: 1px solid #ddd;
|
64 |
+
display: block;
|
65 |
+
margin: 5px 5px 5px 0;
|
66 |
+
padding: 2px;
|
67 |
+
overflow: hidden;
|
68 |
+
text-decoration: none;
|
69 |
+
}
|
70 |
+
|
71 |
+
.woocommerce .widget_layered_nav ul.yith-wcan-label li a:hover,
|
72 |
+
.woocommerce-page .widget_layered_nav ul.yith-wcan-label li a:hover,
|
73 |
+
.woocommerce .widget_layered_nav ul.yith-wcan-label li.chosen a,
|
74 |
+
.woocommerce-page .widget_layered_nav ul.yith-wcan-label li.chosen a {
|
75 |
+
border: 1px solid #444;
|
76 |
+
background-image: none;
|
77 |
+
background-color: #ad74a2;
|
78 |
+
color: #fff;
|
79 |
+
|
80 |
+
-webkit-border-radius: 0;
|
81 |
+
-moz-border-radius: 0;
|
82 |
+
border-radius: 0;
|
83 |
+
}
|
84 |
+
|
assets/images/ajax-loader.gif
ADDED
Binary file
|
assets/js/yith-wcan-admin.js
ADDED
@@ -0,0 +1,38 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/**
|
2 |
+
* Admin
|
3 |
+
*
|
4 |
+
* @author Your Inspiration Themes
|
5 |
+
* @package YITH WooCommerce Ajax Navigation
|
6 |
+
* @version 1.0.0
|
7 |
+
*/
|
8 |
+
jQuery(function($){
|
9 |
+
|
10 |
+
$(document).on('change', '.yith_wcan_type, .yith_wcan_attributes', function(e){
|
11 |
+
var t = this,
|
12 |
+
container = $(this).parents('.widget-content').find('.yith_wcan_placeholder').html(''),
|
13 |
+
spinner = container.next('.spinner').show();
|
14 |
+
|
15 |
+
var data = {
|
16 |
+
action: 'yith_wcan_select_type',
|
17 |
+
id: $('input[name=widget_id]', $(t).parents('.widget-content')).val(),
|
18 |
+
name: $('input[name=widget_name]', $(t).parents('.widget-content')).val(),
|
19 |
+
attribute: $('.yith_wcan_attributes', $(t).parents('.widget-content')).val(),
|
20 |
+
value: $('.yith_wcan_type', $(t).parents('.widget-content')).val()
|
21 |
+
};
|
22 |
+
|
23 |
+
|
24 |
+
$.post(ajaxurl, data, function(response) {
|
25 |
+
spinner.hide();
|
26 |
+
|
27 |
+
container.html( response.content );
|
28 |
+
$(document).trigger('yith_colorpicker');
|
29 |
+
}, 'json');
|
30 |
+
});
|
31 |
+
|
32 |
+
//color-picker
|
33 |
+
$(document).on('yith_colorpicker', function(){
|
34 |
+
$('.yith-colorpicker').each(function(){
|
35 |
+
$(this).wpColorPicker();
|
36 |
+
});
|
37 |
+
}).trigger('yith_colorpicker');
|
38 |
+
});
|
assets/js/yith-wcan-frontend.js
ADDED
@@ -0,0 +1,89 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/**
|
2 |
+
* Frontend
|
3 |
+
*
|
4 |
+
* @author Your Inspiration Themes
|
5 |
+
* @package YITH WooCommerce Ajax Navigation
|
6 |
+
* @version 1.0.0
|
7 |
+
*/
|
8 |
+
jQuery(function($){
|
9 |
+
/**
|
10 |
+
Copyright (c) 2010, All Right Reserved, Wong Shek Hei @ shekhei@gmail.com
|
11 |
+
License: GNU Lesser General Public License (http://www.gnu.org/licenses/lgpl.html)
|
12 |
+
**/
|
13 |
+
var expr=/[.#\w].([\S]*)/g,classexpr=/(?!(\[))(\.)[^.#[]*/g,idexpr=/(#)[^.#[]*/,tagexpr=/^[\w]+/,varexpr=/(\w+?)=(['"])([^\2$]*?)\2/,simpleselector=/^[\w]+$/,parseSelector=function(d){for(var c={sel:[],val:[]},a=[],j=!1,h="",e=[],f=0,m=d.length;f<m;f++){var g=d.charAt(f);if(j)if("\\"===g&&f+1<d.length)e.push(d.charAt(++f));else if(h===g)h="",e.push(g);else if(("'"===g||'"'===g)&&""===h)h=g,e.push(g);else if("]"===g&&""===h)c.val.push(e.join("")),e=[],j=!1;else{if("]"!==g||""!==h)""===h&&","===g?(c.val.push(e.join("")),
|
14 |
+
e=[]):e.push(g)}else"\\"===g&&f+1<d.length?j&&e.push(d.charAt(++f)):"["===g&&""===h?j=!0:" "===g||"+"===g?(c.sel=c.sel.join(""),a.push(c),"+"===g&&a.push({sel:"+",val:""}),c={sel:[],val:[]}):" "!==g&&"]"!==g&&c.sel.push(g)}if(0!=c.sel.length||0!=c.val.length)c.sel=c.sel.join(""),a.push(c);for(f=0;f<a.length;f++){c=a[f].sel;if("+"===c)b.tag=c;else{var b=[];b.tag=tagexpr.exec(c);b.id=idexpr.exec(c);b.id&&$.isArray(b.id)&&(b.id=b.id[0].substr(1));b.tag||(b.tag="div");b.vars=[];for(d=0;d<a[f].val.length;d++)h=
|
15 |
+
a[f].val[d].indexOf("="),j=a[f].val[d].substr(0,h),h=a[f].val[d].substr(h+1),h=h.replace(/^[\s]*[\"\']*|[\"\']*[\s]*$/g,""),"text"===j?b.text=h:b.vars.push([j,h]);c=c.match(classexpr);j=[];if(c){for(d=0;d<c.length;d++)j.push(c[d].substr(1));b.className=j.join(" ")}}a[f]=b}return a},rmFromParent=function(d){var c=d.parentNode,a=d.nextSibling;c.removeChild(d);return a?function(){c.insertBefore(d,a)}:function(){c.appendChild(d)}},nonArrVer=function(d,c){var a=[],a=simpleselector.test(d)?[{tag:d}]:parseSelector(d),
|
16 |
+
j=[];"undefined"===typeof c&&(c=1);for(var h=[],e=[],f=[],m=document.createElement("div"),g=0,b=0;b<a.length;b++){if("+"==a[b].tag)e=f.slice(),--g;else{for(var l=0;l<c;l++)if("input"==a[b].tag){var k=[];k.push("<"+a[b].tag);a[b].id&&k.push("id='"+a[b].id+"'");a[b].className&&(k.push("class='"+a[b].className),b+1===a.length&&k.push(lastClass),k.push("'"));if(a[b].vars)for(var n=0;n<a[b].vars.length;n++)k.push(a[b].vars[n][0]+"='"+a[b].vars[n][1]+"'");a[b].text&&k.push("value='"+a[b].text+"'");k.push("/>");
|
17 |
+
f[l]=e[l];e[l]?(e[l].innerHTML+=k.join(" "),e[l]=e[l].lastChild):(m.innerHTML=k.join(" "),e[l]=m.removeChild(m.firstChild))}else{k=document.createElement(a[b].tag);if(a[b].vars)for(n=0;n<a[b].vars.length;n++)console.log(a[b].tag,a[b].vars[n]),k.setAttribute(a[b].vars[n][0],a[b].vars[n][1]);a[b].id&&(k.id=a[b].id);a[b].className&&(k.className=a[b].className);a[b].text&&k.appendChild(document.createTextNode(a[b].text));f[l]=e[l];e[l]=e[l]?e[l].appendChild(k):k}g++||Array.prototype.push.apply(h,e)}j=
|
18 |
+
$.merge(j,e)}return $(h)},arrVer=function(d,c,a){for(var j=d.match(/%[^%]*%/g)||[],h=[],e=0;e<c.length;e++){for(var f=d,m=0;m<j.length;m++)var g=j[m].substr(1,j[m].length-2),f=f.replace(j[m],c[e][g]);h=$.merge(h,nonArrVer(f,a))}return $(h)};
|
19 |
+
$.jseldom=function(d){if(2==arguments.length&&$.isPlainObject(arguments[1]))return arrVer.apply(this,[arguments[0],[arguments[1]]]);if(1==arguments.length||2==arguments.length&&!$.isArray(arguments[1]))return nonArrVer.apply(this,arguments);if(2==arguments.length)return arrVer.apply(this,arguments)};
|
20 |
+
|
21 |
+
|
22 |
+
//wrap the container
|
23 |
+
$(yith_wcan.container).wrap('<div class="yit-wcan-container"></div>');
|
24 |
+
$('.woocommerce-info').wrap('<div class="yit-wcan-container"></div>');
|
25 |
+
|
26 |
+
$(document).on('click', '.yith-wcan a', function(e){
|
27 |
+
e.preventDefault();
|
28 |
+
var href = this.href;
|
29 |
+
|
30 |
+
//loading
|
31 |
+
$(yith_wcan.container).html('').addClass('yith-wcan-loading');
|
32 |
+
$(yith_wcan.pagination).hide();
|
33 |
+
$(yith_wcan.result_count).hide();
|
34 |
+
|
35 |
+
$.ajax({
|
36 |
+
url: href,
|
37 |
+
success: function( response ){
|
38 |
+
$(yith_wcan.container).removeClass('yith-wcan-loading');
|
39 |
+
|
40 |
+
//container
|
41 |
+
if( $(response).find(yith_wcan.container).length > 0 ) {
|
42 |
+
$('.yit-wcan-container').html( $(response).find(yith_wcan.container) );
|
43 |
+
} else {
|
44 |
+
$('.yit-wcan-container').html( $(response).find('.woocommerce-info') );
|
45 |
+
}
|
46 |
+
|
47 |
+
|
48 |
+
//pagination
|
49 |
+
if( $(response).find(yith_wcan.pagination).length > 0 ) {
|
50 |
+
//se non esiste lo creo
|
51 |
+
if( $(yith_wcan.pagination).length == 0 ) {
|
52 |
+
$.jseldom( yith_wcan.pagination ).insertAfter( $(yith_wcan.container) );
|
53 |
+
}
|
54 |
+
|
55 |
+
$(yith_wcan.pagination)
|
56 |
+
.html( $(response).find(yith_wcan.pagination).html())
|
57 |
+
.show();
|
58 |
+
}
|
59 |
+
|
60 |
+
//result count
|
61 |
+
if( $(response).find(yith_wcan.result_count).length > 0 ) {
|
62 |
+
$(yith_wcan.result_count).html( $(response).find(yith_wcan.result_count).html()).show();
|
63 |
+
}
|
64 |
+
|
65 |
+
|
66 |
+
//load new widgets
|
67 |
+
$('.yith-woo-ajax-navigation').each(function(){
|
68 |
+
var id = $(this).attr('id');
|
69 |
+
$(this).html( $(response).find('#'+id).html() );
|
70 |
+
|
71 |
+
if( $(this).text() == '' ) {
|
72 |
+
$(this).hide();
|
73 |
+
} else {
|
74 |
+
$(this).show();
|
75 |
+
}
|
76 |
+
});
|
77 |
+
|
78 |
+
//update browser history (IE doesn't support it)
|
79 |
+
if ( !navigator.userAgent.match(/msie/i) ) {
|
80 |
+
window.history.pushState({"pageTitle":response.pageTitle},"", href);
|
81 |
+
}
|
82 |
+
|
83 |
+
//trigger ready event
|
84 |
+
$(document).trigger("ready");
|
85 |
+
$(document).trigger("yith-wcan-ajax-filtered");
|
86 |
+
}
|
87 |
+
});
|
88 |
+
});
|
89 |
+
});
|
assets/js/yith-wcan-frontend.min.js
ADDED
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/**
|
2 |
+
* Frontend
|
3 |
+
*
|
4 |
+
* @author Your Inspiration Themes
|
5 |
+
* @package YITH WooCommerce Ajax Navigation
|
6 |
+
* @version 1.0.0
|
7 |
+
*/
|
8 |
+
jQuery(function(c){var s=/(?!(\[))(\.)[^.#[]*/g,t=/(#)[^.#[]*/,u=/^[\w]+/,v=/^[\w]+$/,q=function(n,p){var a=[];if(v.test(n))a=[{tag:n}];else{for(var a=n,e={sel:[],val:[]},f=[],h=!1,g="",j=[],b=0,k=a.length;b<k;b++){var d=a.charAt(b);if(h)if("\\"===d&&b+1<a.length)j.push(a.charAt(++b));else if(g===d)g="",j.push(d);else if(("'"===d||'"'===d)&&""===g)g=d,j.push(d);else if("]"===d&&""===g)e.val.push(j.join("")),j=[],h=!1;else{if("]"!==d||""!==g)""===g&&","===d?(e.val.push(j.join("")),j=[]):j.push(d)}else"\\"===
|
9 |
+
d&&b+1<a.length?h&&j.push(a.charAt(++b)):"["===d&&""===g?h=!0:" "===d||"+"===d?(e.sel=e.sel.join(""),f.push(e),"+"===d&&f.push({sel:"+",val:""}),e={sel:[],val:[]}):" "!==d&&"]"!==d&&e.sel.push(d)}if(0!=e.sel.length||0!=e.val.length)e.sel=e.sel.join(""),f.push(e);for(b=0;b<f.length;b++){e=f[b].sel;if("+"===e)l.tag=e;else{var l=[];l.tag=u.exec(e);l.id=t.exec(e);l.id&&c.isArray(l.id)&&(l.id=l.id[0].substr(1));l.tag||(l.tag="div");l.vars=[];for(a=0;a<f[b].val.length;a++)g=f[b].val[a].indexOf("="),h=f[b].val[a].substr(0,
|
10 |
+
g),g=f[b].val[a].substr(g+1),g=g.replace(/^[\s]*[\"\']*|[\"\']*[\s]*$/g,""),"text"===h?l.text=g:l.vars.push([h,g]);e=e.match(s);h=[];if(e){for(a=0;a<e.length;a++)h.push(e[a].substr(1));l.className=h.join(" ")}}f[b]=l}a=f}l=[];"undefined"===typeof p&&(p=1);e=[];f=[];h=[];g=document.createElement("div");for(b=j=0;b<a.length;b++){if("+"==a[b].tag)f=h.slice(),--j;else{for(k=0;k<p;k++)if("input"==a[b].tag){d=[];d.push("<"+a[b].tag);a[b].id&&d.push("id='"+a[b].id+"'");a[b].className&&(d.push("class='"+
|
11 |
+
a[b].className),b+1===a.length&&d.push(lastClass),d.push("'"));if(a[b].vars)for(var m=0;m<a[b].vars.length;m++)d.push(a[b].vars[m][0]+"='"+a[b].vars[m][1]+"'");a[b].text&&d.push("value='"+a[b].text+"'");d.push("/>");h[k]=f[k];f[k]?(f[k].innerHTML+=d.join(" "),f[k]=f[k].lastChild):(g.innerHTML=d.join(" "),f[k]=g.removeChild(g.firstChild))}else{d=document.createElement(a[b].tag);if(a[b].vars)for(m=0;m<a[b].vars.length;m++)console.log(a[b].tag,a[b].vars[m]),d.setAttribute(a[b].vars[m][0],a[b].vars[m][1]);
|
12 |
+
a[b].id&&(d.id=a[b].id);a[b].className&&(d.className=a[b].className);a[b].text&&d.appendChild(document.createTextNode(a[b].text));h[k]=f[k];f[k]=f[k]?f[k].appendChild(d):d}j++||Array.prototype.push.apply(e,f)}l=c.merge(l,f)}return c(e)},r=function(n,p,a){for(var e=n.match(/%[^%]*%/g)||[],f=[],h=0;h<p.length;h++){for(var g=n,j=0;j<e.length;j++)var b=e[j].substr(1,e[j].length-2),g=g.replace(e[j],p[h][b]);f=c.merge(f,q(g,a))}return c(f)};c.jseldom=function(n){if(2==arguments.length&&c.isPlainObject(arguments[1]))return r.apply(this,
|
13 |
+
[arguments[0],[arguments[1]]]);if(1==arguments.length||2==arguments.length&&!c.isArray(arguments[1]))return q.apply(this,arguments);if(2==arguments.length)return r.apply(this,arguments)};c(yith_wcan.container).wrap('<div class="yit-wcan-container"></div>');c(".woocommerce-info").wrap('<div class="yit-wcan-container"></div>');c(document).on("click",".yith-wcan a",function(n){n.preventDefault();var p=this.href;c(yith_wcan.container).html("").addClass("yith-wcan-loading");c(yith_wcan.pagination).hide();
|
14 |
+
c(yith_wcan.result_count).hide();c.ajax({url:p,success:function(a){c(yith_wcan.container).removeClass("yith-wcan-loading");0<c(a).find(yith_wcan.container).length?c(".yit-wcan-container").html(c(a).find(yith_wcan.container)):c(".yit-wcan-container").html(c(a).find(".woocommerce-info"));0<c(a).find(yith_wcan.pagination).length&&(0==c(yith_wcan.pagination).length&&c.jseldom(yith_wcan.pagination).insertAfter(c(yith_wcan.container)),c(yith_wcan.pagination).html(c(a).find(yith_wcan.pagination).html()).show());
|
15 |
+
0<c(a).find(yith_wcan.result_count).length&&c(yith_wcan.result_count).html(c(a).find(yith_wcan.result_count).html()).show();c(".yith-woo-ajax-navigation").each(function(){var e=c(this).attr("id");c(this).html(c(a).find("#"+e).html());""==c(this).text()?c(this).hide():c(this).show()});navigator.userAgent.match(/msie/i)||window.history.pushState({pageTitle:a.pageTitle},"",p);c(document).trigger("ready");c(document).trigger("yith-wcan-ajax-filtered")}})})});
|
class.yith-wcan-admin.php
ADDED
@@ -0,0 +1,106 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Admin class
|
4 |
+
*
|
5 |
+
* @author Your Inspiration Themes
|
6 |
+
* @package YITH WooCommerce Ajax Navigation
|
7 |
+
* @version 1.0.0
|
8 |
+
*/
|
9 |
+
|
10 |
+
if ( !defined( 'YITH_WCAN' ) ) { exit; } // Exit if accessed directly
|
11 |
+
|
12 |
+
if( !class_exists( 'YITH_WCAN_Admin' ) ) {
|
13 |
+
/**
|
14 |
+
* Admin class.
|
15 |
+
* The class manage all the admin behaviors.
|
16 |
+
*
|
17 |
+
* @since 1.0.0
|
18 |
+
*/
|
19 |
+
class YITH_WCAN_Admin {
|
20 |
+
/**
|
21 |
+
* Plugin version
|
22 |
+
*
|
23 |
+
* @var string
|
24 |
+
* @since 1.0.0
|
25 |
+
*/
|
26 |
+
public $version;
|
27 |
+
|
28 |
+
/**
|
29 |
+
* Constructor
|
30 |
+
*
|
31 |
+
* @access public
|
32 |
+
* @since 1.0.0
|
33 |
+
*/
|
34 |
+
public function __construct( $version ) {
|
35 |
+
$this->version = $version;
|
36 |
+
|
37 |
+
//Actions
|
38 |
+
add_action( 'init', array( $this, 'init' ) );
|
39 |
+
add_action('wp_ajax_yith_wcan_select_type', array( $this, 'ajax_print_terms') );
|
40 |
+
|
41 |
+
add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_styles_scripts' ) );
|
42 |
+
|
43 |
+
// YITH WCAN Loaded
|
44 |
+
do_action( 'yith_wcan_loaded' );
|
45 |
+
}
|
46 |
+
|
47 |
+
|
48 |
+
/**
|
49 |
+
* Init method:
|
50 |
+
* - default options
|
51 |
+
*
|
52 |
+
* @access public
|
53 |
+
* @since 1.0.0
|
54 |
+
*/
|
55 |
+
public function init() {}
|
56 |
+
|
57 |
+
|
58 |
+
/**
|
59 |
+
* Enqueue admin styles and scripts
|
60 |
+
*
|
61 |
+
* @access public
|
62 |
+
* @return void
|
63 |
+
* @since 1.0.0
|
64 |
+
*/
|
65 |
+
public function enqueue_styles_scripts() {
|
66 |
+
global $pagenow;
|
67 |
+
|
68 |
+
if( 'widgets.php' == $pagenow ) {
|
69 |
+
wp_enqueue_style( 'wp-color-picker' );
|
70 |
+
wp_enqueue_style( 'yith_wcan_admin', YITH_WCAN_URL . 'assets/css/admin.css', false, $this->version );
|
71 |
+
|
72 |
+
wp_enqueue_script( 'wp-color-picker' );
|
73 |
+
wp_enqueue_script( 'yith_wcan_admin', YITH_WCAN_URL . 'assets/js/yith-wcan-admin.js', array('jquery', 'wp-color-picker'), $this->version, true );
|
74 |
+
}
|
75 |
+
}
|
76 |
+
|
77 |
+
/**
|
78 |
+
* Print terms for the element selected
|
79 |
+
*
|
80 |
+
* @access public
|
81 |
+
* @return void
|
82 |
+
* @since 1.0.0
|
83 |
+
*/
|
84 |
+
public function ajax_print_terms() {
|
85 |
+
$type = $_POST['value'];
|
86 |
+
$attribute = $_POST['attribute'];
|
87 |
+
$return = array('message' => '', 'content' => $_POST);
|
88 |
+
|
89 |
+
$terms = get_terms( 'pa_' . $attribute, array('hide_empty'=>'0') );
|
90 |
+
|
91 |
+
|
92 |
+
$return['content'] = yith_wcan_attributes_table(
|
93 |
+
$type,
|
94 |
+
$attribute,
|
95 |
+
$_POST['id'],
|
96 |
+
$_POST['name'],
|
97 |
+
array(),
|
98 |
+
false
|
99 |
+
);
|
100 |
+
|
101 |
+
echo json_encode($return);
|
102 |
+
die();
|
103 |
+
}
|
104 |
+
|
105 |
+
}
|
106 |
+
}
|
class.yith-wcan-frontend.php
ADDED
@@ -0,0 +1,130 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Frontend class
|
4 |
+
*
|
5 |
+
* @author Your Inspiration Themes
|
6 |
+
* @package YITH WooCommerce Ajax Navigation
|
7 |
+
* @version 1.0.0
|
8 |
+
*/
|
9 |
+
|
10 |
+
if ( !defined( 'YITH_WCAN' ) ) { exit; } // Exit if accessed directly
|
11 |
+
|
12 |
+
if( !class_exists( 'YITH_WCAN_Frontend' ) ) {
|
13 |
+
/**
|
14 |
+
* Frontend class.
|
15 |
+
* The class manage all the frontend behaviors.
|
16 |
+
*
|
17 |
+
* @since 1.0.0
|
18 |
+
*/
|
19 |
+
class YITH_WCAN_Frontend {
|
20 |
+
/**
|
21 |
+
* Plugin version
|
22 |
+
*
|
23 |
+
* @var string
|
24 |
+
* @since 1.0.0
|
25 |
+
*/
|
26 |
+
public $version;
|
27 |
+
|
28 |
+
/**
|
29 |
+
* Constructor
|
30 |
+
*
|
31 |
+
* @access public
|
32 |
+
* @since 1.0.0
|
33 |
+
*/
|
34 |
+
public function __construct( $version ) {
|
35 |
+
$this->version = $version;
|
36 |
+
|
37 |
+
//Actions
|
38 |
+
add_action( 'init', array( $this, 'init' ) );
|
39 |
+
add_action( 'init', array( $this, 'woocommerce_layered_nav_init' ), 99 );
|
40 |
+
|
41 |
+
add_action( 'wp_head', array( $this, 'enqueue_styles_scripts' ) );
|
42 |
+
|
43 |
+
// YITH WCAN Loaded
|
44 |
+
do_action( 'yith_wcan_loaded' );
|
45 |
+
}
|
46 |
+
|
47 |
+
|
48 |
+
/**
|
49 |
+
* Init method:
|
50 |
+
* - default options
|
51 |
+
*
|
52 |
+
* @access public
|
53 |
+
* @since 1.0.0
|
54 |
+
*/
|
55 |
+
public function init() {
|
56 |
+
|
57 |
+
}
|
58 |
+
|
59 |
+
|
60 |
+
/**
|
61 |
+
* Enqueue frontend styles and scripts
|
62 |
+
*
|
63 |
+
* @access public
|
64 |
+
* @return void
|
65 |
+
* @since 1.0.0
|
66 |
+
*/
|
67 |
+
public function enqueue_styles_scripts() {
|
68 |
+
if( yith_wcan_can_be_displayed() ) {
|
69 |
+
$suffix = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min';
|
70 |
+
|
71 |
+
wp_enqueue_style( 'yith_wcan_admin', YITH_WCAN_URL . 'assets/css/frontend.css', false, $this->version );
|
72 |
+
wp_enqueue_script( 'yith_wcan_frontend', YITH_WCAN_URL . 'assets/js/yith-wcan-frontend' . $suffix .'.js', array('jquery'), $this->version, true );
|
73 |
+
|
74 |
+
$args = array(
|
75 |
+
'container' => '.products',
|
76 |
+
'pagination' => 'nav.woocommerce-pagination',
|
77 |
+
'result_count' => '.woocommerce-result-count'
|
78 |
+
);
|
79 |
+
wp_localize_script( 'yith_wcan_frontend', 'yith_wcan', apply_filters( 'yith-wcan-frontend-args', $args ) );
|
80 |
+
}
|
81 |
+
}
|
82 |
+
|
83 |
+
|
84 |
+
/**
|
85 |
+
* Layered Nav Init
|
86 |
+
*
|
87 |
+
* @package WooCommerce/Widgets
|
88 |
+
* @access public
|
89 |
+
* @return void
|
90 |
+
*/
|
91 |
+
public function woocommerce_layered_nav_init( ) {
|
92 |
+
|
93 |
+
if ( is_active_widget( false, false, 'yith-woo-ajax-navigation', true ) && ! is_admin() ) {
|
94 |
+
|
95 |
+
global $_chosen_attributes, $woocommerce, $_attributes_array;
|
96 |
+
|
97 |
+
$_chosen_attributes = $_attributes_array = array();
|
98 |
+
|
99 |
+
$attribute_taxonomies = $woocommerce->get_attribute_taxonomies();
|
100 |
+
if ( $attribute_taxonomies ) {
|
101 |
+
foreach ( $attribute_taxonomies as $tax ) {
|
102 |
+
|
103 |
+
$attribute = sanitize_title( $tax->attribute_name );
|
104 |
+
$taxonomy = $woocommerce->attribute_taxonomy_name( $attribute );
|
105 |
+
|
106 |
+
// create an array of product attribute taxonomies
|
107 |
+
$_attributes_array[] = $taxonomy;
|
108 |
+
|
109 |
+
$name = 'filter_' . $attribute;
|
110 |
+
$query_type_name = 'query_type_' . $attribute;
|
111 |
+
|
112 |
+
if ( ! empty( $_GET[ $name ] ) && taxonomy_exists( $taxonomy ) ) {
|
113 |
+
|
114 |
+
$_chosen_attributes[ $taxonomy ]['terms'] = explode( ',', $_GET[ $name ] );
|
115 |
+
|
116 |
+
if ( empty( $_GET[ $query_type_name ] ) || ! in_array( strtolower( $_GET[ $query_type_name ] ), array( 'and', 'or' ) ) )
|
117 |
+
$_chosen_attributes[ $taxonomy ]['query_type'] = apply_filters( 'woocommerce_layered_nav_default_query_type', 'and' );
|
118 |
+
else
|
119 |
+
$_chosen_attributes[ $taxonomy ]['query_type'] = strtolower( $_GET[ $query_type_name ] );
|
120 |
+
|
121 |
+
}
|
122 |
+
}
|
123 |
+
}
|
124 |
+
|
125 |
+
add_filter('loop_shop_post_in', 'woocommerce_layered_nav_query');
|
126 |
+
}
|
127 |
+
}
|
128 |
+
|
129 |
+
}
|
130 |
+
}
|
class.yith-wcan-helper.php
ADDED
@@ -0,0 +1,45 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Main class
|
4 |
+
*
|
5 |
+
* @author Your Inspiration Themes
|
6 |
+
* @package YITH WooCommerce Ajax Navigation
|
7 |
+
* @version 1.0.0
|
8 |
+
*/
|
9 |
+
|
10 |
+
if ( !defined( 'YITH_WCAN' ) ) { exit; } // Exit if accessed directly
|
11 |
+
|
12 |
+
if( !class_exists( 'YITH_WCAN_Helper' ) ) {
|
13 |
+
/**
|
14 |
+
* YITH WooCommerce Ajax Navigation Helper
|
15 |
+
*
|
16 |
+
* @since 1.0.0
|
17 |
+
*/
|
18 |
+
class YITH_WCAN_Helper {
|
19 |
+
|
20 |
+
/*
|
21 |
+
* Get Woocommerce Attribute Taxonomies
|
22 |
+
*
|
23 |
+
* @since 1.0.0
|
24 |
+
* @access public
|
25 |
+
*/
|
26 |
+
public static function attribute_taxonomies() {
|
27 |
+
global $woocommerce;
|
28 |
+
|
29 |
+
if ( ! isset( $woocommerce ) ) return array();
|
30 |
+
|
31 |
+
$attributes = array();
|
32 |
+
$attribute_taxonomies = $woocommerce->get_attribute_taxonomies();
|
33 |
+
|
34 |
+
if( empty( $attribute_taxonomies ) ) return array();
|
35 |
+
foreach( $attribute_taxonomies as $attribute ) {
|
36 |
+
if ( taxonomy_exists( $woocommerce->attribute_taxonomy_name( $attribute->attribute_name ) ) ) {
|
37 |
+
$attributes[] = $attribute->attribute_name;
|
38 |
+
}
|
39 |
+
}
|
40 |
+
|
41 |
+
return $attributes;
|
42 |
+
}
|
43 |
+
|
44 |
+
}
|
45 |
+
}
|
class.yith-wcan.php
ADDED
@@ -0,0 +1,79 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Main class
|
4 |
+
*
|
5 |
+
* @author Your Inspiration Themes
|
6 |
+
* @package YITH WooCommerce Ajax Navigation
|
7 |
+
* @version 1.0.0
|
8 |
+
*/
|
9 |
+
|
10 |
+
if ( !defined( 'YITH_WCAN' ) ) { exit; } // Exit if accessed directly
|
11 |
+
|
12 |
+
if( !class_exists( 'YITH_WCAN' ) ) {
|
13 |
+
/**
|
14 |
+
* YITH WooCommerce Ajax Navigation
|
15 |
+
*
|
16 |
+
* @since 1.0.0
|
17 |
+
*/
|
18 |
+
class YITH_WCAN {
|
19 |
+
/**
|
20 |
+
* Plugin version
|
21 |
+
*
|
22 |
+
* @var string
|
23 |
+
* @since 1.0.0
|
24 |
+
*/
|
25 |
+
public $version = '1.0.0';
|
26 |
+
|
27 |
+
/**
|
28 |
+
* Plugin object
|
29 |
+
*
|
30 |
+
* @var string
|
31 |
+
* @since 1.0.0
|
32 |
+
*/
|
33 |
+
public $obj = null;
|
34 |
+
|
35 |
+
/**
|
36 |
+
* Constructor
|
37 |
+
*
|
38 |
+
* @return mixed|YITH_WCAN_Admin|YITH_WCAN_Frontend
|
39 |
+
* @since 1.0.0
|
40 |
+
*/
|
41 |
+
public function __construct() {
|
42 |
+
|
43 |
+
// actions
|
44 |
+
add_action( 'init', array( $this, 'init' ) );
|
45 |
+
add_action( 'widgets_init', array( $this, 'registerWidgets' ) );
|
46 |
+
|
47 |
+
|
48 |
+
if( is_admin() ) {
|
49 |
+
$this->obj = new YITH_WCAN_Admin( $this->version );
|
50 |
+
} else {
|
51 |
+
$this->obj = new YITH_WCAN_Frontend( $this->version );
|
52 |
+
}
|
53 |
+
|
54 |
+
return $this->obj;
|
55 |
+
}
|
56 |
+
|
57 |
+
|
58 |
+
/**
|
59 |
+
* Init method
|
60 |
+
*
|
61 |
+
* @access public
|
62 |
+
* @since 1.0.0
|
63 |
+
*/
|
64 |
+
public function init() {}
|
65 |
+
|
66 |
+
|
67 |
+
/**
|
68 |
+
* Load and register widgets
|
69 |
+
*
|
70 |
+
* @access public
|
71 |
+
* @since 1.0.0
|
72 |
+
*/
|
73 |
+
public function registerWidgets() {
|
74 |
+
register_widget( 'YITH_WCAN_Navigation_Widget' );
|
75 |
+
|
76 |
+
}
|
77 |
+
|
78 |
+
}
|
79 |
+
}
|
functions.yith-wcan.php
ADDED
@@ -0,0 +1,101 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Functions
|
4 |
+
*
|
5 |
+
* @author Your Inspiration Themes
|
6 |
+
* @package YITH WooCommerce Ajax Navigation
|
7 |
+
* @version 1.0.0
|
8 |
+
*/
|
9 |
+
|
10 |
+
if ( !defined( 'YITH_WCAN' ) ) { exit; } // Exit if accessed directly
|
11 |
+
|
12 |
+
|
13 |
+
/**
|
14 |
+
* Return a dropdown with Woocommerce attributes
|
15 |
+
*/
|
16 |
+
function yith_wcan_dropdown_attributes( $selected, $echo = true ) {
|
17 |
+
$attributes = YITH_WCAN_Helper::attribute_taxonomies();
|
18 |
+
$options = "";
|
19 |
+
|
20 |
+
foreach( $attributes as $attribute ) {
|
21 |
+
$options .= "<option name='{$attribute}'". selected( $attribute, $selected, false ) .">{$attribute}</option>";
|
22 |
+
}
|
23 |
+
|
24 |
+
if( $echo ) {
|
25 |
+
echo $options;
|
26 |
+
} else {
|
27 |
+
return $options;
|
28 |
+
}
|
29 |
+
}
|
30 |
+
|
31 |
+
|
32 |
+
/**
|
33 |
+
* Print the widgets options already filled
|
34 |
+
*
|
35 |
+
* @param $type string list|colors|label
|
36 |
+
* @param $attribute woocommerce taxonomy
|
37 |
+
* @param $id id used in the <input />
|
38 |
+
* @param $name base name used in the <input />
|
39 |
+
* @param $values array of values (could be empty if this is an ajax call)
|
40 |
+
*
|
41 |
+
* @return string
|
42 |
+
*/
|
43 |
+
function yith_wcan_attributes_table( $type, $attribute, $id, $name, $values = array(), $echo = true ) {
|
44 |
+
$return = '';
|
45 |
+
|
46 |
+
$terms = get_terms( 'pa_' . $attribute, array('hide_empty'=>'0') );
|
47 |
+
|
48 |
+
if( 'list' == $type ) {
|
49 |
+
$return = '<input type="hidden" name="'. $name .'[colors]" value="" /><input type="hidden" name="'. $name .'[labels]" value="" />';
|
50 |
+
} elseif( 'color' == $type ) {
|
51 |
+
if( !empty($terms) ) {
|
52 |
+
$return = sprintf('<table><tr><th>%s</th><th>%s</th></tr>', __('Term', 'yit'), __('Color', 'yit'));
|
53 |
+
|
54 |
+
foreach( $terms as $term ) {
|
55 |
+
$return .= "<tr><td><label for='{$id}{$term->term_id}'>{$term->name}</label></td><td><input type='text' id='{$id}{$term->term_id}' name='{$name}[colors][{$term->term_id}]' value='" . (isset( $values[$term->term_id] ) ? $values[$term->term_id] : '') . "' size='3' class='yith-colorpicker' /></td></tr>";
|
56 |
+
}
|
57 |
+
|
58 |
+
$return .= '</table>';
|
59 |
+
}
|
60 |
+
|
61 |
+
$return .= '<input type="hidden" name="'. $name .'[labels]" value="" />';
|
62 |
+
} elseif( 'label' == $type ) {
|
63 |
+
if( !empty($terms) ) {
|
64 |
+
$return = sprintf('<table><tr><th>%s</th><th>%s</th></tr>', __('Term', 'yit'), __('Labels', 'yit'));
|
65 |
+
|
66 |
+
foreach( $terms as $term ) {
|
67 |
+
$return .= "<tr><td><label for='{$id}{$term->term_id}'>{$term->name}</label></td><td><input type='text' id='{$id}{$term->term_id}' name='{$name}[labels][{$term->term_id}]' value='" . (isset( $values[$term->term_id] ) ? $values[$term->term_id] : '') . "' size='3' maxlength='3' /></td></tr>";
|
68 |
+
}
|
69 |
+
|
70 |
+
$return .= '</table>';
|
71 |
+
}
|
72 |
+
|
73 |
+
$return .= '<input type="hidden" name="'. $name .'[colors]" value="" />';
|
74 |
+
}
|
75 |
+
|
76 |
+
if( $echo ) {
|
77 |
+
echo $return;
|
78 |
+
}
|
79 |
+
|
80 |
+
return $return;
|
81 |
+
}
|
82 |
+
|
83 |
+
|
84 |
+
/**
|
85 |
+
* Can the widget be displayed?
|
86 |
+
*
|
87 |
+
* @return bool
|
88 |
+
*/
|
89 |
+
function yith_wcan_can_be_displayed() {
|
90 |
+
global $woocommerce, $_attributes_array;
|
91 |
+
|
92 |
+
|
93 |
+
/* if ( ! is_post_type_archive( 'product' ) && ! is_tax( array_merge( $_attributes_array, array( 'product_cat', 'product_tag' ) ) ) )
|
94 |
+
return false;*/
|
95 |
+
|
96 |
+
if ( is_active_widget( false, false, 'yith-woo-ajax-navigation', true ) ) {
|
97 |
+
return true;
|
98 |
+
} else {
|
99 |
+
return false;
|
100 |
+
}
|
101 |
+
}
|
init.php
ADDED
@@ -0,0 +1,57 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Plugin Name: YITH WooCommerce Ajax Navigation
|
4 |
+
* Plugin URI: http://yithemes.com/
|
5 |
+
* Description: YITH WooCommerce Ajax Navigation allows user to filter products in Shop page without reloading the page.
|
6 |
+
* Version: 1.0.0
|
7 |
+
* Author: Your Inspiration Themes
|
8 |
+
* Author URI: http://yithemes.com/
|
9 |
+
* Text Domain: yit
|
10 |
+
* Domain Path: /languages/
|
11 |
+
*
|
12 |
+
* @author Your Inspiration Themes
|
13 |
+
* @package YITH WooCommerce Ajax Navigation
|
14 |
+
* @version 1.0.0
|
15 |
+
*/
|
16 |
+
/* Copyright 2013 Your Inspiration Themes (email : plugins@yithemes.com)
|
17 |
+
|
18 |
+
This program is free software; you can redistribute it and/or modify
|
19 |
+
it under the terms of the GNU General Public License, version 2, as
|
20 |
+
published by the Free Software Foundation.
|
21 |
+
|
22 |
+
This program is distributed in the hope that it will be useful,
|
23 |
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
24 |
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
25 |
+
GNU General Public License for more details.
|
26 |
+
|
27 |
+
You should have received a copy of the GNU General Public License
|
28 |
+
along with this program; if not, write to the Free Software
|
29 |
+
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
30 |
+
*/
|
31 |
+
if ( !defined( 'ABSPATH' ) ) { exit; } // Exit if accessed directly
|
32 |
+
|
33 |
+
/**
|
34 |
+
* Required functions
|
35 |
+
*/
|
36 |
+
if( !defined('YITH_FUNCTIONS') ) {
|
37 |
+
require_once( 'yit-common/yit-functions.php' );
|
38 |
+
}
|
39 |
+
if ( ! yit_is_woocommerce_active() ) return;
|
40 |
+
|
41 |
+
load_plugin_textdomain( 'yit', false, dirname( plugin_basename( __FILE__ ) ). '/languages/' );
|
42 |
+
|
43 |
+
define( 'YITH_WCAN', true );
|
44 |
+
define( 'YITH_WCAN_URL', plugin_dir_url( __FILE__ ) );
|
45 |
+
define( 'YITH_WCAN_DIR', plugin_dir_path( __FILE__ ) );
|
46 |
+
|
47 |
+
// Load required classes and functions
|
48 |
+
require_once('functions.yith-wcan.php');
|
49 |
+
require_once('class.yith-wcan-admin.php');
|
50 |
+
require_once('class.yith-wcan-frontend.php');
|
51 |
+
require_once('class.yith-wcan-helper.php');
|
52 |
+
require_once('widgets/class.yith-wcan-navigation-widget.php');
|
53 |
+
require_once('class.yith-wcan.php');
|
54 |
+
|
55 |
+
// Let's start the game!
|
56 |
+
global $yith_wcan;
|
57 |
+
$yith_wcan = new YITH_WCAN();
|
languages/default.po
ADDED
@@ -0,0 +1,192 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
msgid ""
|
2 |
+
msgstr ""
|
3 |
+
"Project-Id-Version: YITH WooCommerce Ajax Navigation v1.0.0\n"
|
4 |
+
"Report-Msgid-Bugs-To: \n"
|
5 |
+
"POT-Creation-Date: \n"
|
6 |
+
"PO-Revision-Date: 2013-06-17 12:59:26+0000\n"
|
7 |
+
"Last-Translator: Your Inspiration Themes <plugins@yithemes.com>\n"
|
8 |
+
"Language-Team: \n"
|
9 |
+
"MIME-Version: 1.0\n"
|
10 |
+
"Content-Type: text/plain; charset=UTF-8\n"
|
11 |
+
"Content-Transfer-Encoding: 8bit\n"
|
12 |
+
"Plural-Forms: nplurals=2; plural=n != 1;\n"
|
13 |
+
"X-Generator: CSL v1.x\n"
|
14 |
+
"X-Poedit-Language: English\n"
|
15 |
+
"X-Poedit-Country: UNITED STATES\n"
|
16 |
+
"X-Poedit-SourceCharset: utf-8\n"
|
17 |
+
"X-Poedit-KeywordsList: __;_e;__ngettext:1,2;_n:1,2;__ngettext_noop:1,2;_n_noop:1,2;_c,_nc:4c,1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;_nx_noop:4c,1,2;\n"
|
18 |
+
"X-Poedit-Basepath: ../\n"
|
19 |
+
"X-Poedit-Bookmarks: \n"
|
20 |
+
"X-Poedit-SearchPath-0: .\n"
|
21 |
+
"X-Textdomain-Support: yes"
|
22 |
+
|
23 |
+
#: functions.yith-wcan.php:52
|
24 |
+
#: functions.yith-wcan.php:64
|
25 |
+
#@ yit
|
26 |
+
msgid "Term"
|
27 |
+
msgstr ""
|
28 |
+
|
29 |
+
#: functions.yith-wcan.php:52
|
30 |
+
#: widgets/class.yith-wcan-navigation-widget.php:535
|
31 |
+
#@ yit
|
32 |
+
msgid "Color"
|
33 |
+
msgstr ""
|
34 |
+
|
35 |
+
#: functions.yith-wcan.php:64
|
36 |
+
#@ yit
|
37 |
+
msgid "Labels"
|
38 |
+
msgstr ""
|
39 |
+
|
40 |
+
#. translators: plugin header field 'Name'
|
41 |
+
#: init.php:0
|
42 |
+
#: widgets/class.yith-wcan-navigation-widget.php:23
|
43 |
+
#@ yit
|
44 |
+
msgid "YITH WooCommerce Ajax Navigation"
|
45 |
+
msgstr ""
|
46 |
+
|
47 |
+
#. translators: plugin header field 'PluginURI'
|
48 |
+
#. translators: plugin header field 'AuthorURI'
|
49 |
+
#: init.php:0
|
50 |
+
#@ yit
|
51 |
+
msgid "http://yithemes.com/"
|
52 |
+
msgstr ""
|
53 |
+
|
54 |
+
#. translators: plugin header field 'Description'
|
55 |
+
#: init.php:0
|
56 |
+
#@ yit
|
57 |
+
msgid "YITH WooCommerce Ajax Navigation allows user to filter products in Shop page without reloading the page."
|
58 |
+
msgstr ""
|
59 |
+
|
60 |
+
#. translators: plugin header field 'Author'
|
61 |
+
#: init.php:0
|
62 |
+
#@ yit
|
63 |
+
msgid "Your Inspiration Themes"
|
64 |
+
msgstr ""
|
65 |
+
|
66 |
+
#. translators: plugin header field 'Version'
|
67 |
+
#: init.php:0
|
68 |
+
#@ yit
|
69 |
+
msgid "1.0.0"
|
70 |
+
msgstr ""
|
71 |
+
|
72 |
+
#: widgets/class.yith-wcan-navigation-widget.php:21
|
73 |
+
#@ yit
|
74 |
+
msgid "Narrow down the products list without reloading the page"
|
75 |
+
msgstr ""
|
76 |
+
|
77 |
+
#: widgets/class.yith-wcan-navigation-widget.php:516
|
78 |
+
#@ yit
|
79 |
+
msgid "Title"
|
80 |
+
msgstr ""
|
81 |
+
|
82 |
+
#: widgets/class.yith-wcan-navigation-widget.php:521
|
83 |
+
#@ yit
|
84 |
+
msgid "Attribute:"
|
85 |
+
msgstr ""
|
86 |
+
|
87 |
+
#: widgets/class.yith-wcan-navigation-widget.php:526
|
88 |
+
#@ yit
|
89 |
+
msgid "Query Type:"
|
90 |
+
msgstr ""
|
91 |
+
|
92 |
+
#: widgets/class.yith-wcan-navigation-widget.php:528
|
93 |
+
#@ yit
|
94 |
+
msgid "AND"
|
95 |
+
msgstr ""
|
96 |
+
|
97 |
+
#: widgets/class.yith-wcan-navigation-widget.php:529
|
98 |
+
#@ yit
|
99 |
+
msgid "OR"
|
100 |
+
msgstr ""
|
101 |
+
|
102 |
+
#: widgets/class.yith-wcan-navigation-widget.php:532
|
103 |
+
#@ yit
|
104 |
+
msgid "Type:"
|
105 |
+
msgstr ""
|
106 |
+
|
107 |
+
#: widgets/class.yith-wcan-navigation-widget.php:534
|
108 |
+
#@ yit
|
109 |
+
msgid "List"
|
110 |
+
msgstr ""
|
111 |
+
|
112 |
+
#: widgets/class.yith-wcan-navigation-widget.php:536
|
113 |
+
#@ yit
|
114 |
+
msgid "Label"
|
115 |
+
msgstr ""
|
116 |
+
|
117 |
+
#: yit-common/yith-panel.php:396
|
118 |
+
#@ yit
|
119 |
+
msgid "Select a date"
|
120 |
+
msgstr ""
|
121 |
+
|
122 |
+
#: yit-common/yith-panel.php:397
|
123 |
+
#@ yit
|
124 |
+
msgid "Hours"
|
125 |
+
msgstr ""
|
126 |
+
|
127 |
+
#: yit-common/yith-panel.php:398
|
128 |
+
#: yit-common/yith-panel.php:399
|
129 |
+
#@ yit
|
130 |
+
msgid "Minutes"
|
131 |
+
msgstr ""
|
132 |
+
|
133 |
+
#: yit-common/yith-panel.php:407
|
134 |
+
#@ yit
|
135 |
+
msgid "Upload"
|
136 |
+
msgstr ""
|
137 |
+
|
138 |
+
#: yit-common/yith-panel.php:434
|
139 |
+
#@ yit
|
140 |
+
msgid "px"
|
141 |
+
msgstr ""
|
142 |
+
|
143 |
+
#: yit-common/yith-panel.php:435
|
144 |
+
#@ yit
|
145 |
+
msgid "em"
|
146 |
+
msgstr ""
|
147 |
+
|
148 |
+
#: yit-common/yith-panel.php:436
|
149 |
+
#@ yit
|
150 |
+
msgid "pt"
|
151 |
+
msgstr ""
|
152 |
+
|
153 |
+
#: yit-common/yith-panel.php:437
|
154 |
+
#@ yit
|
155 |
+
msgid "rem"
|
156 |
+
msgstr ""
|
157 |
+
|
158 |
+
#: yit-common/yith-panel.php:447
|
159 |
+
#@ yit
|
160 |
+
msgid "Select a font family"
|
161 |
+
msgstr ""
|
162 |
+
|
163 |
+
#: yit-common/yith-panel.php:455
|
164 |
+
#@ yit
|
165 |
+
msgid "Regular"
|
166 |
+
msgstr ""
|
167 |
+
|
168 |
+
#: yit-common/yith-panel.php:456
|
169 |
+
#@ yit
|
170 |
+
msgid "Bold"
|
171 |
+
msgstr ""
|
172 |
+
|
173 |
+
#: yit-common/yith-panel.php:457
|
174 |
+
#@ yit
|
175 |
+
msgid "Extra bold"
|
176 |
+
msgstr ""
|
177 |
+
|
178 |
+
#: yit-common/yith-panel.php:458
|
179 |
+
#@ yit
|
180 |
+
msgid "Italic"
|
181 |
+
msgstr ""
|
182 |
+
|
183 |
+
#: yit-common/yith-panel.php:459
|
184 |
+
#@ yit
|
185 |
+
msgid "Italic bold"
|
186 |
+
msgstr ""
|
187 |
+
|
188 |
+
#: yit-common/yith-panel.php:471
|
189 |
+
#@ yit
|
190 |
+
msgid "Click to preview"
|
191 |
+
msgstr ""
|
192 |
+
|
languages/yit-it_IT.mo
ADDED
Binary file
|
languages/yit-it_IT.po
ADDED
@@ -0,0 +1,191 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
msgid ""
|
2 |
+
msgstr ""
|
3 |
+
"Project-Id-Version: YITH WooCommerce Ajax Navigation v1.0.0\n"
|
4 |
+
"Report-Msgid-Bugs-To: \n"
|
5 |
+
"POT-Creation-Date: \n"
|
6 |
+
"PO-Revision-Date: 2013-06-17 15:07+0100\n"
|
7 |
+
"Last-Translator: Your Inspiration Themes <plugins@yithemes.com>\n"
|
8 |
+
"Language-Team: \n"
|
9 |
+
"MIME-Version: 1.0\n"
|
10 |
+
"Content-Type: text/plain; charset=UTF-8\n"
|
11 |
+
"Content-Transfer-Encoding: 8bit\n"
|
12 |
+
"Plural-Forms: nplurals=2; plural=n != 1;\n"
|
13 |
+
"X-Generator: Poedit 1.5.5\n"
|
14 |
+
"X-Poedit-SourceCharset: UTF-8\n"
|
15 |
+
"X-Poedit-KeywordsList: __;_e;__ngettext:1,2;_n:1,2;__ngettext_noop:1,2;"
|
16 |
+
"_n_noop:1,2;_c,_nc:4c,1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;_nx_noop:4c,1,2\n"
|
17 |
+
"X-Poedit-Basepath: ../\n"
|
18 |
+
"X-Textdomain-Support: yes\n"
|
19 |
+
"Language: it_IT\n"
|
20 |
+
"X-Poedit-SearchPath-0: .\n"
|
21 |
+
|
22 |
+
# @ yit
|
23 |
+
#: functions.yith-wcan.php:52 functions.yith-wcan.php:64
|
24 |
+
msgid "Term"
|
25 |
+
msgstr "Proprietà"
|
26 |
+
|
27 |
+
# @ yit
|
28 |
+
#: functions.yith-wcan.php:52
|
29 |
+
#: widgets/class.yith-wcan-navigation-widget.php:535
|
30 |
+
msgid "Color"
|
31 |
+
msgstr "Colore"
|
32 |
+
|
33 |
+
# @ yit
|
34 |
+
#: functions.yith-wcan.php:64
|
35 |
+
msgid "Labels"
|
36 |
+
msgstr "Label"
|
37 |
+
|
38 |
+
# @ yit
|
39 |
+
#. translators: plugin header field 'Name'
|
40 |
+
#: init.php:0 widgets/class.yith-wcan-navigation-widget.php:23
|
41 |
+
msgid "YITH WooCommerce Ajax Navigation"
|
42 |
+
msgstr "YITH WooCommerce Ajax Navigation"
|
43 |
+
|
44 |
+
# @ yit
|
45 |
+
#. translators: plugin header field 'PluginURI'
|
46 |
+
#. translators: plugin header field 'AuthorURI'
|
47 |
+
#: init.php:0
|
48 |
+
msgid "http://yithemes.com/"
|
49 |
+
msgstr "http://yithemes.com/"
|
50 |
+
|
51 |
+
# @ yit
|
52 |
+
#. translators: plugin header field 'Description'
|
53 |
+
#: init.php:0
|
54 |
+
msgid ""
|
55 |
+
"YITH WooCommerce Ajax Navigation allows user to filter products in Shop page "
|
56 |
+
"without reloading the page."
|
57 |
+
msgstr ""
|
58 |
+
"YITH WooCommerce Ajax Navigation consente all'utente di filtrare i prodotti "
|
59 |
+
"contenuti nella pagina Shop senza ricaricare la pagina."
|
60 |
+
|
61 |
+
# @ yit
|
62 |
+
#. translators: plugin header field 'Author'
|
63 |
+
#: init.php:0
|
64 |
+
msgid "Your Inspiration Themes"
|
65 |
+
msgstr "Your Inspiration Themes"
|
66 |
+
|
67 |
+
# @ yit
|
68 |
+
#. translators: plugin header field 'Version'
|
69 |
+
#: init.php:0
|
70 |
+
msgid "1.0.0"
|
71 |
+
msgstr "1.0.0"
|
72 |
+
|
73 |
+
# @ yit
|
74 |
+
#: widgets/class.yith-wcan-navigation-widget.php:21
|
75 |
+
msgid "Narrow down the products list without reloading the page"
|
76 |
+
msgstr "Filtra la lista dei prodotti senza ricaricare la pagina"
|
77 |
+
|
78 |
+
# @ yit
|
79 |
+
#: widgets/class.yith-wcan-navigation-widget.php:516
|
80 |
+
msgid "Title"
|
81 |
+
msgstr "Titolo"
|
82 |
+
|
83 |
+
# @ yit
|
84 |
+
#: widgets/class.yith-wcan-navigation-widget.php:521
|
85 |
+
msgid "Attribute:"
|
86 |
+
msgstr "Attributo:"
|
87 |
+
|
88 |
+
# @ yit
|
89 |
+
#: widgets/class.yith-wcan-navigation-widget.php:526
|
90 |
+
msgid "Query Type:"
|
91 |
+
msgstr "Tipo Query:"
|
92 |
+
|
93 |
+
# @ yit
|
94 |
+
#: widgets/class.yith-wcan-navigation-widget.php:528
|
95 |
+
msgid "AND"
|
96 |
+
msgstr "AND"
|
97 |
+
|
98 |
+
# @ yit
|
99 |
+
#: widgets/class.yith-wcan-navigation-widget.php:529
|
100 |
+
msgid "OR"
|
101 |
+
msgstr "OR"
|
102 |
+
|
103 |
+
# @ yit
|
104 |
+
#: widgets/class.yith-wcan-navigation-widget.php:532
|
105 |
+
msgid "Type:"
|
106 |
+
msgstr "Tipo:"
|
107 |
+
|
108 |
+
# @ yit
|
109 |
+
#: widgets/class.yith-wcan-navigation-widget.php:534
|
110 |
+
msgid "List"
|
111 |
+
msgstr "Lista"
|
112 |
+
|
113 |
+
# @ yit
|
114 |
+
#: widgets/class.yith-wcan-navigation-widget.php:536
|
115 |
+
msgid "Label"
|
116 |
+
msgstr "Label"
|
117 |
+
|
118 |
+
# @ yit
|
119 |
+
#: yit-common/yith-panel.php:396
|
120 |
+
msgid "Select a date"
|
121 |
+
msgstr "Seleziona una data"
|
122 |
+
|
123 |
+
# @ yit
|
124 |
+
#: yit-common/yith-panel.php:397
|
125 |
+
msgid "Hours"
|
126 |
+
msgstr "Ore"
|
127 |
+
|
128 |
+
# @ yit
|
129 |
+
#: yit-common/yith-panel.php:398 yit-common/yith-panel.php:399
|
130 |
+
msgid "Minutes"
|
131 |
+
msgstr "Minuti"
|
132 |
+
|
133 |
+
# @ yit
|
134 |
+
#: yit-common/yith-panel.php:407
|
135 |
+
msgid "Upload"
|
136 |
+
msgstr "Upload"
|
137 |
+
|
138 |
+
# @ yit
|
139 |
+
#: yit-common/yith-panel.php:434
|
140 |
+
msgid "px"
|
141 |
+
msgstr "px"
|
142 |
+
|
143 |
+
# @ yit
|
144 |
+
#: yit-common/yith-panel.php:435
|
145 |
+
msgid "em"
|
146 |
+
msgstr "em"
|
147 |
+
|
148 |
+
# @ yit
|
149 |
+
#: yit-common/yith-panel.php:436
|
150 |
+
msgid "pt"
|
151 |
+
msgstr "pt"
|
152 |
+
|
153 |
+
# @ yit
|
154 |
+
#: yit-common/yith-panel.php:437
|
155 |
+
msgid "rem"
|
156 |
+
msgstr "rem"
|
157 |
+
|
158 |
+
# @ yit
|
159 |
+
#: yit-common/yith-panel.php:447
|
160 |
+
msgid "Select a font family"
|
161 |
+
msgstr "Seleziona un font"
|
162 |
+
|
163 |
+
# @ yit
|
164 |
+
#: yit-common/yith-panel.php:455
|
165 |
+
msgid "Regular"
|
166 |
+
msgstr "Regular"
|
167 |
+
|
168 |
+
# @ yit
|
169 |
+
#: yit-common/yith-panel.php:456
|
170 |
+
msgid "Bold"
|
171 |
+
msgstr "Bold"
|
172 |
+
|
173 |
+
# @ yit
|
174 |
+
#: yit-common/yith-panel.php:457
|
175 |
+
msgid "Extra bold"
|
176 |
+
msgstr "Extra bold"
|
177 |
+
|
178 |
+
# @ yit
|
179 |
+
#: yit-common/yith-panel.php:458
|
180 |
+
msgid "Italic"
|
181 |
+
msgstr "Italic"
|
182 |
+
|
183 |
+
# @ yit
|
184 |
+
#: yit-common/yith-panel.php:459
|
185 |
+
msgid "Italic bold"
|
186 |
+
msgstr "Italic bold"
|
187 |
+
|
188 |
+
# @ yit
|
189 |
+
#: yit-common/yith-panel.php:471
|
190 |
+
msgid "Click to preview"
|
191 |
+
msgstr "Clicca per anteprima"
|
languages/yit.pot
ADDED
@@ -0,0 +1,187 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|