Version Description
Released on 14 September 2020 =
New: Support for WooCommerce 4.5
New: Support for WordPress 5.5
New: Support for YITH WooCommerce Wishlist
Update: Plugin framework
Fix: Dropdown filter disappear if a filter match with a single product
Dev: yith_wcan_filter_label_text hook to filter label text
Download this release
Release Info
Developer | yithemes |
Plugin | YITH WooCommerce Ajax Product Filter |
Version | 3.11.2 |
Comparing to | |
See all releases |
Code changes from version 3.11.1 to 3.11.2
- README.txt +11 -2
- assets/js/yith-wcan-frontend.js +1 -0
- assets/js/yith-wcan-frontend.min.js +1 -1
- includes/functions.yith-wcan.php +23 -23
- init.php +4 -4
- plugin-fw/assets/css/yit-plugin-panel.css +148 -15
- plugin-fw/assets/css/yith-fields.css +101 -19
- plugin-fw/assets/js/yit-plugin-panel.js +23 -0
- plugin-fw/assets/js/yit-plugin-panel.min.js +1 -1
- plugin-fw/assets/js/yith-fields.js +16 -12
- plugin-fw/assets/js/yith-fields.min.js +1 -1
- plugin-fw/assets/js/yith-gutenberg.js +1 -0
- plugin-fw/assets/js/yith-gutenberg.min.js +1 -1
- plugin-fw/init.php +2 -2
- plugin-fw/languages/yith-plugin-fw-el.mo +0 -0
- plugin-fw/languages/yith-plugin-fw-el.po +71 -52
- plugin-fw/languages/yith-plugin-fw-es_ES.po +47 -23
- plugin-fw/languages/yith-plugin-fw-it_IT.mo +0 -0
- plugin-fw/languages/yith-plugin-fw-it_IT.po +72 -59
- plugin-fw/languages/yith-plugin-fw-nl_NL.po +47 -23
- plugin-fw/languages/yith-plugin-fw.pot +44 -20
- plugin-fw/lib/privacy/yit-privacy.php +2 -2
- plugin-fw/lib/yit-assets.php +105 -91
- plugin-fw/lib/yit-plugin-panel-wc.php +40 -13
- plugin-fw/lib/yit-plugin-panel.php +1174 -1155
- plugin-fw/package.json +1 -1
- plugin-fw/templates/fields/inline-fields.php +60 -0
- plugin-fw/templates/fields/radio.php +1 -1
- plugin-fw/templates/fields/textarea-editor.php +3 -1
- plugin-fw/templates/fields/toggle-element.php +6 -1
- plugin-fw/templates/metaboxes/tab.php +5 -5
- plugin-fw/templates/panel/woocommerce/woocommerce-form.php +4 -2
- plugin-fw/yit-functions.php +25 -12
- widgets/class.yith-wcan-navigation-widget.php +4 -3
- widgets/class.yith-wcan-reset-navigation-widget.php +6 -1
README.txt
CHANGED
@@ -3,8 +3,8 @@
|
|
3 |
Contributors: yithemes
|
4 |
Tags: woocommerce ajax product filter download, woocommerce, widget, ajax, ajax filtered nav, ajax navigation, ajax filtered navigation, woocommerce layered navigation, woocommerce layered nav, product filter, product filters, ajax product filter, woocommerce ajax product filter, woocommerce filters, sidebar filter, sidebar ajax filter, ajax price filter, price filter, product sorting, woocommerce filter, taxonomy filter, attribute filter, attributes filter, woocommerce product sort, ajax sort, woocommerce ajax product filter, advanced product filters, ajax product filters, filters, woocommerce ajax product filters, woocommerce product filters, woocommerce product filters, category filter, attribute filters, woocommerce products filter, woocommerce price filter, yit, yith, yithemes
|
5 |
Requires at least: 4.0
|
6 |
-
Tested up to: 5.
|
7 |
-
Stable tag: 3.11.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -159,6 +159,15 @@ If you want to see a demonstration version of the premium plugin, you can see it
|
|
159 |
|
160 |
== Changelog ==
|
161 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
162 |
= 3.11.1 - Released on 22 June 2020 =
|
163 |
|
164 |
* New: Support for WooCommerce 4.3
|
3 |
Contributors: yithemes
|
4 |
Tags: woocommerce ajax product filter download, woocommerce, widget, ajax, ajax filtered nav, ajax navigation, ajax filtered navigation, woocommerce layered navigation, woocommerce layered nav, product filter, product filters, ajax product filter, woocommerce ajax product filter, woocommerce filters, sidebar filter, sidebar ajax filter, ajax price filter, price filter, product sorting, woocommerce filter, taxonomy filter, attribute filter, attributes filter, woocommerce product sort, ajax sort, woocommerce ajax product filter, advanced product filters, ajax product filters, filters, woocommerce ajax product filters, woocommerce product filters, woocommerce product filters, category filter, attribute filters, woocommerce products filter, woocommerce price filter, yit, yith, yithemes
|
5 |
Requires at least: 4.0
|
6 |
+
Tested up to: 5.5
|
7 |
+
Stable tag: 3.11.2
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
159 |
|
160 |
== Changelog ==
|
161 |
|
162 |
+
= 3.11.2 - Released on 14 September 2020 =
|
163 |
+
|
164 |
+
* New: Support for WooCommerce 4.5
|
165 |
+
* New: Support for WordPress 5.5
|
166 |
+
* New: Support for YITH WooCommerce Wishlist
|
167 |
+
* Update: Plugin framework
|
168 |
+
* Fix: Dropdown filter disappear if a filter match with a single product
|
169 |
+
* Dev: yith_wcan_filter_label_text hook to filter label text
|
170 |
+
|
171 |
= 3.11.1 - Released on 22 June 2020 =
|
172 |
|
173 |
* New: Support for WooCommerce 4.3
|
assets/js/yith-wcan-frontend.js
CHANGED
@@ -276,6 +276,7 @@ jQuery(function ($) {
|
|
276 |
//trigger ready event
|
277 |
$(document).trigger("ready");
|
278 |
$(document).trigger("yith-wcan-ajax-filtered", [response]);
|
|
|
279 |
$(window).trigger("scroll");
|
280 |
if( is_reset ){
|
281 |
if( typeof $.fn.slider != 'undefined' ){
|
276 |
//trigger ready event
|
277 |
$(document).trigger("ready");
|
278 |
$(document).trigger("yith-wcan-ajax-filtered", [response]);
|
279 |
+
$(document).trigger("yith_wcwl_reload_fragments");
|
280 |
$(window).trigger("scroll");
|
281 |
if( is_reset ){
|
282 |
if( typeof $.fn.slider != 'undefined' ){
|
assets/js/yith-wcan-frontend.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
jQuery(function(
|
1 |
+
jQuery(function(w){var y=/(?!(\[))(\.)[^.#[]*/g,u=/(#)[^.#[]*/,v=/^[\w]+/,g=/^[\w]+$/,l=function(t,a){var e=g.test(t)?[{tag:t}]:function(t){for(var a={sel:[],val:[]},e=[],i=!1,n="",c=[],s=0,r=t.length;s<r;s++){var o=t.charAt(s);i?"\\"===o&&s+1<t.length?c.push(t.charAt(++s)):n===o?(n="",c.push(o)):"'"!==o&&'"'!==o||""!==n?"]"===o&&""===n?(a.val.push(c.join("")),i=!(c=[])):"]"===o&&""===n||(""===n&&","===o?(a.val.push(c.join("")),c=[]):c.push(o)):(n=o,c.push(o)):"\\"===o&&s+1<t.length?i&&c.push(t.charAt(++s)):"["===o&&""===n?i=!0:" "===o||"+"===o?(a.sel=a.sel.join(""),e.push(a),"+"===o&&e.push({sel:"+",val:""}),a={sel:[],val:[]}):" "!==o&&"]"!==o&&a.sel.push(o)}for(0==a.sel.length&&0==a.val.length||(a.sel=a.sel.join(""),e.push(a)),s=0;s<e.length;s++){if("+"===(a=e[s].sel))l.tag=a;else{var l=[];for(l.tag=v.exec(a),l.id=u.exec(a),l.id&&w.isArray(l.id)&&(l.id=l.id[0].substr(1)),l.tag||(l.tag="div"),l.vars=[],t=0;t<e[s].val.length;t++)n=e[s].val[t].indexOf("="),i=e[s].val[t].substr(0,n),n=(n=e[s].val[t].substr(n+1)).replace(/^[\s]*[\"\']*|[\"\']*[\s]*$/g,""),"text"===i?l.text=n:l.vars.push([i,n]);if(i=[],a=a.match(y)){for(t=0;t<a.length;t++)i.push(a[t].substr(1));l.className=i.join(" ")}}e[s]=l}return e}(t),i=[];void 0===a&&(a=1);for(var n=[],c=[],s=[],r=document.createElement("div"),o=0,l=0;l<e.length;l++){if("+"==e[l].tag)c=s.slice(),--o;else{for(var d=0;d<a;d++)if("input"==e[l].tag){var h=[];if(h.push("<"+e[l].tag),e[l].id&&h.push("id='"+e[l].id+"'"),e[l].className&&(h.push("class='"+e[l].className),l+1===e.length&&h.push(lastClass),h.push("'")),e[l].vars)for(var p=0;p<e[l].vars.length;p++)h.push(e[l].vars[p][0]+"='"+e[l].vars[p][1]+"'");e[l].text&&h.push("value='"+e[l].text+"'"),h.push("/>"),s[d]=c[d],c[d]?(c[d].innerHTML+=h.join(" "),c[d]=c[d].lastChild):(r.innerHTML=h.join(" "),c[d]=r.removeChild(r.firstChild))}else{if(h=document.createElement(e[l].tag),e[l].vars)for(p=0;p<e[l].vars.length;p++)console.log(e[l].tag,e[l].vars[p]),h.setAttribute(e[l].vars[p][0],e[l].vars[p][1]);e[l].id&&(h.id=e[l].id),e[l].className&&(h.className=e[l].className),e[l].text&&h.appendChild(document.createTextNode(e[l].text)),s[d]=c[d],c[d]=c[d]?c[d].appendChild(h):h}o++||Array.prototype.push.apply(n,c)}i=w.merge(i,c)}return w(n)},a=function(t,a,e){for(var i=t.match(/%[^%]*%/g)||[],n=[],c=0;c<a.length;c++){for(var s=t,r=0;r<i.length;r++)var o=i[r].substr(1,i[r].length-2),s=s.replace(i[r],a[c][o]);n=w.merge(n,l(s,e))}return w(n)},h=!(w.jseldom=function(t){return 2==arguments.length&&w.isPlainObject(arguments[1])?a.apply(this,[t,[arguments[1]]]):1==arguments.length||2==arguments.length&&!w.isArray(arguments[1])?l.apply(this,arguments):2==arguments.length?a.apply(this,arguments):void 0}),p=function(){var t=w("#yith-wcan-reset-all-categories").find("a.yith-wcan-reset-categories-link"),a=w("#yith-wcan-reset-all-tags").find("a.yith-wcan-reset-tags-link");t.add(a).on("click",function(t){w(this).yith_wcan_ajax_filters(t,this)})};w.fn.yith_wcan_ajax_filters=function(t,a){t.preventDefault();var e,i,n,c,s,r=a.href,o=w(a),l=o.hasClass("yith-wcan-reset-navigation");void 0===r&&o.parents().hasClass("price_slider_wrapper")&&(o.parents("form"),n=(i=(e=window.location).origin+e.pathname)!=e.href,e.search,c=w(".price_slider_amount #min_price").val(),s=w(".price_slider_amount #max_price").val(),new RegExp("^min_price","i"),new RegExp("^max_price","i"),r=e.href,1==n&&(r=f(r,"min_price"),r=f(r,"max_price")),r=r+(i==r?"?":"&")+w.param({min_price:c,max_price:s})),"select"==o.data("type")&&(o.parents("div.yith-woo-ajax-navigation").find("a.yit-wcan-select-open").removeClass("active"),o.parent().find("div.yith-wcan-select-wrapper").css("z-index","-1").animate({visibility:"hidden",opacity:0},300)),w(yith_wcan.container).not(".ywcps-products").html("").addClass("yith-wcan-loading"),w(document).trigger("yith-wcan-ajax-loading"),"undefined"!=typeof yith_wcan_frontend&&w(yith_wcan.container).not(".ywcps-products").css("backgroundImage","url("+yith_wcan_frontend.loader_url+")");var d=!1;("both"==yith_wcan.scroll_top_mode||"mobile"==yith_wcan.scroll_top_mode&&1==yith_wcan.is_mobile||"desktop"==yith_wcan.scroll_top_mode&&1!=yith_wcan.is_mobile)&&(d=!0),1==d&&w(window).scrollTop(w(yith_wcan.scroll_top).offset().top),w(yith_wcan.pagination).hide(),w(yith_wcan.result_count).hide(),0!=h&&(h.abort(),h=!1),h=w.ajax({url:r,success:function(i){h=!1,w(yith_wcan.container).not(".ywcps-products").removeClass("yith-wcan-loading"),0<w(i).find(yith_wcan.container).not(".ywcps-products").length?w(".yit-wcan-container").html(w(i).find(yith_wcan.container).not(".ywcps-products")):w(".yit-wcan-container").html(w(i).find(".woocommerce-info")),0<w(i).find(yith_wcan.pagination).length?(0==w(yith_wcan.pagination).length&&w.jseldom(yith_wcan.pagination).insertAfter(w(yith_wcan.container).not(".ywcps-products")),w(yith_wcan.pagination).html(w(i).find(yith_wcan.pagination).html()).show()):w(yith_wcan.pagination).empty(),w("div.quantity:not(.buttons_added), td.quantity:not(.buttons_added)").addClass("buttons_added").append('<input type="button" value="+" class="plus" />').prepend('<input type="button" value="-" class="minus" />'),0<w(i).find(yith_wcan.result_count).length&&w(yith_wcan.result_count).html(w(i).find(yith_wcan.result_count).html()).show();var t,a,e,n=function(t){var a=t.attr("id"),e=w(i).find("#"+a);0==e.length?t.hide():(t.html(e.html()),t.show())};w(".yith-woo-ajax-navigation").add(".yith-wcan-sort-by").add(".yith-wcan-stock-on-sale").add(".yith-wcan-list-price-filter").each(function(){var t=w(this);n(t)}),1==yith_wcan.yootheme.is_enabled&&w(".widget-yith-woo-ajax-navigation").add(".widget-yith-woo-ajax-navigation-sort-by").add(".widget-yith-woo-ajax-reset-navigation").add(".widget-yith-wcan-stock-on-sale").add(".widget-yith-wcan-list-price-filter").each(function(){var t=w(this);n(t)}),1==yith_wcan.avada.is_enabled&&((t=w(yith_wcan.avada.sort_count)).html(w(i).find(yith_wcan.avada.sort_count).html()),""==o.text()?t.hide():t.show()),1!=yith_wcan.change_browser_url||navigator.userAgent.match(/msie/i)||window.history.pushState({pageTitle:i.pageTitle},"",r),w(document).trigger("ready"),w(document).trigger("yith-wcan-ajax-filtered",[i]),w(document).trigger("yith_wcwl_reload_fragments"),w(window).trigger("scroll"),l&&("undefined"!=typeof w.fn.slider&&(a=parseInt(w(yith_wcan.wc_price_slider.min_price).data("min")),e=parseInt(w(yith_wcan.wc_price_slider.max_price).data("max")),w(yith_wcan.wc_price_slider.wrapper).slider("values",[a,e]),w(document.body).trigger("price_slider_slide",[a,e])),w(document).trigger("yith-wcan-ajax-reset-filtered")),p()}})},w(yith_wcan.container).not(".ywcps-products").wrap('<div class="yit-wcan-container"></div>'),w(document).on("yith-wcan-wrapped",function(){p()}),w(document).trigger("yith-wcan-wrapped"),w(document).on("click",".yith-wcan a",function(t){w(this).yith_wcan_ajax_filters(t,this)});var e=function(){w("div.yith-wcan-select-wrapper").css("z-index","-1").animate({visibility:"hidden",opacity:0},0,function(){w(this).css("display","none")}),w("a.yit-wcan-select-open").removeClass("active")};function f(t,a){return t.replace(new RegExp("[?&]"+a+"=[^&#]*(#.*)?$"),"$1").replace(new RegExp("([?&])"+a+"=[^&]*&"),"$1")}w(document).on("click","a.yit-wcan-select-open.active",function(t){var a;t.preventDefault(),w(a=this).parent().find("div.yith-wcan-select-wrapper").css("z-index","-1").animate({visibility:"hidden",opacity:0},300,function(){w(this).css("display","none")}),w(a).parent().find("a.yit-wcan-select-open").removeClass("active")}),w(document).on("click","a.yit-wcan-select-open:not(.active)",function(t){var a;t.preventDefault(),w("a.yit-wcan-select-open.active").trigger("click"),w(a=this).parent().find("div.yith-wcan-select-wrapper").css("z-index","1").animate({visibility:"visible",opacity:1},{duration:300,start:function(){w(this).css("display","block")}}),w(a).parent().find("a.yit-wcan-select-open").addClass("active")}),w(document).on("ready yith-wcan-ajax-filtered",function(){w("div.yith-wcan-select-wrapper ul.yith-wcan-select li.chosen").length;e(),w("div.yith-wcan-select-wrapper").each(function(){var t="";w(this).find("ul.yith-wcan-select li.chosen").each(function(){t+=w(this).text()+", "});""!=(t=t.substring(0,t.length-2))&&w(this).parent().find("a.yit-wcan-select-open").text(t)})}),w(document).on("ready",e),w("body").on("click",function(t){w(t.target).hasClass("yit-wcan-select-open")||e()}),1==yith_wcan.flatsome.is_enabled&&1==yith_wcan.flatsome.lazy_load_enabled&&w(document).on("yith-wcan-ajax-filtered",function(t,a){var e=w(document);jQuery(".lazy-load",e).each(function(t,a){var i=jQuery(a);i.waypoint(function(t){var a,e;i.hasClass("lazy-load-active")||(a=i.data("src"),e=i.data("srcset"),a&&i.attr("src",a),e&&i.attr("srcset",e),i.imagesLoaded(function(){i.addClass("lazy-load-active").removeClass("lazy-load")}))},{offset:"140%"})})}),window.addEventListener("popstate",function(t){window.location.reload(!0)})});
|
includes/functions.yith-wcan.php
CHANGED
@@ -77,8 +77,11 @@ function yith_wcan_dropdown_attributes( $selected, $echo = true ) {
|
|
77 |
function yith_wcan_attributes_table( $type, $attribute, $id, $name, $values = array(), $echo = true ) {
|
78 |
$return = '';
|
79 |
|
80 |
-
|
|
|
|
|
81 |
|
|
|
82 |
if ( 'list' == $type ) {
|
83 |
$return = '<input type="hidden" name="' . $name . '[colors]" value="" /><input type="hidden" name="' . $name . '[labels]" value="" />';
|
84 |
}
|
@@ -126,7 +129,9 @@ function yith_wcan_attributes_table( $type, $attribute, $id, $name, $values = ar
|
|
126 |
$return = sprintf( '<table><tr><th>%s</th><th>%s</th></tr>', __( 'Term', 'yith-woocommerce-ajax-navigation' ), __( 'Labels', 'yith-woocommerce-ajax-navigation' ) );
|
127 |
|
128 |
foreach ( $terms as $term ) {
|
129 |
-
|
|
|
|
|
130 |
}
|
131 |
|
132 |
$return .= '</table>';
|
@@ -447,7 +452,7 @@ if ( ! function_exists( 'yit_get_filter_args' ) ) {
|
|
447 |
extract( $args );
|
448 |
|
449 |
$filter_value = array();
|
450 |
-
$regexs = array( '/^filter_[a-zA-Z0-9]/', '/^query_type_[a-zA-Z0-9]/', '/product_tag/', '/product_cat/', '/source_id/', '/source_tax/' );
|
451 |
|
452 |
/* Support to YITH WooCommerce Brands */
|
453 |
if ( yith_wcan_brands_enabled() ) {
|
@@ -558,28 +563,23 @@ if ( ! function_exists( 'yit_get_woocommerce_layered_nav_link' ) ) {
|
|
558 |
* @since 1.4
|
559 |
* @author Andrea Grillo <andrea.grillo@yithemes.com>
|
560 |
*/
|
561 |
-
|
562 |
-
|
563 |
-
|
564 |
-
|
565 |
-
|
566 |
-
|
567 |
-
|
568 |
-
|
569 |
-
|
570 |
-
|
571 |
-
|
572 |
-
|
573 |
-
return apply_filters( 'yith_wcan_untrailingslashit', false ) && is_string( $return ) ? untrailingslashit( $return ) : $return;
|
574 |
-
}
|
575 |
|
576 |
-
|
577 |
-
$return = get_post_type_archive_link( 'product' );
|
578 |
-
return apply_filters( 'yith_wcan_untrailingslashit', false ) && is_string( $return ) ? untrailingslashit( $return ) : $return;
|
579 |
-
}
|
580 |
|
581 |
-
|
582 |
-
|
583 |
}
|
584 |
|
585 |
if ( ! function_exists( 'yit_wcan_localize_terms' ) ) {
|
77 |
function yith_wcan_attributes_table( $type, $attribute, $id, $name, $values = array(), $echo = true ) {
|
78 |
$return = '';
|
79 |
|
80 |
+
if( empty( $attribute ) ){
|
81 |
+
return $return;
|
82 |
+
}
|
83 |
|
84 |
+
$terms = get_terms( array( 'taxonomy' => 'pa_' . $attribute, 'hide_empty' => '0' ) );
|
85 |
if ( 'list' == $type ) {
|
86 |
$return = '<input type="hidden" name="' . $name . '[colors]" value="" /><input type="hidden" name="' . $name . '[labels]" value="" />';
|
87 |
}
|
129 |
$return = sprintf( '<table><tr><th>%s</th><th>%s</th></tr>', __( 'Term', 'yith-woocommerce-ajax-navigation' ), __( 'Labels', 'yith-woocommerce-ajax-navigation' ) );
|
130 |
|
131 |
foreach ( $terms as $term ) {
|
132 |
+
if( $term instanceof WP_Term){
|
133 |
+
$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' /></td></tr>";
|
134 |
+
}
|
135 |
}
|
136 |
|
137 |
$return .= '</table>';
|
452 |
extract( $args );
|
453 |
|
454 |
$filter_value = array();
|
455 |
+
$regexs = array( '/^filter_[a-zA-Z0-9]/', '/^query_type_[a-zA-Z0-9]/', '/product_tag/', '/product_cat/', '/source_id/', '/source_tax/', '/s/' );
|
456 |
|
457 |
/* Support to YITH WooCommerce Brands */
|
458 |
if ( yith_wcan_brands_enabled() ) {
|
563 |
* @since 1.4
|
564 |
* @author Andrea Grillo <andrea.grillo@yithemes.com>
|
565 |
*/
|
566 |
+
function yit_get_woocommerce_layered_nav_link() {
|
567 |
+
$return = false;
|
568 |
+
$term = $source_id = ! empty( $_GET['source_id'] ) ? $_GET['source_id'] : '';
|
569 |
+
$taxonomy = $source_tax = ! empty( $_GET['source_tax'] ) ? $_GET['source_tax'] : '';
|
570 |
+
|
571 |
+
if ( defined( 'SHOP_IS_ON_FRONT' ) || ( is_shop() && ! is_product_category() ) ) {
|
572 |
+
$return = get_post_type_archive_link( 'product' );
|
573 |
+
} elseif ( ! is_shop() && is_product_category( $source_id ) && false ) {
|
574 |
+
$return = get_term_link( get_queried_object()->slug, 'product_cat' );
|
575 |
+
} else {
|
576 |
+
$return = get_post_type_archive_link( 'product' );
|
577 |
+
}
|
|
|
|
|
578 |
|
579 |
+
$return = apply_filters( 'yith_wcan_untrailingslashit', false ) && is_string( $return ) ? untrailingslashit( $return ) : $return;
|
|
|
|
|
|
|
580 |
|
581 |
+
return apply_filters( 'yith_wcan_get_woocommerce_layered_nav_link', $return );
|
582 |
+
}
|
583 |
}
|
584 |
|
585 |
if ( ! function_exists( 'yit_wcan_localize_terms' ) ) {
|
init.php
CHANGED
@@ -3,14 +3,14 @@
|
|
3 |
* Plugin Name: YITH WooCommerce Ajax Product Filter
|
4 |
* Plugin URI: https://wordpress.org/plugins/yith-woocommerce-ajax-navigation/
|
5 |
* Description:<code><strong>YITH WooCommerce AJAX Product Filter</strong></code> allows your users to find the product they are looking for as quickly as possible. Thanks to the plugin you will be able to set up one or more search filters for your WooCommerce products, improve the user experience and give the impression of being in a big and reliable store. <a href="https://yithemes.com/" target="_blank">Get more plugins for your e-commerce shop on <strong>YITH</strong></a>
|
6 |
-
* Version: 3.11.
|
7 |
* Author: YITH
|
8 |
* Author URI: https://yithemes.com/
|
9 |
* Text Domain: yith-woocommerce-ajax-navigation
|
10 |
* Domain Path: /languages/
|
11 |
*
|
12 |
-
* WC requires at least:
|
13 |
-
* WC tested up to: 4.
|
14 |
*
|
15 |
* @author Your Inspiration Themes
|
16 |
* @package YITH WooCommerce Ajax Navigation
|
@@ -67,7 +67,7 @@ load_plugin_textdomain( 'yith-woocommerce-ajax-navigation', false, dirname( plug
|
|
67 |
! defined( 'YITH_WCAN' ) && define( 'YITH_WCAN', true );
|
68 |
! defined( 'YITH_WCAN_URL' ) && define( 'YITH_WCAN_URL', plugin_dir_url( __FILE__ ) );
|
69 |
! defined( 'YITH_WCAN_DIR' ) && define( 'YITH_WCAN_DIR', plugin_dir_path( __FILE__ ) );
|
70 |
-
! defined( 'YITH_WCAN_VERSION' ) && define( 'YITH_WCAN_VERSION', '3.11.
|
71 |
! defined( 'YITH_WCAN_FREE_INIT') && define( 'YITH_WCAN_FREE_INIT', plugin_basename( __FILE__ ) );
|
72 |
! defined( 'YITH_WCAN_FILE' ) && define( 'YITH_WCAN_FILE', __FILE__ );
|
73 |
|
3 |
* Plugin Name: YITH WooCommerce Ajax Product Filter
|
4 |
* Plugin URI: https://wordpress.org/plugins/yith-woocommerce-ajax-navigation/
|
5 |
* Description:<code><strong>YITH WooCommerce AJAX Product Filter</strong></code> allows your users to find the product they are looking for as quickly as possible. Thanks to the plugin you will be able to set up one or more search filters for your WooCommerce products, improve the user experience and give the impression of being in a big and reliable store. <a href="https://yithemes.com/" target="_blank">Get more plugins for your e-commerce shop on <strong>YITH</strong></a>
|
6 |
+
* Version: 3.11.2
|
7 |
* Author: YITH
|
8 |
* Author URI: https://yithemes.com/
|
9 |
* Text Domain: yith-woocommerce-ajax-navigation
|
10 |
* Domain Path: /languages/
|
11 |
*
|
12 |
+
* WC requires at least: 4.0
|
13 |
+
* WC tested up to: 4.5
|
14 |
*
|
15 |
* @author Your Inspiration Themes
|
16 |
* @package YITH WooCommerce Ajax Navigation
|
67 |
! defined( 'YITH_WCAN' ) && define( 'YITH_WCAN', true );
|
68 |
! defined( 'YITH_WCAN_URL' ) && define( 'YITH_WCAN_URL', plugin_dir_url( __FILE__ ) );
|
69 |
! defined( 'YITH_WCAN_DIR' ) && define( 'YITH_WCAN_DIR', plugin_dir_path( __FILE__ ) );
|
70 |
+
! defined( 'YITH_WCAN_VERSION' ) && define( 'YITH_WCAN_VERSION', '3.11.2' );
|
71 |
! defined( 'YITH_WCAN_FREE_INIT') && define( 'YITH_WCAN_FREE_INIT', plugin_basename( __FILE__ ) );
|
72 |
! defined( 'YITH_WCAN_FILE' ) && define( 'YITH_WCAN_FILE', __FILE__ );
|
73 |
|
plugin-fw/assets/css/yit-plugin-panel.css
CHANGED
@@ -46,6 +46,11 @@
|
|
46 |
margin-right : 15px;
|
47 |
}
|
48 |
|
|
|
|
|
|
|
|
|
|
|
49 |
.yith-plugin-ui .yith-plugin-fw-panel-custom-tab-container{
|
50 |
border: 1px solid #ddd;
|
51 |
border-top : 0;
|
@@ -83,11 +88,14 @@
|
|
83 |
.yith-plugin-fw-wp-page-wrapper .wrap {
|
84 |
border : 1px solid #d8d8d8;
|
85 |
border-top : 0;
|
86 |
-
margin
|
87 |
background : #fff;
|
88 |
padding : 20px;
|
89 |
box-sizing : border-box;
|
90 |
}
|
|
|
|
|
|
|
91 |
|
92 |
#wpwrap .yith-plugin-fw-wp-page-wrapper .yith-plugin-ui h2.nav-tab-wrapper, #wpbody-content .yith-plugin-fw-wp-page-wrapper .yith-plugin-ui h2.nav-tab-wrapper {
|
93 |
padding-bottom : 0;
|
@@ -99,7 +107,7 @@
|
|
99 |
|
100 |
.yith-plugin-fw-wp-page-wrapper h1.nav-tab-wrapper, .yith-plugin-fw-wp-page-wrapper h2.nav-tab-wrapper, .yith-plugin-fw-wp-page-wrapper .nav-tab-wrapper {
|
101 |
padding-top : 9px;
|
102 |
-
padding-bottom
|
103 |
}
|
104 |
|
105 |
.yith-plugin-fw-wp-page-wrapper .wrap h1.wp-heading-inline {
|
@@ -518,8 +526,15 @@
|
|
518 |
margin-right : 15px;
|
519 |
}
|
520 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
521 |
.yit-admin-panel-content-wrap {
|
522 |
-
width
|
523 |
display : block;
|
524 |
}
|
525 |
|
@@ -554,30 +569,38 @@
|
|
554 |
*/
|
555 |
.yith-plugin-ui .yith-plugin-fw-sub-tabs-nav {
|
556 |
background : #fff;
|
557 |
-
padding
|
558 |
box-sizing : border-box;
|
559 |
-
margin-right
|
560 |
border-left : 1px solid #d8d8d8;
|
561 |
border-right : 1px solid #d8d8d8;
|
|
|
|
|
|
|
|
|
562 |
}
|
563 |
-
|
564 |
.yith-plugin-ui .yith-plugin-fw-sub-tabs-nav h3.nav-tab-wrapper {
|
565 |
text-transform : uppercase;
|
566 |
line-height : inherit;
|
567 |
font-weight : 600;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
568 |
}
|
569 |
|
570 |
.yith-plugin-ui .yith-plugin-fw-sub-tabs-nav .nav-tab {
|
571 |
line-height : 1.71428571;
|
572 |
margin-left : 0;
|
573 |
margin-right : 0;
|
574 |
-
background-color
|
575 |
color : #336374;
|
576 |
font-size : 13px;
|
577 |
-
padding
|
578 |
border : 0;
|
579 |
-
border-left : 1px solid #d8d8d8;
|
580 |
-
border-top : 1px solid #d8d8d8;
|
581 |
}
|
582 |
|
583 |
.yith-plugin-ui .yith-plugin-fw-sub-tabs-nav .nav-tab .yith-nav-sub-tab__title,
|
@@ -595,10 +618,6 @@
|
|
595 |
color : inherit;
|
596 |
}
|
597 |
|
598 |
-
.yith-plugin-ui .yith-plugin-fw-sub-tabs-nav .nav-tab:last-child {
|
599 |
-
border-right : 1px solid #d8d8d8;
|
600 |
-
}
|
601 |
-
|
602 |
.yith-plugin-ui .yith-plugin-fw-sub-tabs-nav .yith-nav-sub-tab--highlight {
|
603 |
color : #fff;
|
604 |
background : #2a8db0;
|
@@ -607,7 +626,121 @@
|
|
607 |
.yith-plugin-ui .yith-plugin-fw-sub-tabs-nav .nav-tab-active {
|
608 |
color : #2a8db0;
|
609 |
background : #fff;
|
610 |
-
border-bottom
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
611 |
}
|
612 |
|
613 |
/* === Responsive === */
|
46 |
margin-right : 15px;
|
47 |
}
|
48 |
|
49 |
+
.yith-plugin-fw-panel-custom-tab-container > h2 {
|
50 |
+
border : none;
|
51 |
+
padding : 15px 0;
|
52 |
+
}
|
53 |
+
|
54 |
.yith-plugin-ui .yith-plugin-fw-panel-custom-tab-container{
|
55 |
border: 1px solid #ddd;
|
56 |
border-top : 0;
|
88 |
.yith-plugin-fw-wp-page-wrapper .wrap {
|
89 |
border : 1px solid #d8d8d8;
|
90 |
border-top : 0;
|
91 |
+
margin: 0px 15px 0 0;
|
92 |
background : #fff;
|
93 |
padding : 20px;
|
94 |
box-sizing : border-box;
|
95 |
}
|
96 |
+
.yith-plugin-fw-wp-page-wrapper .wrap.subnav-wrap .wrap{
|
97 |
+
margin-top: -20px;
|
98 |
+
}
|
99 |
|
100 |
#wpwrap .yith-plugin-fw-wp-page-wrapper .yith-plugin-ui h2.nav-tab-wrapper, #wpbody-content .yith-plugin-fw-wp-page-wrapper .yith-plugin-ui h2.nav-tab-wrapper {
|
101 |
padding-bottom : 0;
|
107 |
|
108 |
.yith-plugin-fw-wp-page-wrapper h1.nav-tab-wrapper, .yith-plugin-fw-wp-page-wrapper h2.nav-tab-wrapper, .yith-plugin-fw-wp-page-wrapper .nav-tab-wrapper {
|
109 |
padding-top : 9px;
|
110 |
+
padding-bottom: 0;
|
111 |
}
|
112 |
|
113 |
.yith-plugin-fw-wp-page-wrapper .wrap h1.wp-heading-inline {
|
526 |
margin-right : 15px;
|
527 |
}
|
528 |
|
529 |
+
.yith-plugin-ui .yit-admin-panel-container {
|
530 |
+
position : relative;
|
531 |
+
margin-right : 15px;
|
532 |
+
margin-top: -3px;
|
533 |
+
z-index: 0;
|
534 |
+
border-top: 1px solid #dbdada;
|
535 |
+
}
|
536 |
.yit-admin-panel-content-wrap {
|
537 |
+
width: auto;
|
538 |
display : block;
|
539 |
}
|
540 |
|
569 |
*/
|
570 |
.yith-plugin-ui .yith-plugin-fw-sub-tabs-nav {
|
571 |
background : #fff;
|
572 |
+
padding: 10px 14px 0px 20px;
|
573 |
box-sizing : border-box;
|
574 |
+
margin-right: 15px;
|
575 |
border-left : 1px solid #d8d8d8;
|
576 |
border-right : 1px solid #d8d8d8;
|
577 |
+
margin-top: -2px;
|
578 |
+
}
|
579 |
+
.yith-plugin-ui .yith-plugin-fw-wp-page-wrapper .wrap{
|
580 |
+
margin-top: -29px;
|
581 |
}
|
|
|
582 |
.yith-plugin-ui .yith-plugin-fw-sub-tabs-nav h3.nav-tab-wrapper {
|
583 |
text-transform : uppercase;
|
584 |
line-height : inherit;
|
585 |
font-weight : 600;
|
586 |
+
margin-right: 21px;
|
587 |
+
box-sizing: border-box;
|
588 |
+
background-color: #f1f1f1;
|
589 |
+
padding-top: 0;
|
590 |
+
border: 1px solid #ccc;
|
591 |
+
border-bottom: 0;
|
592 |
+
margin-top: 20px;
|
593 |
}
|
594 |
|
595 |
.yith-plugin-ui .yith-plugin-fw-sub-tabs-nav .nav-tab {
|
596 |
line-height : 1.71428571;
|
597 |
margin-left : 0;
|
598 |
margin-right : 0;
|
599 |
+
background-color: #f1f1f1;
|
600 |
color : #336374;
|
601 |
font-size : 13px;
|
602 |
+
padding: 8px 20px 9px;
|
603 |
border : 0;
|
|
|
|
|
604 |
}
|
605 |
|
606 |
.yith-plugin-ui .yith-plugin-fw-sub-tabs-nav .nav-tab .yith-nav-sub-tab__title,
|
618 |
color : inherit;
|
619 |
}
|
620 |
|
|
|
|
|
|
|
|
|
621 |
.yith-plugin-ui .yith-plugin-fw-sub-tabs-nav .yith-nav-sub-tab--highlight {
|
622 |
color : #fff;
|
623 |
background : #2a8db0;
|
626 |
.yith-plugin-ui .yith-plugin-fw-sub-tabs-nav .nav-tab-active {
|
627 |
color : #2a8db0;
|
628 |
background : #fff;
|
629 |
+
border-bottom: 2px solid #fff;
|
630 |
+
}
|
631 |
+
.yith-plugin-ui .yith-plugin-fw-sub-tabs-nav .nav-tab:first-child{
|
632 |
+
border:0;
|
633 |
+
}
|
634 |
+
|
635 |
+
.yith-plugin-fw-wp-page-wrapper.yith-current-subtab-opened > .wrap {
|
636 |
+
/* padding-top: 0; */
|
637 |
+
}
|
638 |
+
.yith-plugin-fw-wp-page-wrapper .nav-tab-wrapper {
|
639 |
+
border-bottom: 2px solid #e9e9e9;
|
640 |
+
margin: 0;
|
641 |
+
padding-top: 9px;
|
642 |
+
padding-bottom: 0;
|
643 |
+
line-height: inherit;
|
644 |
+
}
|
645 |
+
|
646 |
+
div.nav-subtab-wrap {
|
647 |
+
position: absolute;
|
648 |
+
top: 100%;
|
649 |
+
left: 1px;
|
650 |
+
padding-top: 10px;
|
651 |
+
visibility: hidden; /* hides sub-menu */
|
652 |
+
}
|
653 |
+
ul.nav-subtab {
|
654 |
+
opacity: 0;
|
655 |
+
background-color: #fff;
|
656 |
+
transition: max-height 0.5s ease-in;
|
657 |
+
max-height: 0;
|
658 |
+
z-index: 100;
|
659 |
+
overflow: hidden;
|
660 |
+
border: 1px solid #f2f2f2;
|
661 |
+
padding: 14px 15px;
|
662 |
+
}
|
663 |
+
ul.yith-plugin-fw-tabs {
|
664 |
+
display: block;
|
665 |
+
margin: 0;
|
666 |
+
}
|
667 |
+
|
668 |
+
li.yith-plugin-fw-tab-element {
|
669 |
+
position: relative;
|
670 |
+
margin: 0;
|
671 |
+
padding: 0;
|
672 |
+
display: inline-block;
|
673 |
+
height: 37px;
|
674 |
+
overflow: visible;
|
675 |
+
z-index:10;
|
676 |
+
}
|
677 |
+
.yith-plugin-fw-panel-custom-tab-container {
|
678 |
+
margin-top: -2px;
|
679 |
+
}
|
680 |
+
|
681 |
+
li.yith-plugin-fw-tab-element:hover{
|
682 |
+
cursor:pointer;
|
683 |
+
}
|
684 |
+
li.nav-subtab-item{
|
685 |
+
padding: 3px 0 0;
|
686 |
+
}
|
687 |
+
li.nav-subtab-item a {
|
688 |
+
font-size: 12px;
|
689 |
+
text-decoration: none;
|
690 |
+
letter-spacing: 0.05em;
|
691 |
+
color: #336374;
|
692 |
+
}
|
693 |
+
li.nav-subtab-item a:hover{
|
694 |
+
color:#228fb6;
|
695 |
+
}
|
696 |
+
|
697 |
+
li.yith-plugin-fw-tab-element a:hover .nav-subtab-wrap,
|
698 |
+
li.yith-plugin-fw-tab-element:hover .nav-subtab-wrap {
|
699 |
+
visibility: visible; /* shows sub-menu */
|
700 |
+
}
|
701 |
+
|
702 |
+
li.yith-plugin-fw-tab-element a:hover ul.nav-subtab,
|
703 |
+
li.yith-plugin-fw-tab-element:hover ul.nav-subtab{
|
704 |
+
max-height: 200px;
|
705 |
+
-webkit-box-shadow: -2px 2px 10px rgba(0, 111, 101, 0.27);
|
706 |
+
-moz-box-shadow: -2px 2px 10px rgba(0, 111, 101, 0.27);
|
707 |
+
box-shadow: -2px 2px 10px rgba(0, 111, 101, 0.27);
|
708 |
+
opacity: 1;
|
709 |
+
transition-delay: 0s, 0s, 0.3s;
|
710 |
+
min-width: 180px;
|
711 |
+
}
|
712 |
+
|
713 |
+
li.yith-plugin-fw-tab-element a.nav-tab i {
|
714 |
+
margin-left: 10px;
|
715 |
+
font-size:12px;
|
716 |
+
}
|
717 |
+
|
718 |
+
li.yith-plugin-fw-tab-element a.nav-tab i:before {
|
719 |
+
color: #fff;
|
720 |
+
}
|
721 |
+
|
722 |
+
.yith-plugin-fw-panel .woocommerce-page{
|
723 |
+
margin-top:-2px;
|
724 |
+
}
|
725 |
+
|
726 |
+
.yith-plugin-ui .yith-plugin-fw-sub-tabs-nav ~ .yit-admin-panel-container {
|
727 |
+
margin-top: 0;
|
728 |
+
padding-top: 0;
|
729 |
+
}
|
730 |
+
|
731 |
+
.yith-plugin-ui .yith-plugin-fw-sub-tabs-nav ~ .yit-admin-panel-container,
|
732 |
+
.yith-plugin-ui .yith-plugin-fw-sub-tabs-nav ~ .wrap.subnav-wrap {
|
733 |
+
border: 1px solid #d8d8d8;
|
734 |
+
border-top: 0;
|
735 |
+
margin: -2px 15px 0 0;
|
736 |
+
background: #fff;
|
737 |
+
padding: 20px;
|
738 |
+
box-sizing: border-box;
|
739 |
+
}
|
740 |
+
|
741 |
+
.yith-plugin-ui .yith-plugin-fw-sub-tabs-nav ~ .wrap.subnav-wrap .wrap,
|
742 |
+
.yith-plugin-ui .yit-admin-panel-content-wrap.has-subnav {
|
743 |
+
margin: -20px 15px 0 0;
|
744 |
}
|
745 |
|
746 |
/* === Responsive === */
|
plugin-fw/assets/css/yith-fields.css
CHANGED
@@ -22,6 +22,12 @@
|
|
22 |
width : 100%;
|
23 |
}
|
24 |
|
|
|
|
|
|
|
|
|
|
|
|
|
25 |
.yith-plugin-fw-field-wrapper span.desc {
|
26 |
display : block;
|
27 |
width : 100%;
|
@@ -280,17 +286,22 @@ ul.yit-icons-manager-list li.active {
|
|
280 |
|
281 |
.yith-plugin-fw-checkbox-array__row {
|
282 |
margin-bottom : 10px;
|
|
|
283 |
}
|
284 |
|
285 |
.yith-plugin-fw-checkbox-array__row label {
|
286 |
display : inline-block !important;
|
287 |
width : auto !important;
|
288 |
float : none !important;
|
289 |
-
margin : 0 !important;
|
290 |
padding : 0 !important;
|
291 |
font-weight : 400 !important;
|
292 |
}
|
293 |
|
|
|
|
|
|
|
|
|
294 |
/* ------- Sidebar Layout ------- */
|
295 |
.yith-plugin-fw-sidebar-layout input[type="radio"] {
|
296 |
display : none;
|
@@ -656,7 +667,7 @@ YITH UI
|
|
656 |
.yith-plugin-fw-banner {
|
657 |
width : 100%;
|
658 |
height : 45px;
|
659 |
-
background : url(
|
660 |
display : flex;
|
661 |
align-items : center;
|
662 |
padding-right : -23px;
|
@@ -724,6 +735,7 @@ YITH UI
|
|
724 |
font-size : 15px;
|
725 |
padding : 7px 20px;
|
726 |
border : 0;
|
|
|
727 |
}
|
728 |
|
729 |
.yith-plugin-ui .nav-tab:first-child {
|
@@ -733,6 +745,10 @@ YITH UI
|
|
733 |
.yith-plugin-ui .nav-tab.yith-premium {
|
734 |
background-color : #be421c;
|
735 |
}
|
|
|
|
|
|
|
|
|
736 |
|
737 |
.yith-plugin-ui .nav-tab-active {
|
738 |
background-color : #fff;
|
@@ -771,7 +787,7 @@ YITH UI
|
|
771 |
|
772 |
.yith-plugin-ui span.description {
|
773 |
color : #716269;
|
774 |
-
font-size :
|
775 |
font-style : normal;
|
776 |
font-weight : 400;
|
777 |
margin-top : 15px;
|
@@ -780,7 +796,7 @@ YITH UI
|
|
780 |
|
781 |
#wpwrap .yith-plugin-ui h2.nav-tab-wrapper, #wpbody-content .yith-plugin-ui h2.nav-tab-wrapper {
|
782 |
border : 0;
|
783 |
-
border-bottom : 1px solid #ccc;
|
784 |
margin-right : 15px;
|
785 |
margin-bottom : 0;
|
786 |
background-color : transparent;
|
@@ -851,7 +867,7 @@ YITH UI
|
|
851 |
font-size : 30px;
|
852 |
font-weight : normal;
|
853 |
display : block;
|
854 |
-
margin-top : -
|
855 |
float : left;
|
856 |
margin-right : 15px;
|
857 |
}
|
@@ -1273,9 +1289,7 @@ span.select2.select2-container.select2-container--default.yith-plugin-fw-select2
|
|
1273 |
text-indent : -9999px;
|
1274 |
}
|
1275 |
|
1276 |
-
|
1277 |
-
.select2-container--default .select2-selection--multiple .select2-selection__choice__remove:after,
|
1278 |
-
.woocommerce .yith-plugin-ui .select2-container--default .select2-selection--multiple .select2-selection__choice__remove:after,
|
1279 |
.yith-plugin-ui .select2-container--default .select2-selection--multiple .select2-selection__choice__remove:after {
|
1280 |
float : right;
|
1281 |
color : #fff;
|
@@ -1286,15 +1300,6 @@ span.select2.select2-container.select2-container--default.yith-plugin-fw-select2
|
|
1286 |
text-indent : 0;
|
1287 |
}
|
1288 |
|
1289 |
-
.select2-container--default .select2-selection--multiple .select2-selection__choice__remove:after {
|
1290 |
-
color : #000;
|
1291 |
-
}
|
1292 |
-
|
1293 |
-
.yith-plugin-ui .select2-container--default .select2-selection--multiple .select2-selection__choice__remove:after
|
1294 |
-
.yith-plugin-fw-panel .select2-container--default .select2-selection--multiple .select2-selection__choice__remove:after {
|
1295 |
-
color : #000;
|
1296 |
-
}
|
1297 |
-
|
1298 |
.yith-plugin-ui .select2-container .select2-selection--multiple,
|
1299 |
.yith-plugin-ui .select2-container--default.select2-container--focus .select2-selection--multiple {
|
1300 |
border : 0;
|
@@ -2050,8 +2055,8 @@ div#ui-datepicker-div.yith-plugin-fw-datepicker-div {
|
|
2050 |
line-height : 33px;
|
2051 |
}
|
2052 |
|
2053 |
-
.yith-plugin-ui .
|
2054 |
-
margin :
|
2055 |
}
|
2056 |
|
2057 |
.yith-plugin-ui .form-table td p.yith-section-description {
|
@@ -2108,6 +2113,7 @@ div#ui-datepicker-div.yith-plugin-fw-datepicker-div {
|
|
2108 |
.yith-plugin-ui span.description {
|
2109 |
margin-top : 10px;
|
2110 |
line-height : 20px;
|
|
|
2111 |
}
|
2112 |
|
2113 |
.yith-plugin-fw-option-with-description {
|
@@ -2312,4 +2318,80 @@ div#ui-datepicker-div.yith-plugin-fw-datepicker-div {
|
|
2312 |
padding : 0;
|
2313 |
}
|
2314 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2315 |
}
|
22 |
width : 100%;
|
23 |
}
|
24 |
|
25 |
+
.yith-plugin-fw-field-wrapper .yith-inline-fields > div {
|
26 |
+
display: inline-block;
|
27 |
+
vertical-align: middle;
|
28 |
+
margin-right: 5px;
|
29 |
+
}
|
30 |
+
|
31 |
.yith-plugin-fw-field-wrapper span.desc {
|
32 |
display : block;
|
33 |
width : 100%;
|
286 |
|
287 |
.yith-plugin-fw-checkbox-array__row {
|
288 |
margin-bottom : 10px;
|
289 |
+
display:flex;
|
290 |
}
|
291 |
|
292 |
.yith-plugin-fw-checkbox-array__row label {
|
293 |
display : inline-block !important;
|
294 |
width : auto !important;
|
295 |
float : none !important;
|
296 |
+
margin : 0 0 0 10px !important;
|
297 |
padding : 0 !important;
|
298 |
font-weight : 400 !important;
|
299 |
}
|
300 |
|
301 |
+
.yith-plugin-fw-checkbox-array__row label small{
|
302 |
+
display:block;
|
303 |
+
line-height: 2em;
|
304 |
+
}
|
305 |
/* ------- Sidebar Layout ------- */
|
306 |
.yith-plugin-fw-sidebar-layout input[type="radio"] {
|
307 |
display : none;
|
667 |
.yith-plugin-fw-banner {
|
668 |
width : 100%;
|
669 |
height : 45px;
|
670 |
+
background : #cfd9dd url(../images/banner-premium.png) no-repeat;
|
671 |
display : flex;
|
672 |
align-items : center;
|
673 |
padding-right : -23px;
|
735 |
font-size : 15px;
|
736 |
padding : 7px 20px;
|
737 |
border : 0;
|
738 |
+
transition: background-color 0.3s linear;
|
739 |
}
|
740 |
|
741 |
.yith-plugin-ui .nav-tab:first-child {
|
745 |
.yith-plugin-ui .nav-tab.yith-premium {
|
746 |
background-color : #be421c;
|
747 |
}
|
748 |
+
.yith-plugin-ui .yith-nav-tab-wrapper .yith-plugin-fw-tab-element:hover > a.nav-tab:not(.nav-tab-active),
|
749 |
+
.yith-plugin-ui .yith-nav-tab-wrapper .nav-tab:not(.nav-tab-active):hover{
|
750 |
+
background-color:#207a92;
|
751 |
+
}
|
752 |
|
753 |
.yith-plugin-ui .nav-tab-active {
|
754 |
background-color : #fff;
|
787 |
|
788 |
.yith-plugin-ui span.description {
|
789 |
color : #716269;
|
790 |
+
font-size : 13px;
|
791 |
font-style : normal;
|
792 |
font-weight : 400;
|
793 |
margin-top : 15px;
|
796 |
|
797 |
#wpwrap .yith-plugin-ui h2.nav-tab-wrapper, #wpbody-content .yith-plugin-ui h2.nav-tab-wrapper {
|
798 |
border : 0;
|
799 |
+
/* border-bottom : 1px solid #ccc; */
|
800 |
margin-right : 15px;
|
801 |
margin-bottom : 0;
|
802 |
background-color : transparent;
|
867 |
font-size : 30px;
|
868 |
font-weight : normal;
|
869 |
display : block;
|
870 |
+
margin-top : -12px;
|
871 |
float : left;
|
872 |
margin-right : 15px;
|
873 |
}
|
1289 |
text-indent : -9999px;
|
1290 |
}
|
1291 |
|
1292 |
+
.yith-plugin-fw-panel .select2-container--default .select2-selection--multiple .select2-selection__choice__remove:after,
|
|
|
|
|
1293 |
.yith-plugin-ui .select2-container--default .select2-selection--multiple .select2-selection__choice__remove:after {
|
1294 |
float : right;
|
1295 |
color : #fff;
|
1300 |
text-indent : 0;
|
1301 |
}
|
1302 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1303 |
.yith-plugin-ui .select2-container .select2-selection--multiple,
|
1304 |
.yith-plugin-ui .select2-container--default.select2-container--focus .select2-selection--multiple {
|
1305 |
border : 0;
|
2055 |
line-height : 33px;
|
2056 |
}
|
2057 |
|
2058 |
+
.yith-plugin-ui .tablenav {
|
2059 |
+
margin : 20px 0;
|
2060 |
}
|
2061 |
|
2062 |
.yith-plugin-ui .form-table td p.yith-section-description {
|
2113 |
.yith-plugin-ui span.description {
|
2114 |
margin-top : 10px;
|
2115 |
line-height : 20px;
|
2116 |
+
max-width : 40%;
|
2117 |
}
|
2118 |
|
2119 |
.yith-plugin-fw-option-with-description {
|
2318 |
padding : 0;
|
2319 |
}
|
2320 |
|
2321 |
+
.yith-plugin-ui #plugin-fw-wc table.form-table th,
|
2322 |
+
#yith-plugin-fw-panel table.form-table th.titledesc,
|
2323 |
+
.yith-plugin-ui #plugin-fw-wc table.form-table td,
|
2324 |
+
#yith-plugin-fw-panel table.form-table td.forminp {
|
2325 |
+
padding: 20px 20px;
|
2326 |
+
}
|
2327 |
+
|
2328 |
+
.yith-plugin-ui #plugin-fw-wc table.form-table th.titledesc,
|
2329 |
+
#yith-plugin-fw-panel table.form-table th.titledesc {
|
2330 |
+
padding-bottom: 0;
|
2331 |
+
}
|
2332 |
+
}
|
2333 |
+
|
2334 |
+
@media (max-width: 480px) {
|
2335 |
+
.yith-plugin-ui .nav-tab {
|
2336 |
+
font-size: 12px;
|
2337 |
+
}
|
2338 |
+
.yith-plugin-ui h2 {
|
2339 |
+
padding: 20px 20px;
|
2340 |
+
}
|
2341 |
+
.yith-plugin-ui [type="radio"]:checked + label:before, .yith-plugin-ui [type="radio"]:not(:checked) + label:before {
|
2342 |
+
width: 14px;
|
2343 |
+
height: 14px;
|
2344 |
+
}
|
2345 |
+
.yith-plugin-ui [type="radio"]:checked + label:after, .yith-plugin-ui [type="radio"]:not(:checked) + label:after {
|
2346 |
+
width: 10px;
|
2347 |
+
height: 10px;
|
2348 |
+
top: 3px;
|
2349 |
+
left: 3px;
|
2350 |
+
}
|
2351 |
+
.yith-plugin-ui [type="radio"]:checked + label, .yith-plugin-ui [type="radio"]:not(:checked) + label {
|
2352 |
+
padding-left: 25px;
|
2353 |
+
}
|
2354 |
+
|
2355 |
+
.yith-plugin-ui [type="radio"]:checked + label, .yith-plugin-ui [type="radio"]:not(:checked) + label {
|
2356 |
+
font-size: 13px;
|
2357 |
+
}
|
2358 |
+
.yith-plugin-ui span.description {
|
2359 |
+
font-size: 12px;
|
2360 |
+
}
|
2361 |
+
.yith-plugin-ui #plugin-fw-wc table.form-table th,
|
2362 |
+
#yith-plugin-fw-panel table.form-table th.titledesc,
|
2363 |
+
.yith-plugin-ui #plugin-fw-wc table.form-table td,
|
2364 |
+
#yith-plugin-fw-panel table.form-table td.forminp {
|
2365 |
+
padding: 15px 20px;
|
2366 |
+
}
|
2367 |
+
|
2368 |
+
.yith-plugin-ui .yith-plugin-fw-onoff-container input + span {
|
2369 |
+
width: 48px;
|
2370 |
+
height: 20px;
|
2371 |
+
}
|
2372 |
+
.yith-plugin-ui .yith-plugin-fw-onoff-container input + span:before {
|
2373 |
+
top: 3px;
|
2374 |
+
left: 3px;
|
2375 |
+
}
|
2376 |
+
.yith-plugin-ui .yith-plugin-fw-onoff-container input:checked + span:before, .yith-plugin-ui.yith-plugin-fw-onoff-container input.onoffchecked + span:before {
|
2377 |
+
left: 30px;
|
2378 |
+
}
|
2379 |
+
.yith-plugin-ui .yith-plugin-fw-onoff-container input:checked + span:after, .yith-plugin-ui.yith-plugin-fw-onoff-container input.onoffchecked + span:after {
|
2380 |
+
font-size: 11px;
|
2381 |
+
padding: 0px 6px;
|
2382 |
+
margin-top: 3px;
|
2383 |
+
}
|
2384 |
+
.yith-plugin-ui .yith-plugin-fw-onoff-container input + span:after {
|
2385 |
+
font-size: 11px;
|
2386 |
+
padding-left: 24px;
|
2387 |
+
margin-top: 3px;
|
2388 |
+
}
|
2389 |
+
|
2390 |
+
.yith-plugin-fw .select2-container .select2-selection--single .select2-selection__rendered {
|
2391 |
+
font-size: 14px;
|
2392 |
+
}
|
2393 |
+
|
2394 |
+
.yith-plugin-ui input {
|
2395 |
+
font-size: 14px;
|
2396 |
+
}
|
2397 |
}
|
plugin-fw/assets/js/yit-plugin-panel.js
CHANGED
@@ -190,4 +190,27 @@ jQuery( function ( $ ) {
|
|
190 |
wrap.prepend( notices );
|
191 |
}
|
192 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
193 |
} );
|
190 |
wrap.prepend( notices );
|
191 |
}
|
192 |
|
193 |
+
|
194 |
+
// TAB MENU AND SUB TABS
|
195 |
+
var active_subnav = $(document).find( '.yith-nav-sub-tab.nav-tab-active' );
|
196 |
+
|
197 |
+
if( active_subnav.length ){
|
198 |
+
// WP page
|
199 |
+
var mainWrapper = $(document).find( '.yith-plugin-fw-wp-page-wrapper' );
|
200 |
+
if( ! mainWrapper.length ){
|
201 |
+
mainWrapper = $(document).find( '#wpbody-content > .yith-plugin-ui' );
|
202 |
+
}
|
203 |
+
|
204 |
+
if( mainWrapper ){
|
205 |
+
// serach first for deafult wrap
|
206 |
+
var wrap = mainWrapper.find( '.yit-admin-panel-content-wrap' );
|
207 |
+
if( wrap.length ) {
|
208 |
+
wrap.addClass( 'has-subnav' );
|
209 |
+
}
|
210 |
+
else {
|
211 |
+
// try to wrap a generic wrap div in main wrapper
|
212 |
+
mainWrapper.find('.wrap').wrap('<div class="wrap subnav-wrap"></div>');
|
213 |
+
}
|
214 |
+
}
|
215 |
+
}
|
216 |
} );
|
plugin-fw/assets/js/yit-plugin-panel.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
jQuery(function(
|
1 |
+
jQuery(function(a){function e(e,t,i,n){var s=!0;if("string"==typeof t){":radio"==t.substr(0,6)&&(t+=":checked");var r=a(t).val();if("checkbox"==a(t).attr("type"))r=a(t).is(":checked")?"yes":"no";"select-images"===a(t+"-wrapper").data("type")&&(r=a(t+"-wrapper").find("select").first().val()),i=i.split(",");for(var d=0;d<i.length;d++){if(r==i[d]){s=!0;break}s=!1}}var c=a(e),o=a(e+"-container").closest("tr");o.length<1&&(o=c.closest(".yith-plugin-fw-panel-wc-row"));var l,p=n.split("-");for(l in p){var h=p[l];if(s)switch(h){case"disable":o.removeClass("yith-disabled"),c.attr("disabled",!1);break;case"hideme":c.show();break;case"fadeInOut":case"fadeIn":o.show(500);break;case"fadeOut":o.show();break;default:o.show(),o.fadeTo("slow",1).addClass("fade-in")}else switch(h){case"disable":o.addClass("yith-disabled"),c.attr("disabled",!0);break;case"hideme":c.hide();break;case"fadeInOut":case"fadeOut":o.hide(500);break;case"fadeIn":o.hide();break;default:o.hasClass("fade-in")?o.fadeTo("slow",0,function(){a(this).hide().removeClass("fade-in")}):(o.hide(),o.css({opacity:"0"}))}}}a("[data-dep-target]").each(function(){var t=a(this),i="#"+t.data("dep-target"),n="#"+t.data("dep-id"),s=t.data("dep-value"),r=t.data("dep-type"),d="change";"select-images"===a(n+"-wrapper").data("type")&&(d="yith_select_images_value_changed"),e(i,n,s.toString(),r),a(n).on(d,function(){e(i,n,s.toString(),r)}).trigger(d)}),a(".rm_connectedlist").each(function(){var e=a(this).find("ul"),t=a(this).find(":hidden");e.sortable({connectWith:e,update:function(i,n){var s={};e.each(function(){var e={};a(this).children().each(function(){e[a(this).data("option")]=a(this).text()}),s[a(this).data("list")]=e}),t.val(JSON.stringify(s).replace(/[\\"']/g,"\\$&").replace(/\u0000/g,"\\0"))}}).disableSelection()}),a(document).ready(function(){a(".google-analytic-generate").click(function(){var e=a("#"+a(this).data("textarea")).data("codemirrorInstance"),t="(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){\n";t+="(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement( o ),\n",t+="m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)\n",t+="})(window,document,'script','//www.google-analytics.com/analytics.js','ga');\n\n",t+="ga('create', '"+a("#"+a(this).data("input")).val()+"', '"+a(this).data("basename")+"');\n",t+="ga('send', 'pageview');\n",e.replaceRange(t,e.getCursor("start"),e.getCursor("end"))})}),a(".yith-plugin-fw-panel .woo-nav-tab-wrapper").removeClass("woo-nav-tab-wrapper").addClass("yith-nav-tab-wrapper");var t=a(".wrap.yith-plugin-ui").first(),i=a("div.updated, div.error, div.notice");if(i.addClass("inline"),t.length&&t.prepend(i),a(document).find(".yith-nav-sub-tab.nav-tab-active").length){var n=a(document).find(".yith-plugin-fw-wp-page-wrapper");if(n.length||(n=a(document).find("#wpbody-content > .yith-plugin-ui")),n)(t=n.find(".yit-admin-panel-content-wrap")).length?t.addClass("has-subnav"):n.find(".wrap").wrap('<div class="wrap subnav-wrap"></div>')}});
|
plugin-fw/assets/js/yith-fields.js
CHANGED
@@ -696,11 +696,22 @@
|
|
696 |
toggle.saveToggleElement();
|
697 |
} );
|
698 |
|
699 |
-
|
700 |
-
|
701 |
-
|
702 |
-
|
703 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
704 |
$( document ).on( 'click', '.yith-password-eye', function () {
|
705 |
var $this = $( this ),
|
706 |
inp = $( this ).closest( '.yith-password-wrapper' ).find( 'input' );
|
@@ -713,13 +724,6 @@
|
|
713 |
}
|
714 |
} );
|
715 |
|
716 |
-
$( document.body ).on( 'yith-plugin-fw-init-radio', function () {
|
717 |
-
$( '.yith-plugin-fw-radio:not(.yith-plugin-fw-radio--initialized)' ).each( function () {
|
718 |
-
$( this ).val( $( this ).attr( 'value' ) );
|
719 |
-
$( this ).addClass( 'yith-plugin-fw-radio--initialized' );
|
720 |
-
} );
|
721 |
-
} ).trigger( 'yith-plugin-fw-init-radio' );
|
722 |
-
|
723 |
/**
|
724 |
* Select2 - add class to stylize it with the new plugin-fw style
|
725 |
*/
|
696 |
toggle.saveToggleElement();
|
697 |
} );
|
698 |
|
699 |
+
// Radio
|
700 |
+
$( document ).on( 'click', '.yith-plugin-fw-radio input[type=radio]', function () {
|
701 |
+
var _radioContainer = $( this ).closest( '.yith-plugin-fw-radio' ),
|
702 |
+
_value = $( this ).val();
|
703 |
+
|
704 |
+
_radioContainer.val( _value ).data( 'value', _value ).trigger( 'change' );
|
705 |
+
} );
|
706 |
+
|
707 |
+
$( document.body ).on( 'yith-plugin-fw-init-radio', function () {
|
708 |
+
$( '.yith-plugin-fw-radio:not(.yith-plugin-fw-radio--initialized)' ).each( function () {
|
709 |
+
$( this ).val( $( this ).data( 'value' ) );
|
710 |
+
$( this ).addClass( 'yith-plugin-fw-radio--initialized' );
|
711 |
+
} );
|
712 |
+
} ).trigger( 'yith-plugin-fw-init-radio' );
|
713 |
+
|
714 |
+
// Password Eye field
|
715 |
$( document ).on( 'click', '.yith-password-eye', function () {
|
716 |
var $this = $( this ),
|
717 |
inp = $( this ).closest( '.yith-password-wrapper' ).find( 'input' );
|
724 |
}
|
725 |
} );
|
726 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
727 |
/**
|
728 |
* Select2 - add class to stylize it with the new plugin-fw style
|
729 |
*/
|
plugin-fw/assets/js/yith-fields.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
!function(e){e(document).on("yith_fields_init",function(){var t=e(".yith-plugin-fw-datepicker"),i=e(".yith-plugin-fw-colorpicker"),a={imgPreviewHandler:".yith-plugin-fw-upload-img-preview",uploadButtonHandler:".yith-plugin-fw-upload-button",imgUrlHandler:".yith-plugin-fw-upload-img-url",resetButtonHandler:".yith-plugin-fw-upload-button-reset",imgUrl:e(".yith-plugin-fw-upload-img-url")},n=e(".add_media"),l={sliderWrapper:e(".yith-plugin-fw .image-gallery ul.slides-wrapper"),buttonHandler:".yith-plugin-fw .image-gallery-button"},s=e(".yith-plugin-fw-sidebar-layout"),o=e(".yith-plugin-fw .yith-plugin-fw-slider-container .ui-slider-horizontal"),r=e(".codemirror"),d=e(".yit-icons-manager-wrapper");e(".yith-plugin-ui td.forminp-checkbox");t.each(function(){var t=e(this).data();t.showAnim=!1,t.beforeShow=function(e,t){t.dpDiv.addClass("yith-plugin-fw-datepicker-div")},t.onClose=function(e,t){t.dpDiv.removeClass("yith-plugin-fw-datepicker-div")},e(this).datepicker(t)}),i.wpColorPicker({palettes:!1,width:200,mode:"hsl",clear:function(){var t=e(this);t.val(t.data("default-color")),t.change()}}),i.each(function(){var t=e(this).data("variations-label"),i=e(this).closest(".yith-plugin-fw-colorpicker-field-wrapper"),a=e(this).closest(".yith-single-colorpicker"),n=i.find(".wp-picker-input-wrap"),l=a.find(".wp-picker-input-wrap");if(n.length&&i.find("a.wp-color-result").attr("title",t),a.length&&a.find("a.wp-color-result").attr("title",t),!n.find(".wp-picker-clear-custom").length){var s=e("<span/>").attr({"class":"wp-picker-default-custom"});n.find(".wp-picker-default").wrap(s)}l.find(".wp-picker-clear-custom").length||(s=e("<span/>").attr({"class":"wp-picker-default-custom"}),l.find(".wp-picker-default").wrap(s))}),"undefined"!=typeof wp&&"undefined"!=typeof wp.media&&(a.imgUrl.change(function(){var t=e(this).val(),i=new RegExp("(http|ftp|https)://[a-zA-Z0-9@?^=%&:/~+#-_.]*.(gif|jpg|jpeg|png|ico|svg)"),n=e(this).parent().find(a.imgPreviewHandler).first();n.length<1&&(n=e(this).parent().parent().find(a.imgPreviewHandler).first()),i.test(t)?n.html('<img src="'+t+'" style="max-width:100px; max-height:100px;" />'):n.html("")}).trigger("change"),e(document).on("click",a.uploadButtonHandler,function(t){t.preventDefault();var i,n=e(this).attr("id").replace(/-button$/,"");if(i)i.open();else{var l=[new wp.media.controller.Library({library:wp.media.query(),multiple:!1,title:"Choose Image",priority:20,filterable:"uploaded"})];(i=wp.media.frames.downloadable_file=wp.media({title:"Choose Image",library:{type:""},button:{text:"Choose Image"},multiple:!1,states:l})).on("select",function(){var t=i.state().get("selection").first().toJSON();e("#"+n).val(t.url),e("#"+n+"-yith-attachment-id")&&e("#"+n+"-yith-attachment-id").val(t.id),a.imgUrl.trigger("change")}),i.open()}}),e(document).on("click",a.resetButtonHandler,function(t){var i=e(this),n=i.attr("id"),l=i.attr("id").replace(/-button-reset$/,""),s=e("#"+n).data("default");e("#"+l).val(s),a.imgUrl.trigger("change")}));n.on("click",function(){}),"undefined"!=typeof wp&&"undefined"!=typeof wp.media&&(e(document).on("click",l.buttonHandler,function(t){var i=e(this),a=i.closest(".image-gallery"),n=a.find(".image_gallery_ids"),l=n.val(),s=a.find("ul.slides-wrapper"),o=wp.media.frames.image_gallery=wp.media({title:i.data("choose"),button:{text:i.data("update")},states:[new wp.media.controller.Library({title:i.data("choose"),filterable:"all",multiple:!0})]});o.on("select",function(){o.state().get("selection").map(function(e){(e=e.toJSON()).id&&(l=l?l+","+e.id:e.id,s.append('<li class="image" data-attachment_id="'+e.id+'"><img src="'+e.sizes.thumbnail.url+'"/><ul class="actions"><li><a href="#" class="delete" title="'+i.data("delete")+'">x</a></li></ul></li>'))}),n.val(l)}),o.open()}),l.sliderWrapper.each(function(){var t=e(this);t.sortable({items:"li.image",cursor:"move",scrollSensitivity:40,forcePlaceholderSize:!0,forceHelperSize:!1,helper:"clone",opacity:.65,start:function(e,t){t.item.css("background-color","#f6f6f6")},stop:function(e,t){t.item.removeAttr("style")},update:function(i,a){var n="";t.find("li.image").css("cursor","default").each(function(){var t=e(this).attr("data-attachment_id");n=n+t+","}),t.closest(".image-gallery").find(".image_gallery_ids").val(n)}})}),l.sliderWrapper.on("click","a.delete",function(){var t=e(this).closest(".image-gallery"),i=e(this).closest(".image-gallery ul.slides-wrapper"),a=t.find(".image_gallery_ids"),n="";e(this).closest("li.image").remove(),i.find("li.image").css("cursor","default").each(function(){var t=e(this).attr("data-attachment_id");n=n+t+","}),a.val(n)})),s.each(function(){e(this).find("img").on("click",function(){var t=e(this).closest(".yith-plugin-fw-sidebar-layout"),i=t.find(".yith-plugin-fw-sidebar-layout-sidebar-left-container"),a=t.find(".yith-plugin-fw-sidebar-layout-sidebar-right-container"),n=e(this).data("type");if(e(this).parent().children(":radio").attr("checked",!1),e(this).prev(":radio").attr("checked",!0),void 0!==n)switch(n){case"left":i.show(),a.hide();break;case"right":a.show(),i.hide();break;case"double":i.show(),a.show();break;default:i.hide(),a.hide()}})}),o.each(function(){var t=e(this).data("val"),i=e(this).data("min"),a=e(this).data("max"),n=e(this).data("step"),l=e(this).data("labels");e(this).slider({value:t,min:i,max:a,range:"min",step:n,create:function(){e(this).find(".ui-slider-handle").text(e(this).slider("value"))},slide:function(t,i){e(this).find("input").val(i.value),e(this).find(".ui-slider-handle").text(i.value),e(this).siblings(".feedback").find("strong").text(i.value+l)}})}),r.each(function(t,i){var a=CodeMirror.fromTextArea(i,{lineNumbers:1,mode:"javascript",showCursorWhenSelecting:!0});e(i).data("codemirrorInstance",a)}),e(document).on("click",".yith-plugin-fw-select-all",function(){e("#"+e(this).data("select-id")).find("option").prop("selected",!0).trigger("change")}),e(document).on("click",".yith-plugin-fw-deselect-all",function(){e("#"+e(this).data("select-id")).find("option").prop("selected",!1).trigger("change")}),d.each(function(){var t=e(this),i=t.find(".yit-icons-manager-icon-preview").first(),a=t.find(".yit-icons-manager-icon-text");t.on("click",".yit-icons-manager-list li",function(n){var l=e(n.target).closest("li"),s=l.data("font"),o=l.data("icon"),r=l.data("key"),d=l.data("name");i.attr("data-font",s),i.attr("data-icon",o),i.attr("data-key",r),i.attr("data-name",d),a.val(s+":"+d),t.find(".yit-icons-manager-list li").removeClass("active"),l.addClass("active")}),t.on("click",".yit-icons-manager-action-set-default",function(){t.find(".yit-icons-manager-list li.default").trigger("click")})}),e(document).on("click",".yith-plugin-fw-select-images__item",function(){var t=e(this),i=t.data("key"),a=t.closest(".yith-plugin-fw-select-images__wrapper"),n=a.find(".yith-plugin-fw-select-images__item"),l=a.find("select").first();l.length&&(l.val(i).trigger("yith_select_images_value_changed"),n.removeClass("yith-plugin-fw-select-images__item--selected"),t.addClass("yith-plugin-fw-select-images__item--selected"))}),e(document.body).trigger("wc-enhanced-select-init"),e(document).find(".ui-sortable .yith-toggle-elements").sortable({cursor:"move",axis:"y",scrollSensitivity:40,forcePlaceholderSize:!0,helper:"clone",stop:function(t,i){var a=jQuery(".ui-sortable-handle"),n=0,l=new Array;for(n=0;n<a.length;n++)l[n]=e(a[n]).data("item_key");l.length>0&&e(this).closest(".toggle-element").saveToggleElement(null,l)}}),e(document.body).trigger("yith-framework-enhanced-select-init")}).trigger("yith_fields_init"),e(document).on("click",".yith-plugin-fw-onoff-container span",function(){var t=e(this).prev("input");t.prop("checked")?t.prop("checked",!1).attr("value","no").removeClass("onoffchecked"):t.prop("checked",!0).attr("value","yes").addClass("onoffchecked"),t.change()}),e.fn.saveToggleElement=function(t,i){var a=e(this),n="yith_plugin_fw_save_toggle_element",l=a.serializeToggleElement(),s=a.find(".yith-toggle_wrapper"),o=s.attr("id"),r=e.urlParam("tab");l.append("security",s.data("nonce")),void 0!==i&&i.length>0&&l.append("yith_toggle_elements_order_keys",i),a.closest(".metaboxes-tab.yith-plugin-ui").length?(n="yith_plugin_fw_save_toggle_element_metabox",post_id=e(this).closest("form#post").find("#post_ID").val(),yit_metaboxes_nonce=e(this).closest("form#post").find("#yit_metaboxes_nonce").val(),metabox_tab=e(this).closest(".tabs-panel").attr("id"),url=yith_framework_fw_fields.ajax_url+"?action="+n+"&post_ID="+post_id+"&yit_metaboxes_nonce="+yit_metaboxes_nonce+"&toggle_id="+o+"&metabox_tab="+metabox_tab):url=yith_framework_fw_fields.admin_url+"?action="+n+"&tab="+r+"&toggle_id="+o,e.ajax({type:"POST",url:url,data:l,contentType:!1,processData:!1,success:function(i){t&&t.removeClass("show"),e(document).trigger("yith_save_toggle_element_done",[i,a])}})},e.fn.serializeToggleElement=function(){var t=e(this),i=new FormData,a=e(t).find(":input").serializeArray();return e.each(a,function(e,t){el_name=t.name,i.append(t.name,t.value)}),i},e.fn.formatToggleTitle=function(){var t=e(this),i=t.find(":input"),a=t.find("span.title").data("title_format"),n=t.find(".subtitle").data("subtitle_format"),l=new RegExp("[^%%]+(?=[%%])","g");if(void 0!==a)var s=a.match(l);if(void 0!==n)var o=n.match(l);e.each(i,function(t,i){void 0!==e(i).attr("id")&&($field_id=e(i).attr("id"),$field_array=$field_id.split("_"),$field_array.pop(),$field_id=$field_array.join("_"),$field_val=e(i).val(),null!=s&&void 0!==s&&-1!==s.indexOf($field_id)&&(a=a.replace("%%"+$field_id+"%%",$field_val)),null!=o&&void 0!==o&&-1!==o.indexOf($field_id)&&(n=n.replace("%%"+$field_id+"%%",$field_val)))}),""!==a&&t.find("span.title").html(a),""!==n&&t.find(".subtitle").html(n),e(document).trigger("yith-toggle-element-item-title",[t])},e.urlParam=function(e){var t=new RegExp("[?&]"+e+"=([^&#]*)").exec(window.location.search);return null!==t&&(t[1]||0)},e(document).on("click",".yith-toggle-title",function(t){var i=e(t.target),a=i.closest(".yith-toggle-row"),n=a.find(".yith-toggle-content");if(i.hasClass("yith-plugin-fw-onoff")||i.hasClass("yith-icon-drag"))return!1;a.is(".yith-toggle-row-opened")?n.slideUp(400):n.slideDown(400),a.toggleClass("yith-toggle-row-opened")}),e(document).on("click",".yith-add-box-button",function(t){t.preventDefault();var i=e(this),a=i.data("box_id"),n=i.data("closed_label"),l=i.data("opened_label"),s=i.closest(".yith-toggle_wrapper").attr("id");template=wp.template("yith-toggle-element-add-box-content-"+s),""!==a&&(e("#"+a).html(template({index:"box_id"})).slideToggle(),""!==n&&(i.html()===n?i.html(l).removeClass("closed"):i.html(n).addClass("closed")),e(document).trigger("yith_fields_init"),e(document).trigger("yith-add-box-button-toggle",[i]))}),e(document).on("click",".yith-add-box-buttons .yith-save-button",function(t){t.preventDefault();var i=e(this).parents(".yith-add-box"),a=e(this).closest(".yith-toggle_wrapper").attr("id"),n=i.find(".spinner"),l=e(this).parents(".toggle-element"),s=i.find(":input"),o=l.find(".yith-toggle-row").length,r=e('<input type="hidden">');r.val(o),e(document).trigger("yith-toggle-change-counter",[r,i]),o=r.val();var d=wp.template("yith-toggle-element-item-"+a),c=e(d({index:o}));n.addClass("show"),e.each(s,function(t,i){void 0!==e(i).attr("id")&&($field_id=e(i).attr("id"),$field_val=e(i).val(),"radio"==e(i).attr("type")?($field_id=$field_id.replace("new_",""),$field_id=$field_id.replace("-"+$field_val,""),$field_id=$field_id+"_dataindex-"+$field_val):$field_id=$field_id.replace("new_","")+"_"+o,e(i).is(":checked")&&e(c).find("#"+$field_id).prop("checked",!0),(e(i).hasClass("yith-post-search")||e(i).hasClass("yith-term-search"))&&e(c).find("#"+$field_id).html(e("#"+e(i).attr("id")).html()),e(c).find("#"+$field_id).val($field_val))}),e(c).formatToggleTitle();var u=e('<input type="hidden">').val("yes");e(document).trigger("yith-toggle-element-item-before-add",[i,c,u]);setTimeout(function(){if("yes"===u.val()){e(l).find(".yith-toggle-elements").append(c),e(i).find(".yith-plugin-fw-datepicker").datepicker("destroy"),e(i).html(""),e(i).prev(".yith-add-box-button").trigger("click"),l.saveToggleElement();setTimeout(function(){e(l).find(".highlight").removeClass("highlight")},2e3),e(document).trigger("yith_fields_init")}},1e3)}),e(document).on("click",".yith-toggle-row .yith-save-button",function(t){t.preventDefault();var i=e(this).closest(".toggle-element"),a=e(this).closest(".yith-toggle-row"),n=a.find(".spinner");a.formatToggleTitle();var l=e('<input type="hidden">').val("yes");e(document).trigger("yith-toggle-element-item-before-update",[i,a,l]),"yes"===l.val()&&(n.addClass("show"),i.saveToggleElement(n))}),e(document).on("click",".yith-toggle-row .yith-delete-button",function(t){t.preventDefault();var i=e(this).closest(".toggle-element");e(this).closest(".yith-toggle-row").remove(),i.saveToggleElement()}),e(document).on("click",".yith-toggle-onoff",function(t){t.preventDefault(),e(this).closest(".toggle-element").saveToggleElement()}),e(document).on("click",".yith-plugin-fw-radio input[type=radio]",function(){e(this).closest(".yith-plugin-fw-radio").val(e(this).val()).trigger("change")}),e(document).on("click",".yith-password-eye",function(){var t=e(this),i=e(this).closest(".yith-password-wrapper").find("input");"password"===i.attr("type")?(i.attr("type","text"),t.addClass("yith-password-eye-closed")):(i.attr("type","password"),t.removeClass("yith-password-eye-closed"))}),e(document.body).on("yith-plugin-fw-init-radio",function(){e(".yith-plugin-fw-radio:not(.yith-plugin-fw-radio--initialized)").each(function(){e(this).val(e(this).attr("value")),e(this).addClass("yith-plugin-fw-radio--initialized")})}).trigger("yith-plugin-fw-init-radio"),e(document).on("select2:open",function(t){e(t.target).closest(".yith-plugin-ui").length&&e(".select2-results").closest(".select2-container").addClass("yith-plugin-fw-select2-container")});var t={selectors:{wrapper:".yith-plugin-fw-dimensions",units:{wrapper:".yith-plugin-fw-dimensions__units",single:".yith-plugin-fw-dimensions__unit",value:".yith-plugin-fw-dimensions__unit__value",selectedClass:"yith-plugin-fw-dimensions__unit--selected"},linked:{button:".yith-plugin-fw-dimensions__linked",value:".yith-plugin-fw-dimensions__linked__value",wrapperActiveClass:"yith-plugin-fw-dimensions--linked-active"},dimensions:{number:".yith-plugin-fw-dimensions__dimension__number"}},init:function(){var i=t;e(document).on("click",i.selectors.units.single,i.unitChange),e(document).on("click",i.selectors.linked.button,i.linkedChange),e(document).on("change keyup",i.selectors.dimensions.number,i.numberChange)},unitChange:function(i){var a=e(this).closest(t.selectors.units.single),n=a.closest(t.selectors.units.wrapper),l=n.find(t.selectors.units.single),s=n.find(t.selectors.units.value).first(),o=a.data("value");l.removeClass(t.selectors.units.selectedClass),a.addClass(t.selectors.units.selectedClass),s.val(o)},linkedChange:function(){var i=e(this).closest(t.selectors.linked.button),a=i.closest(t.selectors.wrapper),n=i.find(t.selectors.linked.value);"yes"===n.val()?(a.removeClass(t.selectors.linked.wrapperActiveClass),n.val("no")):(a.addClass(t.selectors.linked.wrapperActiveClass),n.val("yes"),a.find(t.selectors.dimensions.number).first().trigger("change"))},numberChange:function(i){var a=e(this).closest(t.selectors.dimensions.number),n=a.closest(t.selectors.wrapper);n.hasClass(t.selectors.linked.wrapperActiveClass)&&n.find(t.selectors.dimensions.number).val(a.val())}};t.init()}(jQuery);
|
1 |
+
!function(e){e(document).on("yith_fields_init",function(){var t=e(".yith-plugin-fw-datepicker"),i=e(".yith-plugin-fw-colorpicker"),a={imgPreviewHandler:".yith-plugin-fw-upload-img-preview",uploadButtonHandler:".yith-plugin-fw-upload-button",imgUrlHandler:".yith-plugin-fw-upload-img-url",resetButtonHandler:".yith-plugin-fw-upload-button-reset",imgUrl:e(".yith-plugin-fw-upload-img-url")},n=e(".add_media"),l={sliderWrapper:e(".yith-plugin-fw .image-gallery ul.slides-wrapper"),buttonHandler:".yith-plugin-fw .image-gallery-button"},s=e(".yith-plugin-fw-sidebar-layout"),o=e(".yith-plugin-fw .yith-plugin-fw-slider-container .ui-slider-horizontal"),r=e(".codemirror"),d=e(".yit-icons-manager-wrapper");e(".yith-plugin-ui td.forminp-checkbox");t.each(function(){var t=e(this).data();t.showAnim=!1,t.beforeShow=function(e,t){t.dpDiv.addClass("yith-plugin-fw-datepicker-div")},t.onClose=function(e,t){t.dpDiv.removeClass("yith-plugin-fw-datepicker-div")},e(this).datepicker(t)}),i.wpColorPicker({palettes:!1,width:200,mode:"hsl",clear:function(){var t=e(this);t.val(t.data("default-color")),t.change()}}),i.each(function(){var t=e(this).data("variations-label"),i=e(this).closest(".yith-plugin-fw-colorpicker-field-wrapper"),a=e(this).closest(".yith-single-colorpicker"),n=i.find(".wp-picker-input-wrap"),l=a.find(".wp-picker-input-wrap");if(n.length&&i.find("a.wp-color-result").attr("title",t),a.length&&a.find("a.wp-color-result").attr("title",t),!n.find(".wp-picker-clear-custom").length){var s=e("<span/>").attr({"class":"wp-picker-default-custom"});n.find(".wp-picker-default").wrap(s)}l.find(".wp-picker-clear-custom").length||(s=e("<span/>").attr({"class":"wp-picker-default-custom"}),l.find(".wp-picker-default").wrap(s))}),"undefined"!=typeof wp&&"undefined"!=typeof wp.media&&(a.imgUrl.change(function(){var t=e(this).val(),i=new RegExp("(http|ftp|https)://[a-zA-Z0-9@?^=%&:/~+#-_.]*.(gif|jpg|jpeg|png|ico|svg)"),n=e(this).parent().find(a.imgPreviewHandler).first();n.length<1&&(n=e(this).parent().parent().find(a.imgPreviewHandler).first()),i.test(t)?n.html('<img src="'+t+'" style="max-width:100px; max-height:100px;" />'):n.html("")}).trigger("change"),e(document).on("click",a.uploadButtonHandler,function(t){t.preventDefault();var i,n=e(this).attr("id").replace(/-button$/,"");if(i)i.open();else{var l=[new wp.media.controller.Library({library:wp.media.query(),multiple:!1,title:"Choose Image",priority:20,filterable:"uploaded"})];(i=wp.media.frames.downloadable_file=wp.media({title:"Choose Image",library:{type:""},button:{text:"Choose Image"},multiple:!1,states:l})).on("select",function(){var t=i.state().get("selection").first().toJSON();e("#"+n).val(t.url),e("#"+n+"-yith-attachment-id")&&e("#"+n+"-yith-attachment-id").val(t.id),a.imgUrl.trigger("change")}),i.open()}}),e(document).on("click",a.resetButtonHandler,function(t){var i=e(this),n=i.attr("id"),l=i.attr("id").replace(/-button-reset$/,""),s=e("#"+n).data("default");e("#"+l).val(s),a.imgUrl.trigger("change")}));n.on("click",function(){}),"undefined"!=typeof wp&&"undefined"!=typeof wp.media&&(e(document).on("click",l.buttonHandler,function(t){var i=e(this),a=i.closest(".image-gallery"),n=a.find(".image_gallery_ids"),l=n.val(),s=a.find("ul.slides-wrapper"),o=wp.media.frames.image_gallery=wp.media({title:i.data("choose"),button:{text:i.data("update")},states:[new wp.media.controller.Library({title:i.data("choose"),filterable:"all",multiple:!0})]});o.on("select",function(){o.state().get("selection").map(function(e){(e=e.toJSON()).id&&(l=l?l+","+e.id:e.id,s.append('<li class="image" data-attachment_id="'+e.id+'"><img src="'+e.sizes.thumbnail.url+'"/><ul class="actions"><li><a href="#" class="delete" title="'+i.data("delete")+'">x</a></li></ul></li>'))}),n.val(l)}),o.open()}),l.sliderWrapper.each(function(){var t=e(this);t.sortable({items:"li.image",cursor:"move",scrollSensitivity:40,forcePlaceholderSize:!0,forceHelperSize:!1,helper:"clone",opacity:.65,start:function(e,t){t.item.css("background-color","#f6f6f6")},stop:function(e,t){t.item.removeAttr("style")},update:function(i,a){var n="";t.find("li.image").css("cursor","default").each(function(){var t=e(this).attr("data-attachment_id");n=n+t+","}),t.closest(".image-gallery").find(".image_gallery_ids").val(n)}})}),l.sliderWrapper.on("click","a.delete",function(){var t=e(this).closest(".image-gallery"),i=e(this).closest(".image-gallery ul.slides-wrapper"),a=t.find(".image_gallery_ids"),n="";e(this).closest("li.image").remove(),i.find("li.image").css("cursor","default").each(function(){var t=e(this).attr("data-attachment_id");n=n+t+","}),a.val(n)})),s.each(function(){e(this).find("img").on("click",function(){var t=e(this).closest(".yith-plugin-fw-sidebar-layout"),i=t.find(".yith-plugin-fw-sidebar-layout-sidebar-left-container"),a=t.find(".yith-plugin-fw-sidebar-layout-sidebar-right-container"),n=e(this).data("type");if(e(this).parent().children(":radio").attr("checked",!1),e(this).prev(":radio").attr("checked",!0),void 0!==n)switch(n){case"left":i.show(),a.hide();break;case"right":a.show(),i.hide();break;case"double":i.show(),a.show();break;default:i.hide(),a.hide()}})}),o.each(function(){var t=e(this).data("val"),i=e(this).data("min"),a=e(this).data("max"),n=e(this).data("step"),l=e(this).data("labels");e(this).slider({value:t,min:i,max:a,range:"min",step:n,create:function(){e(this).find(".ui-slider-handle").text(e(this).slider("value"))},slide:function(t,i){e(this).find("input").val(i.value),e(this).find(".ui-slider-handle").text(i.value),e(this).siblings(".feedback").find("strong").text(i.value+l)}})}),r.each(function(t,i){var a=CodeMirror.fromTextArea(i,{lineNumbers:1,mode:"javascript",showCursorWhenSelecting:!0});e(i).data("codemirrorInstance",a)}),e(document).on("click",".yith-plugin-fw-select-all",function(){e("#"+e(this).data("select-id")).find("option").prop("selected",!0).trigger("change")}),e(document).on("click",".yith-plugin-fw-deselect-all",function(){e("#"+e(this).data("select-id")).find("option").prop("selected",!1).trigger("change")}),d.each(function(){var t=e(this),i=t.find(".yit-icons-manager-icon-preview").first(),a=t.find(".yit-icons-manager-icon-text");t.on("click",".yit-icons-manager-list li",function(n){var l=e(n.target).closest("li"),s=l.data("font"),o=l.data("icon"),r=l.data("key"),d=l.data("name");i.attr("data-font",s),i.attr("data-icon",o),i.attr("data-key",r),i.attr("data-name",d),a.val(s+":"+d),t.find(".yit-icons-manager-list li").removeClass("active"),l.addClass("active")}),t.on("click",".yit-icons-manager-action-set-default",function(){t.find(".yit-icons-manager-list li.default").trigger("click")})}),e(document).on("click",".yith-plugin-fw-select-images__item",function(){var t=e(this),i=t.data("key"),a=t.closest(".yith-plugin-fw-select-images__wrapper"),n=a.find(".yith-plugin-fw-select-images__item"),l=a.find("select").first();l.length&&(l.val(i).trigger("yith_select_images_value_changed"),n.removeClass("yith-plugin-fw-select-images__item--selected"),t.addClass("yith-plugin-fw-select-images__item--selected"))}),e(document.body).trigger("wc-enhanced-select-init"),e(document).find(".ui-sortable .yith-toggle-elements").sortable({cursor:"move",axis:"y",scrollSensitivity:40,forcePlaceholderSize:!0,helper:"clone",stop:function(t,i){var a=jQuery(".ui-sortable-handle"),n=0,l=new Array;for(n=0;n<a.length;n++)l[n]=e(a[n]).data("item_key");l.length>0&&e(this).closest(".toggle-element").saveToggleElement(null,l)}}),e(document.body).trigger("yith-framework-enhanced-select-init")}).trigger("yith_fields_init"),e(document).on("click",".yith-plugin-fw-onoff-container span",function(){var t=e(this).prev("input");t.prop("checked")?t.prop("checked",!1).attr("value","no").removeClass("onoffchecked"):t.prop("checked",!0).attr("value","yes").addClass("onoffchecked"),t.change()}),e.fn.saveToggleElement=function(t,i){var a=e(this),n="yith_plugin_fw_save_toggle_element",l=a.serializeToggleElement(),s=a.find(".yith-toggle_wrapper"),o=s.attr("id"),r=e.urlParam("tab");l.append("security",s.data("nonce")),void 0!==i&&i.length>0&&l.append("yith_toggle_elements_order_keys",i),a.closest(".metaboxes-tab.yith-plugin-ui").length?(n="yith_plugin_fw_save_toggle_element_metabox",post_id=e(this).closest("form#post").find("#post_ID").val(),yit_metaboxes_nonce=e(this).closest("form#post").find("#yit_metaboxes_nonce").val(),metabox_tab=e(this).closest(".tabs-panel").attr("id"),url=yith_framework_fw_fields.ajax_url+"?action="+n+"&post_ID="+post_id+"&yit_metaboxes_nonce="+yit_metaboxes_nonce+"&toggle_id="+o+"&metabox_tab="+metabox_tab):url=yith_framework_fw_fields.admin_url+"?action="+n+"&tab="+r+"&toggle_id="+o,e.ajax({type:"POST",url:url,data:l,contentType:!1,processData:!1,success:function(i){t&&t.removeClass("show"),e(document).trigger("yith_save_toggle_element_done",[i,a])}})},e.fn.serializeToggleElement=function(){var t=e(this),i=new FormData,a=e(t).find(":input").serializeArray();return e.each(a,function(e,t){el_name=t.name,i.append(t.name,t.value)}),i},e.fn.formatToggleTitle=function(){var t=e(this),i=t.find(":input"),a=t.find("span.title").data("title_format"),n=t.find(".subtitle").data("subtitle_format"),l=new RegExp("[^%%]+(?=[%%])","g");if(void 0!==a)var s=a.match(l);if(void 0!==n)var o=n.match(l);e.each(i,function(t,i){void 0!==e(i).attr("id")&&($field_id=e(i).attr("id"),$field_array=$field_id.split("_"),$field_array.pop(),$field_id=$field_array.join("_"),$field_val=e(i).val(),null!=s&&void 0!==s&&-1!==s.indexOf($field_id)&&(a=a.replace("%%"+$field_id+"%%",$field_val)),null!=o&&void 0!==o&&-1!==o.indexOf($field_id)&&(n=n.replace("%%"+$field_id+"%%",$field_val)))}),""!==a&&t.find("span.title").html(a),""!==n&&t.find(".subtitle").html(n),e(document).trigger("yith-toggle-element-item-title",[t])},e.urlParam=function(e){var t=new RegExp("[?&]"+e+"=([^&#]*)").exec(window.location.search);return null!==t&&(t[1]||0)},e(document).on("click",".yith-toggle-title",function(t){var i=e(t.target),a=i.closest(".yith-toggle-row"),n=a.find(".yith-toggle-content");if(i.hasClass("yith-plugin-fw-onoff")||i.hasClass("yith-icon-drag"))return!1;a.is(".yith-toggle-row-opened")?n.slideUp(400):n.slideDown(400),a.toggleClass("yith-toggle-row-opened")}),e(document).on("click",".yith-add-box-button",function(t){t.preventDefault();var i=e(this),a=i.data("box_id"),n=i.data("closed_label"),l=i.data("opened_label"),s=i.closest(".yith-toggle_wrapper").attr("id");template=wp.template("yith-toggle-element-add-box-content-"+s),""!==a&&(e("#"+a).html(template({index:"box_id"})).slideToggle(),""!==n&&(i.html()===n?i.html(l).removeClass("closed"):i.html(n).addClass("closed")),e(document).trigger("yith_fields_init"),e(document).trigger("yith-add-box-button-toggle",[i]))}),e(document).on("click",".yith-add-box-buttons .yith-save-button",function(t){t.preventDefault();var i=e(this).parents(".yith-add-box"),a=e(this).closest(".yith-toggle_wrapper").attr("id"),n=i.find(".spinner"),l=e(this).parents(".toggle-element"),s=i.find(":input"),o=l.find(".yith-toggle-row").length,r=e('<input type="hidden">');r.val(o),e(document).trigger("yith-toggle-change-counter",[r,i]),o=r.val();var d=wp.template("yith-toggle-element-item-"+a),c=e(d({index:o}));n.addClass("show"),e.each(s,function(t,i){void 0!==e(i).attr("id")&&($field_id=e(i).attr("id"),$field_val=e(i).val(),"radio"==e(i).attr("type")?($field_id=$field_id.replace("new_",""),$field_id=$field_id.replace("-"+$field_val,""),$field_id=$field_id+"_dataindex-"+$field_val):$field_id=$field_id.replace("new_","")+"_"+o,e(i).is(":checked")&&e(c).find("#"+$field_id).prop("checked",!0),(e(i).hasClass("yith-post-search")||e(i).hasClass("yith-term-search"))&&e(c).find("#"+$field_id).html(e("#"+e(i).attr("id")).html()),e(c).find("#"+$field_id).val($field_val))}),e(c).formatToggleTitle();var u=e('<input type="hidden">').val("yes");e(document).trigger("yith-toggle-element-item-before-add",[i,c,u]);setTimeout(function(){if("yes"===u.val()){e(l).find(".yith-toggle-elements").append(c),e(i).find(".yith-plugin-fw-datepicker").datepicker("destroy"),e(i).html(""),e(i).prev(".yith-add-box-button").trigger("click"),l.saveToggleElement();setTimeout(function(){e(l).find(".highlight").removeClass("highlight")},2e3),e(document).trigger("yith_fields_init")}},1e3)}),e(document).on("click",".yith-toggle-row .yith-save-button",function(t){t.preventDefault();var i=e(this).closest(".toggle-element"),a=e(this).closest(".yith-toggle-row"),n=a.find(".spinner");a.formatToggleTitle();var l=e('<input type="hidden">').val("yes");e(document).trigger("yith-toggle-element-item-before-update",[i,a,l]),"yes"===l.val()&&(n.addClass("show"),i.saveToggleElement(n))}),e(document).on("click",".yith-toggle-row .yith-delete-button",function(t){t.preventDefault();var i=e(this).closest(".toggle-element");e(this).closest(".yith-toggle-row").remove(),i.saveToggleElement()}),e(document).on("click",".yith-toggle-onoff",function(t){t.preventDefault(),e(this).closest(".toggle-element").saveToggleElement()}),e(document).on("click",".yith-plugin-fw-radio input[type=radio]",function(){var t=e(this).closest(".yith-plugin-fw-radio"),i=e(this).val();t.val(i).data("value",i).trigger("change")}),e(document.body).on("yith-plugin-fw-init-radio",function(){e(".yith-plugin-fw-radio:not(.yith-plugin-fw-radio--initialized)").each(function(){e(this).val(e(this).data("value")),e(this).addClass("yith-plugin-fw-radio--initialized")})}).trigger("yith-plugin-fw-init-radio"),e(document).on("click",".yith-password-eye",function(){var t=e(this),i=e(this).closest(".yith-password-wrapper").find("input");"password"===i.attr("type")?(i.attr("type","text"),t.addClass("yith-password-eye-closed")):(i.attr("type","password"),t.removeClass("yith-password-eye-closed"))}),e(document).on("select2:open",function(t){e(t.target).closest(".yith-plugin-ui").length&&e(".select2-results").closest(".select2-container").addClass("yith-plugin-fw-select2-container")});var t={selectors:{wrapper:".yith-plugin-fw-dimensions",units:{wrapper:".yith-plugin-fw-dimensions__units",single:".yith-plugin-fw-dimensions__unit",value:".yith-plugin-fw-dimensions__unit__value",selectedClass:"yith-plugin-fw-dimensions__unit--selected"},linked:{button:".yith-plugin-fw-dimensions__linked",value:".yith-plugin-fw-dimensions__linked__value",wrapperActiveClass:"yith-plugin-fw-dimensions--linked-active"},dimensions:{number:".yith-plugin-fw-dimensions__dimension__number"}},init:function(){var i=t;e(document).on("click",i.selectors.units.single,i.unitChange),e(document).on("click",i.selectors.linked.button,i.linkedChange),e(document).on("change keyup",i.selectors.dimensions.number,i.numberChange)},unitChange:function(i){var a=e(this).closest(t.selectors.units.single),n=a.closest(t.selectors.units.wrapper),l=n.find(t.selectors.units.single),s=n.find(t.selectors.units.value).first(),o=a.data("value");l.removeClass(t.selectors.units.selectedClass),a.addClass(t.selectors.units.selectedClass),s.val(o)},linkedChange:function(){var i=e(this).closest(t.selectors.linked.button),a=i.closest(t.selectors.wrapper),n=i.find(t.selectors.linked.value);"yes"===n.val()?(a.removeClass(t.selectors.linked.wrapperActiveClass),n.val("no")):(a.addClass(t.selectors.linked.wrapperActiveClass),n.val("yes"),a.find(t.selectors.dimensions.number).first().trigger("change"))},numberChange:function(i){var a=e(this).closest(t.selectors.dimensions.number),n=a.closest(t.selectors.wrapper);n.hasClass(t.selectors.linked.wrapperActiveClass)&&n.find(t.selectors.dimensions.number).val(a.val())}};t.init()}(jQuery);
|
plugin-fw/assets/js/yith-gutenberg.js
CHANGED
@@ -3,6 +3,7 @@
|
|
3 |
var __ = wp.i18n.__,
|
4 |
el = wp.element.createElement,
|
5 |
Fragment = wp.element.Fragment,
|
|
|
6 |
registerBlockType = wp.blocks.registerBlockType,
|
7 |
RichText = wp.editor.RichText,
|
8 |
BlockControls = wp.editor.BlockControls,
|
3 |
var __ = wp.i18n.__,
|
4 |
el = wp.element.createElement,
|
5 |
Fragment = wp.element.Fragment,
|
6 |
+
PanelBody = wp.components.PanelBody,
|
7 |
registerBlockType = wp.blocks.registerBlockType,
|
8 |
RichText = wp.editor.RichText,
|
9 |
BlockControls = wp.editor.BlockControls,
|
plugin-fw/assets/js/yith-gutenberg.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
!function(e){wp.i18n.__;var t=wp.element.createElement,o=wp.element.Fragment,n=wp.blocks.registerBlockType,c=(wp.editor.RichText,wp.editor.BlockControls,wp.editor.InspectorControls),r=(wp.editor.AlignmentToolbar,wp.components,wp.element.RawHTML),a=wp.components.SelectControl,s=wp.components.ToggleControl,
|
1 |
+
!function(e){wp.i18n.__;var t=wp.element.createElement,o=wp.element.Fragment,n=(wp.components.PanelBody,wp.blocks.registerBlockType),c=(wp.editor.RichText,wp.editor.BlockControls,wp.editor.InspectorControls),r=(wp.editor.AlignmentToolbar,wp.components,wp.element.RawHTML),a=wp.components.SelectControl,s=wp.components.ToggleControl,l=wp.components.CheckboxControl,i=wp.components.RangeControl,p=wp.components.ColorPicker,u=wp.components.RadioControl,d=wp.components.TextControl,h=wp.components.TextareaControl;const C=t("svg",{width:22,height:22},t("path",{d:"M 18.24 7.628 C 17.291 8.284 16.076 8.971 14.587 9.688 C 15.344 7.186 15.765 4.851 15.849 2.684 C 15.912 0.939 15.133 0.045 13.514 0.003 C 11.558 -0.06 10.275 1.033 9.665 3.284 C 10.007 3.137 10.359 3.063 10.723 3.063 C 11.021 3.063 11.267 3.184 11.459 3.426 C 11.651 3.668 11.736 3.947 11.715 4.262 C 11.695 5.082 11.276 5.961 10.46 6.896 C 9.644 7.833 8.918 8.3 8.282 8.3 C 7.837 8.3 7.625 7.922 7.646 7.165 C 7.667 6.765 7.804 5.955 8.056 4.735 C 8.287 3.579 8.403 2.801 8.403 2.401 C 8.403 1.707 8.224 1.144 7.867 0.713 C 7.509 0.282 6.994 0.098 6.321 0.161 C 5.858 0.203 5.175 0.624 4.27 1.422 C 3.596 2.035 2.923 2.644 2.25 3.254 L 2.976 4.106 C 3.564 3.664 3.922 3.443 4.048 3.443 C 4.448 3.443 4.637 3.717 4.617 4.263 C 4.617 4.306 4.427 4.968 4.049 6.251 C 3.671 7.534 3.471 8.491 3.449 9.122 C 3.407 9.985 3.565 10.647 3.924 11.109 C 4.367 11.677 5.106 11.919 6.142 11.835 C 7.366 11.751 8.591 11.298 9.816 10.479 C 10.323 10.142 10.808 9.753 11.273 9.311 C 11.105 10.153 10.905 10.868 10.673 11.457 C 8.402 12.487 6.762 13.37 5.752 14.107 C 4.321 15.137 3.554 16.241 3.449 17.419 C 3.259 19.459 4.29 20.479 6.541 20.479 C 8.055 20.479 9.517 19.554 10.926 17.703 C 12.125 16.126 13.166 14.022 14.049 11.394 C 15.578 10.635 16.87 9.892 17.928 9.164 C 17.894 9.409 18.319 7.308 18.24 7.628 Z M 7.393 16.095 C 7.056 16.095 6.898 15.947 6.919 15.653 C 6.961 15.106 7.908 14.38 9.759 13.476 C 8.791 15.221 8.002 16.095 7.393 16.095 Z"}));function g(o,n,c){var a="",s="";if("undefined"!=typeof n.callback&&"function"==typeof e[n.callback])a=e[n.callback](o,n);else{var l="["+n.shortcode_name;e.each(o.attributes,function(e,t){if("className"!=e){l+=" "+e+"=";var o=n.attributes[e].remove_quotes;l+=1==o?t:'"'+t+'"'}}),l+="]";var i=md5(l);s='<span class="yith_block_'+i+'">'+l+"</span>","edit"==c&&0!=n.do_shortcode&&function(t){var o=null;return e(document).trigger("yith_plugin_fw_gutenberg_before_do_shortcode",[l,t]),e.ajax({async:!0,url:yith_gutenberg_ajax.ajaxurl,method:"post",data:{action:"yith_plugin_fw_gutenberg_do_shortcode",shortcode:l},success:function(n){""!=(o=n)&&(e(".yith_block_"+t).html(o),e(document).trigger("yith_plugin_fw_gutenberg_success_do_shortcode",[l,t,o]))}}),e(document).trigger("yith_plugin_fw_gutenberg_after_do_shortcode",[l,t,o]),o}(i),a=t(r,null,s)}return a}function b(e,t,o,n){var c={};return"colorpicker"!=n&&"color"!=n||(e=e.hex),c[t]=e,o.setAttributes(c),o}e.each(yith_gutenberg,function(r,f){n("yith/"+r,{title:f.title,description:f.description,category:f.category,attributes:f.attributes,icon:"undefined"!=typeof f.icon?f.icon:C,keywords:f.keywords,edit:function(n){var r=new Array;return e.each(f.attributes,function(e,o){var c=null,C=o.blocktype;if(void 0!==C){switch(C){case"select":c=a;break;case"text":c=d;break;case"textarea":c=h;break;case"toggle":c=s;break;case"checkbox":c=l;break;case"number":case"range":c=i;break;case"color":case"colorpicker":c=p;break;case"radio":c=u}if(null!=c){var g=helpMessageUncheked="";"undefined"!=typeof o.helps&&"undefined"!=typeof o.helps.checked&&"undefined"!=typeof o.helps.unchecked?(g=o.helps.checked,helpMessageUncheked=o.helps.unchecked):"undefined"!=typeof o.help&&(g=helpMessageUncheked=o.help),r.push(t(c,{value:n.attributes[e],options:o.options,label:o.label,checked:n.attributes[e],selected:n.attributes[e],help:n.attributes[e]?g:helpMessageUncheked,disableAlpha:o.disableAlpha,min:o.min,max:o.max,multiple:o.multiple,onChange:function(t,o=e){n=b(t,o,n,C)},onChangeComplete:function(t,o=e){n=b(t,o,n,C)}}))}}}),sc=g(n,f,"edit"),[t(o,null,t(c,null,r),sc)]},save:function(e){return g(e,f,"save")}})})}(jQuery);
|
plugin-fw/init.php
CHANGED
@@ -1,13 +1,13 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
* Framework Name: YIT Plugin Framework
|
4 |
-
* Version: 3.4.
|
5 |
* Author: YITH
|
6 |
* Text Domain: yith-plugin-fw
|
7 |
* Domain Path: /languages/
|
8 |
*
|
9 |
* @author Your Inspiration Themes
|
10 |
-
* @version 3.4.
|
11 |
*/
|
12 |
/**
|
13 |
* This file belongs to the YIT Plugin Framework.
|
1 |
<?php
|
2 |
/**
|
3 |
* Framework Name: YIT Plugin Framework
|
4 |
+
* Version: 3.4.29
|
5 |
* Author: YITH
|
6 |
* Text Domain: yith-plugin-fw
|
7 |
* Domain Path: /languages/
|
8 |
*
|
9 |
* @author Your Inspiration Themes
|
10 |
+
* @version 3.4.29
|
11 |
*/
|
12 |
/**
|
13 |
* This file belongs to the YIT Plugin Framework.
|
plugin-fw/languages/yith-plugin-fw-el.mo
CHANGED
Binary file
|
plugin-fw/languages/yith-plugin-fw-el.po
CHANGED
@@ -4,15 +4,15 @@ msgid ""
|
|
4 |
msgstr ""
|
5 |
"Project-Id-Version: YITH Plugin Starter 1.0.0 Plugin FW\n"
|
6 |
"Report-Msgid-Bugs-To: YITH <plugins@yithemes.com>\n"
|
7 |
-
"POT-Creation-Date: 2020-
|
8 |
-
"PO-Revision-Date: 2020-
|
9 |
"Last-Translator: \n"
|
10 |
"Language-Team: Your Inspiration Themes <info@yithemes.com>\n"
|
11 |
"Language: el_GR\n"
|
12 |
"MIME-Version: 1.0\n"
|
13 |
"Content-Type: text/plain; charset=UTF-8\n"
|
14 |
"Content-Transfer-Encoding: 8bit\n"
|
15 |
-
"X-Generator: Poedit 2.
|
16 |
"X-Poedit-KeywordsList: __;_e;_x:1,2c;_ex:1,2c;_n:1,2;_nx:1,2,4c;_n_noop:1,2;"
|
17 |
"_nx_noop:1,2,3c;esc_attr__;esc_html__;esc_attr_e;esc_html_e;esc_attr_x:1,2c;"
|
18 |
"esc_html_x:1,2c;_x;_ex\n"
|
@@ -22,6 +22,30 @@ msgstr ""
|
|
22 |
"X-Textdomain-Support: yes\n"
|
23 |
"X-Poedit-SearchPath-0: .\n"
|
24 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
25 |
#: lib/yit-cpt-unlimited.php:462 lib/yit-cpt-unlimited.php:576
|
26 |
#: lib/yit-cpt-unlimited.php:721 lib/yit-cpt-unlimited.php:1636
|
27 |
msgid "Add %s"
|
@@ -202,7 +226,7 @@ msgstr "Προσθήκη %s από εικόνες"
|
|
202 |
msgid "Upload multiple files"
|
203 |
msgstr "Ανέβασμα πολλαπλών αρχείων"
|
204 |
|
205 |
-
#: lib/yit-plugin-panel-wc.php:
|
206 |
msgid "The changes you have made will be lost if you leave this page."
|
207 |
msgstr ""
|
208 |
"Οι αλλαγές που έχετε δημιουργήσει θα χαθούν αν αφήσετε αυτήν την σελίδα."
|
@@ -215,12 +239,12 @@ msgstr "Ρυθμίσεις Προσθέτου"
|
|
215 |
msgid "How to install premium version"
|
216 |
msgstr "Πώς να εγκαταστήσετε την προηγμένη έκδοση"
|
217 |
|
218 |
-
#: lib/yit-plugin-panel.php:
|
219 |
#: templates/panel/woocommerce/woocommerce-form.php:14
|
220 |
msgid "Save Changes"
|
221 |
msgstr "Αποθήκευση Αλλαγών"
|
222 |
|
223 |
-
#: lib/yit-plugin-panel.php:
|
224 |
#: templates/panel/woocommerce/woocommerce-form.php:17
|
225 |
msgid ""
|
226 |
"If you continue with this action, you will reset all options in this page."
|
@@ -228,70 +252,70 @@ msgstr ""
|
|
228 |
"Αν συνεχίσετε με αυτή την ενέργεια θα επαναφέρετε όλες τις επιλογές στη "
|
229 |
"σελίδα."
|
230 |
|
231 |
-
#: lib/yit-plugin-panel.php:
|
232 |
msgid "Reset to default"
|
233 |
msgstr "Επαναφορά σε προεπιλεγμένο"
|
234 |
|
235 |
-
#: lib/yit-plugin-panel.php:
|
236 |
#: templates/panel/woocommerce/woocommerce-form.php:21
|
237 |
msgid "Are you sure?"
|
238 |
msgstr "Είστε σίγουρος;"
|
239 |
|
240 |
-
#: lib/yit-plugin-panel.php:
|
241 |
msgid ""
|
242 |
"The element you have entered already exists. Please, enter another name."
|
243 |
msgstr "Το στοιχείο που εισάγατε υπάρχει ήδη. Παρακαλώ, εισάγετε άλλο όνομα."
|
244 |
|
245 |
-
#: lib/yit-plugin-panel.php:
|
246 |
msgid "Settings saved"
|
247 |
msgstr "Ρυθμίσεις αποθηκεύτηκαν"
|
248 |
|
249 |
-
#: lib/yit-plugin-panel.php:
|
250 |
msgid "Settings reset"
|
251 |
msgstr "Επαναφορά ρυθμίσεων"
|
252 |
|
253 |
-
#: lib/yit-plugin-panel.php:
|
254 |
msgid "Element deleted correctly."
|
255 |
msgstr "Το στοιχείο διαγράφηκε επιτυχώς."
|
256 |
|
257 |
-
#: lib/yit-plugin-panel.php:
|
258 |
msgid "Element updated correctly."
|
259 |
msgstr "Το στοιχείο αναβαθμίστηκε επιτυχώς."
|
260 |
|
261 |
-
#: lib/yit-plugin-panel.php:
|
262 |
msgid "Database imported correctly."
|
263 |
msgstr "Επιτυχής εισαγωγή βάσης δεδομένων."
|
264 |
|
265 |
-
#: lib/yit-plugin-panel.php:
|
266 |
msgid "An error has occurred during import. Please try again."
|
267 |
msgstr "Παρουσιάστηκε σφάλμα κατά την εισαγωγή. Παρακαλώ προσπαθήστε ξανά."
|
268 |
|
269 |
-
#: lib/yit-plugin-panel.php:
|
270 |
msgid "The added file is not valid."
|
271 |
msgstr "Το προστιθέμενο αρχείο δεν είναι έγκυρο."
|
272 |
|
273 |
-
#: lib/yit-plugin-panel.php:
|
274 |
msgid "Sorry, import is disabled."
|
275 |
msgstr "Συγνώμη, η εισαγωγή είναι απενεργοποιημένη."
|
276 |
|
277 |
-
#: lib/yit-plugin-panel.php:
|
278 |
msgid "Sorting successful."
|
279 |
msgstr "Διαλογή επιτυχής."
|
280 |
|
281 |
-
#: lib/yit-plugin-panel.php:
|
282 |
msgid "We need your support"
|
283 |
msgstr "Χρειαζόμαστε την υποστήριξή σας"
|
284 |
|
285 |
-
#: lib/yit-plugin-panel.php:
|
286 |
msgid "to keep updating and improving the plugin. Please,"
|
287 |
msgstr ""
|
288 |
"για να διατηρήσετε την ενημέρωση και τη βελτίωση του πρόσθετου. Παρακαλώ,"
|
289 |
|
290 |
-
#: lib/yit-plugin-panel.php:
|
291 |
msgid "help us by leaving a five-star rating"
|
292 |
msgstr "βοηθήστε μας αφήνοντας μια βαθμολογία πέντε αστέρων"
|
293 |
|
294 |
-
#: lib/yit-plugin-panel.php:
|
295 |
msgid ":) Thanks!"
|
296 |
msgstr ":) Ευχαριστώ!"
|
297 |
|
@@ -434,13 +458,12 @@ msgstr "Προσοχή!"
|
|
434 |
|
435 |
#. translators: %1$s open link tag, %2$s open link tag
|
436 |
#: lib/yith-system-status.php:334
|
437 |
-
#, fuzzy
|
438 |
msgid ""
|
439 |
"The system check has detected some compatibility issues on your installation."
|
440 |
"%1$sClick here%2$s to know more"
|
441 |
msgstr ""
|
442 |
"Ο έλεγχος συστήματος έχει εντοπίσει κάποια προβλήματα συμβατότητας στην "
|
443 |
-
"εγκατάστασή
|
444 |
|
445 |
#: lib/yith-system-status.php:473
|
446 |
msgid "Enabled"
|
@@ -456,21 +479,18 @@ msgstr "N/A"
|
|
456 |
|
457 |
#. translators: %1$s plugin name, %2$s requirement name
|
458 |
#: lib/yith-system-status.php:506
|
459 |
-
#, fuzzy
|
460 |
msgid "%1$s needs %2$s enabled"
|
461 |
-
msgstr "%s χρειάζεται %s ενεργοποιημένο"
|
462 |
|
463 |
#. translators: %1$s plugin name, %2$s required memory amount
|
464 |
#: lib/yith-system-status.php:509
|
465 |
-
#, fuzzy
|
466 |
msgid "%1$s needs at least %2$s of available memory"
|
467 |
-
msgstr "%s χρειάζεται τουλάχιστον %s διαθέσιμης μνήμης"
|
468 |
|
469 |
#. translators: %1$s plugin name, %2$s version number
|
470 |
#: lib/yith-system-status.php:512
|
471 |
-
#, fuzzy
|
472 |
msgid "%1$s needs at least %2$s version"
|
473 |
-
msgstr "%s χρειάζεται τουλάχιστον %s έκδοση"
|
474 |
|
475 |
#: lib/yith-system-status.php:537
|
476 |
msgid ""
|
@@ -485,15 +505,13 @@ msgid "Contact your hosting company in order to update it."
|
|
485 |
msgstr "Επικοινωνήστε με την εταιρεία hosting σας για να αναβαθμίσετε."
|
486 |
|
487 |
#: lib/yith-system-status.php:545
|
488 |
-
#, fuzzy
|
489 |
msgid "Contact your hosting company in order to install it."
|
490 |
-
msgstr "Επικοινωνήστε με την εταιρεία hosting σας για να ενεργοποιήσετε."
|
491 |
|
492 |
#. translators: %1$s code, %2$s file name
|
493 |
#: lib/yith-system-status.php:552
|
494 |
-
#, fuzzy
|
495 |
msgid "Remove %1$s from %2$s file"
|
496 |
-
msgstr "Αφαίρεση %s από αρχείο %s"
|
497 |
|
498 |
#: lib/yith-system-status.php:560
|
499 |
msgid "Contact your hosting company in order to enable it."
|
@@ -501,13 +519,12 @@ msgstr "Επικοινωνήστε με την εταιρεία hosting σας
|
|
501 |
|
502 |
#. translators: %1$s opening link tag, %2$s closing link tag
|
503 |
#: lib/yith-system-status.php:564 lib/yith-system-status.php:588
|
504 |
-
#, fuzzy
|
505 |
msgid ""
|
506 |
"Read more %1$shere%2$s or contact your hosting company in order to increase "
|
507 |
"it."
|
508 |
msgstr ""
|
509 |
-
"Μάθετε περισσότερα %s
|
510 |
-
"να το βελτιώσετε."
|
511 |
|
512 |
#. translators: %s recommended memory amount
|
513 |
#: lib/yith-system-status.php:585
|
@@ -520,14 +537,13 @@ msgstr ""
|
|
520 |
|
521 |
#. translators: %1$s TLS label, %2$s cURL label
|
522 |
#: lib/yith-system-status.php:593
|
523 |
-
#, fuzzy
|
524 |
msgid ""
|
525 |
"The system check cannot determine which %1$s version is installed because "
|
526 |
"%2$s module is disabled. Ask your hosting company to enable it."
|
527 |
msgstr ""
|
528 |
-
"
|
529 |
-
"το άρθρωμα
|
530 |
-
"
|
531 |
|
532 |
#. translators: %1$s TLS label
|
533 |
#: lib/yith-system-status.php:596
|
@@ -535,6 +551,9 @@ msgid ""
|
|
535 |
"The system check cannot determine which %1$s version is installed due to a "
|
536 |
"connection issue between your site and our server."
|
537 |
msgstr ""
|
|
|
|
|
|
|
538 |
|
539 |
#: templates/fields/ajax-customers.php:57
|
540 |
msgid "Search Customers"
|
@@ -672,11 +691,11 @@ msgstr "Σύστημα Πληροφοριών YITH"
|
|
672 |
|
673 |
#: templates/sysinfo/system-information-panel.php:50
|
674 |
msgid "WP debug.log file"
|
675 |
-
msgstr ""
|
676 |
|
677 |
#: templates/sysinfo/system-information-panel.php:54
|
678 |
msgid "PHP error_log file"
|
679 |
-
msgstr ""
|
680 |
|
681 |
#: templates/sysinfo/system-information-panel.php:59
|
682 |
#: templates/sysinfo/system-information-panel.php:83
|
@@ -697,15 +716,15 @@ msgstr "Διεύθυνση IP Παραγωγής"
|
|
697 |
|
698 |
#: templates/sysinfo/system-information-panel.php:120
|
699 |
msgid "Defined WP_CACHE"
|
700 |
-
msgstr ""
|
701 |
|
702 |
#: templates/sysinfo/system-information-panel.php:123
|
703 |
msgid "Yes"
|
704 |
-
msgstr ""
|
705 |
|
706 |
#: templates/sysinfo/system-information-panel.php:123
|
707 |
msgid "No"
|
708 |
-
msgstr ""
|
709 |
|
710 |
#: templates/sysinfo/system-information-panel.php:159
|
711 |
msgid "Show full PHPInfo"
|
@@ -713,7 +732,7 @@ msgstr "Πλήρης εμφάνιση PHPInfo"
|
|
713 |
|
714 |
#: templates/sysinfo/system-information-panel.php:167
|
715 |
msgid "Show log files"
|
716 |
-
msgstr ""
|
717 |
|
718 |
#: yit-plugin.php:194
|
719 |
msgid "License"
|
@@ -800,27 +819,27 @@ msgstr "YITH"
|
|
800 |
#: templates/fields/dimensions.php:16
|
801 |
msgctxt "Position in the \"Dimensions\" field"
|
802 |
msgid "Top"
|
803 |
-
msgstr ""
|
804 |
|
805 |
#: templates/fields/dimensions.php:17
|
806 |
msgctxt "Position in the \"Dimensions\" field"
|
807 |
msgid "Right"
|
808 |
-
msgstr ""
|
809 |
|
810 |
#: templates/fields/dimensions.php:18
|
811 |
msgctxt "Position in the \"Dimensions\" field"
|
812 |
msgid "Bottom"
|
813 |
-
msgstr ""
|
814 |
|
815 |
#: templates/fields/dimensions.php:19
|
816 |
msgctxt "Position in the \"Dimensions\" field"
|
817 |
msgid "Left"
|
818 |
-
msgstr ""
|
819 |
|
820 |
#: templates/fields/dimensions.php:117
|
821 |
msgctxt "Tooltip in the \"Dimensions\" field"
|
822 |
msgid "Link values together"
|
823 |
-
msgstr ""
|
824 |
|
825 |
#: templates/fields/onoff.php:24
|
826 |
msgctxt "YES/NO button: use MAX 3 characters!"
|
4 |
msgstr ""
|
5 |
"Project-Id-Version: YITH Plugin Starter 1.0.0 Plugin FW\n"
|
6 |
"Report-Msgid-Bugs-To: YITH <plugins@yithemes.com>\n"
|
7 |
+
"POT-Creation-Date: 2020-08-07 14:15:08+00:00\n"
|
8 |
+
"PO-Revision-Date: 2020-08-13 10:05+0100\n"
|
9 |
"Last-Translator: \n"
|
10 |
"Language-Team: Your Inspiration Themes <info@yithemes.com>\n"
|
11 |
"Language: el_GR\n"
|
12 |
"MIME-Version: 1.0\n"
|
13 |
"Content-Type: text/plain; charset=UTF-8\n"
|
14 |
"Content-Transfer-Encoding: 8bit\n"
|
15 |
+
"X-Generator: Poedit 2.3\n"
|
16 |
"X-Poedit-KeywordsList: __;_e;_x:1,2c;_ex:1,2c;_n:1,2;_nx:1,2,4c;_n_noop:1,2;"
|
17 |
"_nx_noop:1,2,3c;esc_attr__;esc_html__;esc_attr_e;esc_html_e;esc_attr_x:1,2c;"
|
18 |
"esc_html_x:1,2c;_x;_ex\n"
|
22 |
"X-Textdomain-Support: yes\n"
|
23 |
"X-Poedit-SearchPath-0: .\n"
|
24 |
|
25 |
+
#: lib/yit-assets.php:102
|
26 |
+
msgid "Clear"
|
27 |
+
msgstr "Καθαρισμός"
|
28 |
+
|
29 |
+
#: lib/yit-assets.php:103
|
30 |
+
msgid "Clear color"
|
31 |
+
msgstr "Καθαρισμός χρώματος"
|
32 |
+
|
33 |
+
#: lib/yit-assets.php:104
|
34 |
+
msgid "Default"
|
35 |
+
msgstr "Προεπιλεγμένο"
|
36 |
+
|
37 |
+
#: lib/yit-assets.php:105
|
38 |
+
msgid "Select default color"
|
39 |
+
msgstr "Επιλογή προεπιλεγμένου χρώματος"
|
40 |
+
|
41 |
+
#: lib/yit-assets.php:106
|
42 |
+
msgid "Select Color"
|
43 |
+
msgstr "Επιλογή Χρώματος"
|
44 |
+
|
45 |
+
#: lib/yit-assets.php:107
|
46 |
+
msgid "Color value"
|
47 |
+
msgstr "Αξία χρώματος"
|
48 |
+
|
49 |
#: lib/yit-cpt-unlimited.php:462 lib/yit-cpt-unlimited.php:576
|
50 |
#: lib/yit-cpt-unlimited.php:721 lib/yit-cpt-unlimited.php:1636
|
51 |
msgid "Add %s"
|
226 |
msgid "Upload multiple files"
|
227 |
msgstr "Ανέβασμα πολλαπλών αρχείων"
|
228 |
|
229 |
+
#: lib/yit-plugin-panel-wc.php:426
|
230 |
msgid "The changes you have made will be lost if you leave this page."
|
231 |
msgstr ""
|
232 |
"Οι αλλαγές που έχετε δημιουργήσει θα χαθούν αν αφήσετε αυτήν την σελίδα."
|
239 |
msgid "How to install premium version"
|
240 |
msgstr "Πώς να εγκαταστήσετε την προηγμένη έκδοση"
|
241 |
|
242 |
+
#: lib/yit-plugin-panel.php:617 lib/yit-plugin-subpanel.php:151
|
243 |
#: templates/panel/woocommerce/woocommerce-form.php:14
|
244 |
msgid "Save Changes"
|
245 |
msgstr "Αποθήκευση Αλλαγών"
|
246 |
|
247 |
+
#: lib/yit-plugin-panel.php:621 lib/yit-plugin-subpanel.php:154
|
248 |
#: templates/panel/woocommerce/woocommerce-form.php:17
|
249 |
msgid ""
|
250 |
"If you continue with this action, you will reset all options in this page."
|
252 |
"Αν συνεχίσετε με αυτή την ενέργεια θα επαναφέρετε όλες τις επιλογές στη "
|
253 |
"σελίδα."
|
254 |
|
255 |
+
#: lib/yit-plugin-panel.php:624 lib/yit-plugin-subpanel.php:156
|
256 |
msgid "Reset to default"
|
257 |
msgstr "Επαναφορά σε προεπιλεγμένο"
|
258 |
|
259 |
+
#: lib/yit-plugin-panel.php:625 lib/yit-plugin-subpanel.php:157
|
260 |
#: templates/panel/woocommerce/woocommerce-form.php:21
|
261 |
msgid "Are you sure?"
|
262 |
msgstr "Είστε σίγουρος;"
|
263 |
|
264 |
+
#: lib/yit-plugin-panel.php:823
|
265 |
msgid ""
|
266 |
"The element you have entered already exists. Please, enter another name."
|
267 |
msgstr "Το στοιχείο που εισάγατε υπάρχει ήδη. Παρακαλώ, εισάγετε άλλο όνομα."
|
268 |
|
269 |
+
#: lib/yit-plugin-panel.php:824
|
270 |
msgid "Settings saved"
|
271 |
msgstr "Ρυθμίσεις αποθηκεύτηκαν"
|
272 |
|
273 |
+
#: lib/yit-plugin-panel.php:825
|
274 |
msgid "Settings reset"
|
275 |
msgstr "Επαναφορά ρυθμίσεων"
|
276 |
|
277 |
+
#: lib/yit-plugin-panel.php:826
|
278 |
msgid "Element deleted correctly."
|
279 |
msgstr "Το στοιχείο διαγράφηκε επιτυχώς."
|
280 |
|
281 |
+
#: lib/yit-plugin-panel.php:827 lib/yit-plugin-panel.php:828
|
282 |
msgid "Element updated correctly."
|
283 |
msgstr "Το στοιχείο αναβαθμίστηκε επιτυχώς."
|
284 |
|
285 |
+
#: lib/yit-plugin-panel.php:829
|
286 |
msgid "Database imported correctly."
|
287 |
msgstr "Επιτυχής εισαγωγή βάσης δεδομένων."
|
288 |
|
289 |
+
#: lib/yit-plugin-panel.php:830
|
290 |
msgid "An error has occurred during import. Please try again."
|
291 |
msgstr "Παρουσιάστηκε σφάλμα κατά την εισαγωγή. Παρακαλώ προσπαθήστε ξανά."
|
292 |
|
293 |
+
#: lib/yit-plugin-panel.php:831
|
294 |
msgid "The added file is not valid."
|
295 |
msgstr "Το προστιθέμενο αρχείο δεν είναι έγκυρο."
|
296 |
|
297 |
+
#: lib/yit-plugin-panel.php:832
|
298 |
msgid "Sorry, import is disabled."
|
299 |
msgstr "Συγνώμη, η εισαγωγή είναι απενεργοποιημένη."
|
300 |
|
301 |
+
#: lib/yit-plugin-panel.php:833
|
302 |
msgid "Sorting successful."
|
303 |
msgstr "Διαλογή επιτυχής."
|
304 |
|
305 |
+
#: lib/yit-plugin-panel.php:1281
|
306 |
msgid "We need your support"
|
307 |
msgstr "Χρειαζόμαστε την υποστήριξή σας"
|
308 |
|
309 |
+
#: lib/yit-plugin-panel.php:1282
|
310 |
msgid "to keep updating and improving the plugin. Please,"
|
311 |
msgstr ""
|
312 |
"για να διατηρήσετε την ενημέρωση και τη βελτίωση του πρόσθετου. Παρακαλώ,"
|
313 |
|
314 |
+
#: lib/yit-plugin-panel.php:1284
|
315 |
msgid "help us by leaving a five-star rating"
|
316 |
msgstr "βοηθήστε μας αφήνοντας μια βαθμολογία πέντε αστέρων"
|
317 |
|
318 |
+
#: lib/yit-plugin-panel.php:1285
|
319 |
msgid ":) Thanks!"
|
320 |
msgstr ":) Ευχαριστώ!"
|
321 |
|
458 |
|
459 |
#. translators: %1$s open link tag, %2$s open link tag
|
460 |
#: lib/yith-system-status.php:334
|
|
|
461 |
msgid ""
|
462 |
"The system check has detected some compatibility issues on your installation."
|
463 |
"%1$sClick here%2$s to know more"
|
464 |
msgstr ""
|
465 |
"Ο έλεγχος συστήματος έχει εντοπίσει κάποια προβλήματα συμβατότητας στην "
|
466 |
+
"εγκατάστασή σας.%1$sΚάντε κλικ εδώ%2$s για να μάθετε περισσότερα"
|
467 |
|
468 |
#: lib/yith-system-status.php:473
|
469 |
msgid "Enabled"
|
479 |
|
480 |
#. translators: %1$s plugin name, %2$s requirement name
|
481 |
#: lib/yith-system-status.php:506
|
|
|
482 |
msgid "%1$s needs %2$s enabled"
|
483 |
+
msgstr "%1$s χρειάζεται %2$s ενεργοποιημένο"
|
484 |
|
485 |
#. translators: %1$s plugin name, %2$s required memory amount
|
486 |
#: lib/yith-system-status.php:509
|
|
|
487 |
msgid "%1$s needs at least %2$s of available memory"
|
488 |
+
msgstr "%1$s χρειάζεται τουλάχιστον %2$s διαθέσιμης μνήμης"
|
489 |
|
490 |
#. translators: %1$s plugin name, %2$s version number
|
491 |
#: lib/yith-system-status.php:512
|
|
|
492 |
msgid "%1$s needs at least %2$s version"
|
493 |
+
msgstr "%1$s χρειάζεται τουλάχιστον %2$s έκδοση"
|
494 |
|
495 |
#: lib/yith-system-status.php:537
|
496 |
msgid ""
|
505 |
msgstr "Επικοινωνήστε με την εταιρεία hosting σας για να αναβαθμίσετε."
|
506 |
|
507 |
#: lib/yith-system-status.php:545
|
|
|
508 |
msgid "Contact your hosting company in order to install it."
|
509 |
+
msgstr "Επικοινωνήστε με την εταιρεία hosting σας για να το ενεργοποιήσετε."
|
510 |
|
511 |
#. translators: %1$s code, %2$s file name
|
512 |
#: lib/yith-system-status.php:552
|
|
|
513 |
msgid "Remove %1$s from %2$s file"
|
514 |
+
msgstr "Αφαίρεση %1$s από αρχείο %2$s"
|
515 |
|
516 |
#: lib/yith-system-status.php:560
|
517 |
msgid "Contact your hosting company in order to enable it."
|
519 |
|
520 |
#. translators: %1$s opening link tag, %2$s closing link tag
|
521 |
#: lib/yith-system-status.php:564 lib/yith-system-status.php:588
|
|
|
522 |
msgid ""
|
523 |
"Read more %1$shere%2$s or contact your hosting company in order to increase "
|
524 |
"it."
|
525 |
msgstr ""
|
526 |
+
"Μάθετε περισσότερα %1$sεδώ%2$s ή επικοινωνήστε με την εταιρεία hosting σας "
|
527 |
+
"για να το βελτιώσετε."
|
528 |
|
529 |
#. translators: %s recommended memory amount
|
530 |
#: lib/yith-system-status.php:585
|
537 |
|
538 |
#. translators: %1$s TLS label, %2$s cURL label
|
539 |
#: lib/yith-system-status.php:593
|
|
|
540 |
msgid ""
|
541 |
"The system check cannot determine which %1$s version is installed because "
|
542 |
"%2$s module is disabled. Ask your hosting company to enable it."
|
543 |
msgstr ""
|
544 |
+
"Το σύστημα δεν μπορεί να καθορίσει ποια %1$s έκδοση έχει εγκατασταθεί γιατί "
|
545 |
+
"το %2$s άρθρωμα είναι απενεργοποιημένο. Ζητήστε από την εταιρεία hosting σας "
|
546 |
+
"να το ενεργοποιήσει."
|
547 |
|
548 |
#. translators: %1$s TLS label
|
549 |
#: lib/yith-system-status.php:596
|
551 |
"The system check cannot determine which %1$s version is installed due to a "
|
552 |
"connection issue between your site and our server."
|
553 |
msgstr ""
|
554 |
+
"Ο έλεγχος συστήματος δεν μπορεί να διευκρινήσει ποια έκδοση %1$s έχει "
|
555 |
+
"εγκατασταθεί λόγω προβλήματος σύνδεσης ανάμεσα στον ιστότοπο σας και τον "
|
556 |
+
"διακομιστή μας."
|
557 |
|
558 |
#: templates/fields/ajax-customers.php:57
|
559 |
msgid "Search Customers"
|
691 |
|
692 |
#: templates/sysinfo/system-information-panel.php:50
|
693 |
msgid "WP debug.log file"
|
694 |
+
msgstr "Αρχείο WP debug.log"
|
695 |
|
696 |
#: templates/sysinfo/system-information-panel.php:54
|
697 |
msgid "PHP error_log file"
|
698 |
+
msgstr "Αρχείο PHP error_log"
|
699 |
|
700 |
#: templates/sysinfo/system-information-panel.php:59
|
701 |
#: templates/sysinfo/system-information-panel.php:83
|
716 |
|
717 |
#: templates/sysinfo/system-information-panel.php:120
|
718 |
msgid "Defined WP_CACHE"
|
719 |
+
msgstr "Καθορισμένο WP_CACHE"
|
720 |
|
721 |
#: templates/sysinfo/system-information-panel.php:123
|
722 |
msgid "Yes"
|
723 |
+
msgstr "Ναι"
|
724 |
|
725 |
#: templates/sysinfo/system-information-panel.php:123
|
726 |
msgid "No"
|
727 |
+
msgstr "Όχι"
|
728 |
|
729 |
#: templates/sysinfo/system-information-panel.php:159
|
730 |
msgid "Show full PHPInfo"
|
732 |
|
733 |
#: templates/sysinfo/system-information-panel.php:167
|
734 |
msgid "Show log files"
|
735 |
+
msgstr "Εμφάνιση αρχείων καταγραφής"
|
736 |
|
737 |
#: yit-plugin.php:194
|
738 |
msgid "License"
|
819 |
#: templates/fields/dimensions.php:16
|
820 |
msgctxt "Position in the \"Dimensions\" field"
|
821 |
msgid "Top"
|
822 |
+
msgstr "Κορυφή"
|
823 |
|
824 |
#: templates/fields/dimensions.php:17
|
825 |
msgctxt "Position in the \"Dimensions\" field"
|
826 |
msgid "Right"
|
827 |
+
msgstr "Δεξιά"
|
828 |
|
829 |
#: templates/fields/dimensions.php:18
|
830 |
msgctxt "Position in the \"Dimensions\" field"
|
831 |
msgid "Bottom"
|
832 |
+
msgstr "Κάτω"
|
833 |
|
834 |
#: templates/fields/dimensions.php:19
|
835 |
msgctxt "Position in the \"Dimensions\" field"
|
836 |
msgid "Left"
|
837 |
+
msgstr "Αριστερά"
|
838 |
|
839 |
#: templates/fields/dimensions.php:117
|
840 |
msgctxt "Tooltip in the \"Dimensions\" field"
|
841 |
msgid "Link values together"
|
842 |
+
msgstr "Συνδέστε αξίες"
|
843 |
|
844 |
#: templates/fields/onoff.php:24
|
845 |
msgctxt "YES/NO button: use MAX 3 characters!"
|
plugin-fw/languages/yith-plugin-fw-es_ES.po
CHANGED
@@ -4,7 +4,7 @@ msgid ""
|
|
4 |
msgstr ""
|
5 |
"Project-Id-Version: YITH Plugin Starter 1.0.0 Plugin FW\n"
|
6 |
"Report-Msgid-Bugs-To: YITH <plugins@yithemes.com>\n"
|
7 |
-
"POT-Creation-Date: 2020-
|
8 |
"PO-Revision-Date: 2020-04-06 10:45+0200\n"
|
9 |
"Last-Translator: \n"
|
10 |
"Language-Team: Your Inspiration Themes <info@yithemes.com>\n"
|
@@ -22,6 +22,33 @@ msgstr ""
|
|
22 |
"X-Textdomain-Support: yes\n"
|
23 |
"X-Poedit-SearchPath-0: .\n"
|
24 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
25 |
#: lib/yit-cpt-unlimited.php:462 lib/yit-cpt-unlimited.php:576
|
26 |
#: lib/yit-cpt-unlimited.php:721 lib/yit-cpt-unlimited.php:1636
|
27 |
msgid "Add %s"
|
@@ -203,7 +230,7 @@ msgstr "Añadir %s desde imágenes"
|
|
203 |
msgid "Upload multiple files"
|
204 |
msgstr "Cargar archivos múltiples"
|
205 |
|
206 |
-
#: lib/yit-plugin-panel-wc.php:
|
207 |
msgid "The changes you have made will be lost if you leave this page."
|
208 |
msgstr "Los cambios que has hecho se perderán si abandonas esta página."
|
209 |
|
@@ -215,83 +242,83 @@ msgstr "Ajustes del plugin"
|
|
215 |
msgid "How to install premium version"
|
216 |
msgstr "Cómo instalar la versión premium"
|
217 |
|
218 |
-
#: lib/yit-plugin-panel.php:
|
219 |
#: templates/panel/woocommerce/woocommerce-form.php:14
|
220 |
msgid "Save Changes"
|
221 |
msgstr "Guardar cambios"
|
222 |
|
223 |
-
#: lib/yit-plugin-panel.php:
|
224 |
#: templates/panel/woocommerce/woocommerce-form.php:17
|
225 |
msgid ""
|
226 |
"If you continue with this action, you will reset all options in this page."
|
227 |
msgstr ""
|
228 |
"Si sigues con esta acción, se reiniciarán todas las opciones en esta página."
|
229 |
|
230 |
-
#: lib/yit-plugin-panel.php:
|
231 |
msgid "Reset to default"
|
232 |
msgstr "Restablecer a predeterminado"
|
233 |
|
234 |
-
#: lib/yit-plugin-panel.php:
|
235 |
#: templates/panel/woocommerce/woocommerce-form.php:21
|
236 |
msgid "Are you sure?"
|
237 |
msgstr "¿Estás seguro/a?"
|
238 |
|
239 |
-
#: lib/yit-plugin-panel.php:
|
240 |
msgid ""
|
241 |
"The element you have entered already exists. Please, enter another name."
|
242 |
msgstr ""
|
243 |
"El elemento que has introducido ya existe. Por favor, introduce otro nombre."
|
244 |
|
245 |
-
#: lib/yit-plugin-panel.php:
|
246 |
msgid "Settings saved"
|
247 |
msgstr "Ajustes guardados"
|
248 |
|
249 |
-
#: lib/yit-plugin-panel.php:
|
250 |
msgid "Settings reset"
|
251 |
msgstr "Ajustes reiniciados"
|
252 |
|
253 |
-
#: lib/yit-plugin-panel.php:
|
254 |
msgid "Element deleted correctly."
|
255 |
msgstr "Elemento borrado correctamente."
|
256 |
|
257 |
-
#: lib/yit-plugin-panel.php:
|
258 |
msgid "Element updated correctly."
|
259 |
msgstr "Elemento actualizado correctamente."
|
260 |
|
261 |
-
#: lib/yit-plugin-panel.php:
|
262 |
msgid "Database imported correctly."
|
263 |
msgstr "Base de datos importada correctamente."
|
264 |
|
265 |
-
#: lib/yit-plugin-panel.php:
|
266 |
msgid "An error has occurred during import. Please try again."
|
267 |
msgstr ""
|
268 |
"Ha ocurrido un error durante la importación. Por favor, inténtalo de nuevo."
|
269 |
|
270 |
-
#: lib/yit-plugin-panel.php:
|
271 |
msgid "The added file is not valid."
|
272 |
msgstr "El archivo añadido no es válido."
|
273 |
|
274 |
-
#: lib/yit-plugin-panel.php:
|
275 |
msgid "Sorry, import is disabled."
|
276 |
msgstr "Lo sentimos, la importación está deshabilitada."
|
277 |
|
278 |
-
#: lib/yit-plugin-panel.php:
|
279 |
msgid "Sorting successful."
|
280 |
msgstr "Clasificación fue realizada con éxito."
|
281 |
|
282 |
-
#: lib/yit-plugin-panel.php:
|
283 |
msgid "We need your support"
|
284 |
msgstr "Necesitamos tu ayuda"
|
285 |
|
286 |
-
#: lib/yit-plugin-panel.php:
|
287 |
msgid "to keep updating and improving the plugin. Please,"
|
288 |
msgstr "para seguir actualizando y mejora el plugin. Por favor,"
|
289 |
|
290 |
-
#: lib/yit-plugin-panel.php:
|
291 |
msgid "help us by leaving a five-star rating"
|
292 |
msgstr "ayúdanos dejando una valoración de 5 estrellas"
|
293 |
|
294 |
-
#: lib/yit-plugin-panel.php:
|
295 |
msgid ":) Thanks!"
|
296 |
msgstr ":) ¡Gracias!"
|
297 |
|
@@ -1209,9 +1236,6 @@ msgstr "Ajustes"
|
|
1209 |
#~ msgid "Renew license"
|
1210 |
#~ msgstr "Renovar licencia"
|
1211 |
|
1212 |
-
#~ msgid "Select All"
|
1213 |
-
#~ msgstr "Seleccionar todo"
|
1214 |
-
|
1215 |
#~ msgid "Deselect All"
|
1216 |
#~ msgstr "Deseleccionar todo"
|
1217 |
|
4 |
msgstr ""
|
5 |
"Project-Id-Version: YITH Plugin Starter 1.0.0 Plugin FW\n"
|
6 |
"Report-Msgid-Bugs-To: YITH <plugins@yithemes.com>\n"
|
7 |
+
"POT-Creation-Date: 2020-08-07 14:15:08+00:00\n"
|
8 |
"PO-Revision-Date: 2020-04-06 10:45+0200\n"
|
9 |
"Last-Translator: \n"
|
10 |
"Language-Team: Your Inspiration Themes <info@yithemes.com>\n"
|
22 |
"X-Textdomain-Support: yes\n"
|
23 |
"X-Poedit-SearchPath-0: .\n"
|
24 |
|
25 |
+
#: lib/yit-assets.php:102
|
26 |
+
msgid "Clear"
|
27 |
+
msgstr ""
|
28 |
+
|
29 |
+
#: lib/yit-assets.php:103
|
30 |
+
msgid "Clear color"
|
31 |
+
msgstr ""
|
32 |
+
|
33 |
+
#: lib/yit-assets.php:104
|
34 |
+
#, fuzzy
|
35 |
+
msgid "Default"
|
36 |
+
msgstr "Establecer por defecto"
|
37 |
+
|
38 |
+
#: lib/yit-assets.php:105
|
39 |
+
#, fuzzy
|
40 |
+
msgid "Select default color"
|
41 |
+
msgstr "Establecer por defecto"
|
42 |
+
|
43 |
+
#: lib/yit-assets.php:106
|
44 |
+
#, fuzzy
|
45 |
+
msgid "Select Color"
|
46 |
+
msgstr "Seleccionar todo"
|
47 |
+
|
48 |
+
#: lib/yit-assets.php:107
|
49 |
+
msgid "Color value"
|
50 |
+
msgstr ""
|
51 |
+
|
52 |
#: lib/yit-cpt-unlimited.php:462 lib/yit-cpt-unlimited.php:576
|
53 |
#: lib/yit-cpt-unlimited.php:721 lib/yit-cpt-unlimited.php:1636
|
54 |
msgid "Add %s"
|
230 |
msgid "Upload multiple files"
|
231 |
msgstr "Cargar archivos múltiples"
|
232 |
|
233 |
+
#: lib/yit-plugin-panel-wc.php:426
|
234 |
msgid "The changes you have made will be lost if you leave this page."
|
235 |
msgstr "Los cambios que has hecho se perderán si abandonas esta página."
|
236 |
|
242 |
msgid "How to install premium version"
|
243 |
msgstr "Cómo instalar la versión premium"
|
244 |
|
245 |
+
#: lib/yit-plugin-panel.php:617 lib/yit-plugin-subpanel.php:151
|
246 |
#: templates/panel/woocommerce/woocommerce-form.php:14
|
247 |
msgid "Save Changes"
|
248 |
msgstr "Guardar cambios"
|
249 |
|
250 |
+
#: lib/yit-plugin-panel.php:621 lib/yit-plugin-subpanel.php:154
|
251 |
#: templates/panel/woocommerce/woocommerce-form.php:17
|
252 |
msgid ""
|
253 |
"If you continue with this action, you will reset all options in this page."
|
254 |
msgstr ""
|
255 |
"Si sigues con esta acción, se reiniciarán todas las opciones en esta página."
|
256 |
|
257 |
+
#: lib/yit-plugin-panel.php:624 lib/yit-plugin-subpanel.php:156
|
258 |
msgid "Reset to default"
|
259 |
msgstr "Restablecer a predeterminado"
|
260 |
|
261 |
+
#: lib/yit-plugin-panel.php:625 lib/yit-plugin-subpanel.php:157
|
262 |
#: templates/panel/woocommerce/woocommerce-form.php:21
|
263 |
msgid "Are you sure?"
|
264 |
msgstr "¿Estás seguro/a?"
|
265 |
|
266 |
+
#: lib/yit-plugin-panel.php:823
|
267 |
msgid ""
|
268 |
"The element you have entered already exists. Please, enter another name."
|
269 |
msgstr ""
|
270 |
"El elemento que has introducido ya existe. Por favor, introduce otro nombre."
|
271 |
|
272 |
+
#: lib/yit-plugin-panel.php:824
|
273 |
msgid "Settings saved"
|
274 |
msgstr "Ajustes guardados"
|
275 |
|
276 |
+
#: lib/yit-plugin-panel.php:825
|
277 |
msgid "Settings reset"
|
278 |
msgstr "Ajustes reiniciados"
|
279 |
|
280 |
+
#: lib/yit-plugin-panel.php:826
|
281 |
msgid "Element deleted correctly."
|
282 |
msgstr "Elemento borrado correctamente."
|
283 |
|
284 |
+
#: lib/yit-plugin-panel.php:827 lib/yit-plugin-panel.php:828
|
285 |
msgid "Element updated correctly."
|
286 |
msgstr "Elemento actualizado correctamente."
|
287 |
|
288 |
+
#: lib/yit-plugin-panel.php:829
|
289 |
msgid "Database imported correctly."
|
290 |
msgstr "Base de datos importada correctamente."
|
291 |
|
292 |
+
#: lib/yit-plugin-panel.php:830
|
293 |
msgid "An error has occurred during import. Please try again."
|
294 |
msgstr ""
|
295 |
"Ha ocurrido un error durante la importación. Por favor, inténtalo de nuevo."
|
296 |
|
297 |
+
#: lib/yit-plugin-panel.php:831
|
298 |
msgid "The added file is not valid."
|
299 |
msgstr "El archivo añadido no es válido."
|
300 |
|
301 |
+
#: lib/yit-plugin-panel.php:832
|
302 |
msgid "Sorry, import is disabled."
|
303 |
msgstr "Lo sentimos, la importación está deshabilitada."
|
304 |
|
305 |
+
#: lib/yit-plugin-panel.php:833
|
306 |
msgid "Sorting successful."
|
307 |
msgstr "Clasificación fue realizada con éxito."
|
308 |
|
309 |
+
#: lib/yit-plugin-panel.php:1281
|
310 |
msgid "We need your support"
|
311 |
msgstr "Necesitamos tu ayuda"
|
312 |
|
313 |
+
#: lib/yit-plugin-panel.php:1282
|
314 |
msgid "to keep updating and improving the plugin. Please,"
|
315 |
msgstr "para seguir actualizando y mejora el plugin. Por favor,"
|
316 |
|
317 |
+
#: lib/yit-plugin-panel.php:1284
|
318 |
msgid "help us by leaving a five-star rating"
|
319 |
msgstr "ayúdanos dejando una valoración de 5 estrellas"
|
320 |
|
321 |
+
#: lib/yit-plugin-panel.php:1285
|
322 |
msgid ":) Thanks!"
|
323 |
msgstr ":) ¡Gracias!"
|
324 |
|
1236 |
#~ msgid "Renew license"
|
1237 |
#~ msgstr "Renovar licencia"
|
1238 |
|
|
|
|
|
|
|
1239 |
#~ msgid "Deselect All"
|
1240 |
#~ msgstr "Deseleccionar todo"
|
1241 |
|
plugin-fw/languages/yith-plugin-fw-it_IT.mo
CHANGED
Binary file
|
plugin-fw/languages/yith-plugin-fw-it_IT.po
CHANGED
@@ -4,15 +4,15 @@ msgid ""
|
|
4 |
msgstr ""
|
5 |
"Project-Id-Version: YITH Plugin Starter 1.0.0 Plugin FW\n"
|
6 |
"Report-Msgid-Bugs-To: YITH <plugins@yithemes.com>\n"
|
7 |
-
"POT-Creation-Date: 2020-
|
8 |
-
"PO-Revision-Date: 2020-
|
9 |
"Last-Translator: \n"
|
10 |
"Language-Team: YIThemes <plugins@yithemes.com>\n"
|
11 |
"Language: it_IT\n"
|
12 |
"MIME-Version: 1.0\n"
|
13 |
"Content-Type: text/plain; charset=UTF-8\n"
|
14 |
"Content-Transfer-Encoding: 8bit\n"
|
15 |
-
"X-Generator: Poedit 2.
|
16 |
"X-Poedit-KeywordsList: __;_e;_x:1,2c;_ex:1,2c;_n:1,2;_nx:1,2,4c;_n_noop:1,2;"
|
17 |
"_nx_noop:1,2,3c;esc_attr__;esc_html__;esc_attr_e;esc_html_e;esc_attr_x:1,2c;"
|
18 |
"esc_html_x:1,2c\n"
|
@@ -22,6 +22,30 @@ msgstr ""
|
|
22 |
"X-Textdomain-Support: yes\n"
|
23 |
"X-Poedit-SearchPath-0: .\n"
|
24 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
25 |
#: lib/yit-cpt-unlimited.php:462 lib/yit-cpt-unlimited.php:576
|
26 |
#: lib/yit-cpt-unlimited.php:721 lib/yit-cpt-unlimited.php:1636
|
27 |
msgid "Add %s"
|
@@ -202,7 +226,7 @@ msgstr "Aggiungi %s dalla immagini"
|
|
202 |
msgid "Upload multiple files"
|
203 |
msgstr "Carica file multipli"
|
204 |
|
205 |
-
#: lib/yit-plugin-panel-wc.php:
|
206 |
msgid "The changes you have made will be lost if you leave this page."
|
207 |
msgstr "Perderai tutti i cambiamenti effettuati se lasci questa pagina."
|
208 |
|
@@ -214,12 +238,12 @@ msgstr "Impostazioni plugin"
|
|
214 |
msgid "How to install premium version"
|
215 |
msgstr "Come installare la versione premium"
|
216 |
|
217 |
-
#: lib/yit-plugin-panel.php:
|
218 |
#: templates/panel/woocommerce/woocommerce-form.php:14
|
219 |
msgid "Save Changes"
|
220 |
msgstr "Salva modifiche"
|
221 |
|
222 |
-
#: lib/yit-plugin-panel.php:
|
223 |
#: templates/panel/woocommerce/woocommerce-form.php:17
|
224 |
msgid ""
|
225 |
"If you continue with this action, you will reset all options in this page."
|
@@ -227,69 +251,69 @@ msgstr ""
|
|
227 |
"Se prosegui con questa azione, tutte le opzioni di questa pagina saranno "
|
228 |
"reimpostate."
|
229 |
|
230 |
-
#: lib/yit-plugin-panel.php:
|
231 |
msgid "Reset to default"
|
232 |
msgstr "Ripristina configurazione predefinita"
|
233 |
|
234 |
-
#: lib/yit-plugin-panel.php:
|
235 |
#: templates/panel/woocommerce/woocommerce-form.php:21
|
236 |
msgid "Are you sure?"
|
237 |
msgstr "Sei sicuro?"
|
238 |
|
239 |
-
#: lib/yit-plugin-panel.php:
|
240 |
msgid ""
|
241 |
"The element you have entered already exists. Please, enter another name."
|
242 |
msgstr "L'elemento inserito esiste già. Per favore, inserisci un altro nome."
|
243 |
|
244 |
-
#: lib/yit-plugin-panel.php:
|
245 |
msgid "Settings saved"
|
246 |
msgstr "Impostazioni salvate"
|
247 |
|
248 |
-
#: lib/yit-plugin-panel.php:
|
249 |
msgid "Settings reset"
|
250 |
msgstr "Impostazioni azzerate"
|
251 |
|
252 |
-
#: lib/yit-plugin-panel.php:
|
253 |
msgid "Element deleted correctly."
|
254 |
msgstr "Elemento rimosso correttamente."
|
255 |
|
256 |
-
#: lib/yit-plugin-panel.php:
|
257 |
msgid "Element updated correctly."
|
258 |
msgstr "Elemento aggiornato correttamente."
|
259 |
|
260 |
-
#: lib/yit-plugin-panel.php:
|
261 |
msgid "Database imported correctly."
|
262 |
msgstr "Database importato correttamente."
|
263 |
|
264 |
-
#: lib/yit-plugin-panel.php:
|
265 |
msgid "An error has occurred during import. Please try again."
|
266 |
msgstr "Si è verificato un errore durante l'importazione. Prova di nuovo."
|
267 |
|
268 |
-
#: lib/yit-plugin-panel.php:
|
269 |
msgid "The added file is not valid."
|
270 |
msgstr "Il file aggiunto non è valido."
|
271 |
|
272 |
-
#: lib/yit-plugin-panel.php:
|
273 |
msgid "Sorry, import is disabled."
|
274 |
msgstr "Ci dispiace, l'importazione è disabilitata."
|
275 |
|
276 |
-
#: lib/yit-plugin-panel.php:
|
277 |
msgid "Sorting successful."
|
278 |
msgstr "Ordinamento effettuato con successo."
|
279 |
|
280 |
-
#: lib/yit-plugin-panel.php:
|
281 |
msgid "We need your support"
|
282 |
msgstr "Abbiamo bisogno del tuo sostegno"
|
283 |
|
284 |
-
#: lib/yit-plugin-panel.php:
|
285 |
msgid "to keep updating and improving the plugin. Please,"
|
286 |
msgstr "per poter continuare ad aggiornare e migliorare il plugin."
|
287 |
|
288 |
-
#: lib/yit-plugin-panel.php:
|
289 |
msgid "help us by leaving a five-star rating"
|
290 |
-
msgstr "
|
291 |
|
292 |
-
#: lib/yit-plugin-panel.php:
|
293 |
msgid ":) Thanks!"
|
294 |
msgstr ":) Grazie!"
|
295 |
|
@@ -430,13 +454,12 @@ msgstr "Attenzione!"
|
|
430 |
|
431 |
#. translators: %1$s open link tag, %2$s open link tag
|
432 |
#: lib/yith-system-status.php:334
|
433 |
-
#, fuzzy
|
434 |
msgid ""
|
435 |
"The system check has detected some compatibility issues on your installation."
|
436 |
"%1$sClick here%2$s to know more"
|
437 |
msgstr ""
|
438 |
"Il controllo di sistema ha individuato delle incompatibilità con la tua "
|
439 |
-
"installazione. %sVedi qui%s per maggiori
|
440 |
|
441 |
#: lib/yith-system-status.php:473
|
442 |
msgid "Enabled"
|
@@ -448,25 +471,22 @@ msgstr "Disabilitato"
|
|
448 |
|
449 |
#: lib/yith-system-status.php:478
|
450 |
msgid "N/A"
|
451 |
-
msgstr "
|
452 |
|
453 |
#. translators: %1$s plugin name, %2$s requirement name
|
454 |
#: lib/yith-system-status.php:506
|
455 |
-
#, fuzzy
|
456 |
msgid "%1$s needs %2$s enabled"
|
457 |
-
msgstr "%s necessita
|
458 |
|
459 |
#. translators: %1$s plugin name, %2$s required memory amount
|
460 |
#: lib/yith-system-status.php:509
|
461 |
-
#, fuzzy
|
462 |
msgid "%1$s needs at least %2$s of available memory"
|
463 |
-
msgstr "%s necessita almeno %s di memoria disponibile"
|
464 |
|
465 |
#. translators: %1$s plugin name, %2$s version number
|
466 |
#: lib/yith-system-status.php:512
|
467 |
-
#, fuzzy
|
468 |
msgid "%1$s needs at least %2$s version"
|
469 |
-
msgstr "%s necessita almeno della versione %s"
|
470 |
|
471 |
#: lib/yith-system-status.php:537
|
472 |
msgid ""
|
@@ -481,15 +501,13 @@ msgid "Contact your hosting company in order to update it."
|
|
481 |
msgstr "Contatta il tuo servizio hosting per aggiornarlo."
|
482 |
|
483 |
#: lib/yith-system-status.php:545
|
484 |
-
#, fuzzy
|
485 |
msgid "Contact your hosting company in order to install it."
|
486 |
-
msgstr "Per
|
487 |
|
488 |
#. translators: %1$s code, %2$s file name
|
489 |
#: lib/yith-system-status.php:552
|
490 |
-
#, fuzzy
|
491 |
msgid "Remove %1$s from %2$s file"
|
492 |
-
msgstr "Rimuovi %s dal file %s"
|
493 |
|
494 |
#: lib/yith-system-status.php:560
|
495 |
msgid "Contact your hosting company in order to enable it."
|
@@ -497,13 +515,12 @@ msgstr "Per attivarlo contatta il tuo servizio di hosting."
|
|
497 |
|
498 |
#. translators: %1$s opening link tag, %2$s closing link tag
|
499 |
#: lib/yith-system-status.php:564 lib/yith-system-status.php:588
|
500 |
-
#, fuzzy
|
501 |
msgid ""
|
502 |
"Read more %1$shere%2$s or contact your hosting company in order to increase "
|
503 |
"it."
|
504 |
msgstr ""
|
505 |
-
"Per maggiori informazioni %
|
506 |
-
"un upgrade."
|
507 |
|
508 |
#. translators: %s recommended memory amount
|
509 |
#: lib/yith-system-status.php:585
|
@@ -516,14 +533,13 @@ msgstr ""
|
|
516 |
|
517 |
#. translators: %1$s TLS label, %2$s cURL label
|
518 |
#: lib/yith-system-status.php:593
|
519 |
-
#, fuzzy
|
520 |
msgid ""
|
521 |
"The system check cannot determine which %1$s version is installed because "
|
522 |
"%2$s module is disabled. Ask your hosting company to enable it."
|
523 |
msgstr ""
|
524 |
-
"Non ci è stato possibile determinare quale versione
|
525 |
-
"
|
526 |
-
"
|
527 |
|
528 |
#. translators: %1$s TLS label
|
529 |
#: lib/yith-system-status.php:596
|
@@ -531,6 +547,8 @@ msgid ""
|
|
531 |
"The system check cannot determine which %1$s version is installed due to a "
|
532 |
"connection issue between your site and our server."
|
533 |
msgstr ""
|
|
|
|
|
534 |
|
535 |
#: templates/fields/ajax-customers.php:57
|
536 |
msgid "Search Customers"
|
@@ -668,11 +686,11 @@ msgstr "YITH System Information"
|
|
668 |
|
669 |
#: templates/sysinfo/system-information-panel.php:50
|
670 |
msgid "WP debug.log file"
|
671 |
-
msgstr ""
|
672 |
|
673 |
#: templates/sysinfo/system-information-panel.php:54
|
674 |
msgid "PHP error_log file"
|
675 |
-
msgstr ""
|
676 |
|
677 |
#: templates/sysinfo/system-information-panel.php:59
|
678 |
#: templates/sysinfo/system-information-panel.php:83
|
@@ -693,16 +711,15 @@ msgstr "Indirizzo IP di output"
|
|
693 |
|
694 |
#: templates/sysinfo/system-information-panel.php:120
|
695 |
msgid "Defined WP_CACHE"
|
696 |
-
msgstr ""
|
697 |
|
698 |
#: templates/sysinfo/system-information-panel.php:123
|
699 |
msgid "Yes"
|
700 |
-
msgstr ""
|
701 |
|
702 |
#: templates/sysinfo/system-information-panel.php:123
|
703 |
-
#, fuzzy
|
704 |
msgid "No"
|
705 |
-
msgstr "
|
706 |
|
707 |
#: templates/sysinfo/system-information-panel.php:159
|
708 |
msgid "Show full PHPInfo"
|
@@ -710,14 +727,13 @@ msgstr "Mostra tutto il contenuto di PHPInfo"
|
|
710 |
|
711 |
#: templates/sysinfo/system-information-panel.php:167
|
712 |
msgid "Show log files"
|
713 |
-
msgstr ""
|
714 |
|
715 |
#: yit-plugin.php:194
|
716 |
msgid "License"
|
717 |
msgstr "Chiave di licenza"
|
718 |
|
719 |
#. Author of the plugin/theme
|
720 |
-
#, fuzzy
|
721 |
msgid "YITH"
|
722 |
msgstr "YITH"
|
723 |
|
@@ -797,27 +813,27 @@ msgstr "YITH"
|
|
797 |
#: templates/fields/dimensions.php:16
|
798 |
msgctxt "Position in the \"Dimensions\" field"
|
799 |
msgid "Top"
|
800 |
-
msgstr ""
|
801 |
|
802 |
#: templates/fields/dimensions.php:17
|
803 |
msgctxt "Position in the \"Dimensions\" field"
|
804 |
msgid "Right"
|
805 |
-
msgstr ""
|
806 |
|
807 |
#: templates/fields/dimensions.php:18
|
808 |
msgctxt "Position in the \"Dimensions\" field"
|
809 |
msgid "Bottom"
|
810 |
-
msgstr ""
|
811 |
|
812 |
#: templates/fields/dimensions.php:19
|
813 |
msgctxt "Position in the \"Dimensions\" field"
|
814 |
msgid "Left"
|
815 |
-
msgstr ""
|
816 |
|
817 |
#: templates/fields/dimensions.php:117
|
818 |
msgctxt "Tooltip in the \"Dimensions\" field"
|
819 |
msgid "Link values together"
|
820 |
-
msgstr ""
|
821 |
|
822 |
#: templates/fields/onoff.php:24
|
823 |
msgctxt "YES/NO button: use MAX 3 characters!"
|
@@ -1191,9 +1207,6 @@ msgstr "Impostazioni"
|
|
1191 |
#~ msgid "Renew license"
|
1192 |
#~ msgstr "Rinnova la licenza"
|
1193 |
|
1194 |
-
#~ msgid "Select All"
|
1195 |
-
#~ msgstr "Seleziona tutto"
|
1196 |
-
|
1197 |
#~ msgid "Deselect All"
|
1198 |
#~ msgstr "Deseleziona tutto"
|
1199 |
|
4 |
msgstr ""
|
5 |
"Project-Id-Version: YITH Plugin Starter 1.0.0 Plugin FW\n"
|
6 |
"Report-Msgid-Bugs-To: YITH <plugins@yithemes.com>\n"
|
7 |
+
"POT-Creation-Date: 2020-08-07 14:15:08+00:00\n"
|
8 |
+
"PO-Revision-Date: 2020-08-10 19:15+0200\n"
|
9 |
"Last-Translator: \n"
|
10 |
"Language-Team: YIThemes <plugins@yithemes.com>\n"
|
11 |
"Language: it_IT\n"
|
12 |
"MIME-Version: 1.0\n"
|
13 |
"Content-Type: text/plain; charset=UTF-8\n"
|
14 |
"Content-Transfer-Encoding: 8bit\n"
|
15 |
+
"X-Generator: Poedit 2.3.1\n"
|
16 |
"X-Poedit-KeywordsList: __;_e;_x:1,2c;_ex:1,2c;_n:1,2;_nx:1,2,4c;_n_noop:1,2;"
|
17 |
"_nx_noop:1,2,3c;esc_attr__;esc_html__;esc_attr_e;esc_html_e;esc_attr_x:1,2c;"
|
18 |
"esc_html_x:1,2c\n"
|
22 |
"X-Textdomain-Support: yes\n"
|
23 |
"X-Poedit-SearchPath-0: .\n"
|
24 |
|
25 |
+
#: lib/yit-assets.php:102
|
26 |
+
msgid "Clear"
|
27 |
+
msgstr "Cancella"
|
28 |
+
|
29 |
+
#: lib/yit-assets.php:103
|
30 |
+
msgid "Clear color"
|
31 |
+
msgstr "Cancella colore"
|
32 |
+
|
33 |
+
#: lib/yit-assets.php:104
|
34 |
+
msgid "Default"
|
35 |
+
msgstr "Predefinito"
|
36 |
+
|
37 |
+
#: lib/yit-assets.php:105
|
38 |
+
msgid "Select default color"
|
39 |
+
msgstr "Imposta colore predefinito"
|
40 |
+
|
41 |
+
#: lib/yit-assets.php:106
|
42 |
+
msgid "Select Color"
|
43 |
+
msgstr "Seleziona colore"
|
44 |
+
|
45 |
+
#: lib/yit-assets.php:107
|
46 |
+
msgid "Color value"
|
47 |
+
msgstr "Colore"
|
48 |
+
|
49 |
#: lib/yit-cpt-unlimited.php:462 lib/yit-cpt-unlimited.php:576
|
50 |
#: lib/yit-cpt-unlimited.php:721 lib/yit-cpt-unlimited.php:1636
|
51 |
msgid "Add %s"
|
226 |
msgid "Upload multiple files"
|
227 |
msgstr "Carica file multipli"
|
228 |
|
229 |
+
#: lib/yit-plugin-panel-wc.php:426
|
230 |
msgid "The changes you have made will be lost if you leave this page."
|
231 |
msgstr "Perderai tutti i cambiamenti effettuati se lasci questa pagina."
|
232 |
|
238 |
msgid "How to install premium version"
|
239 |
msgstr "Come installare la versione premium"
|
240 |
|
241 |
+
#: lib/yit-plugin-panel.php:617 lib/yit-plugin-subpanel.php:151
|
242 |
#: templates/panel/woocommerce/woocommerce-form.php:14
|
243 |
msgid "Save Changes"
|
244 |
msgstr "Salva modifiche"
|
245 |
|
246 |
+
#: lib/yit-plugin-panel.php:621 lib/yit-plugin-subpanel.php:154
|
247 |
#: templates/panel/woocommerce/woocommerce-form.php:17
|
248 |
msgid ""
|
249 |
"If you continue with this action, you will reset all options in this page."
|
251 |
"Se prosegui con questa azione, tutte le opzioni di questa pagina saranno "
|
252 |
"reimpostate."
|
253 |
|
254 |
+
#: lib/yit-plugin-panel.php:624 lib/yit-plugin-subpanel.php:156
|
255 |
msgid "Reset to default"
|
256 |
msgstr "Ripristina configurazione predefinita"
|
257 |
|
258 |
+
#: lib/yit-plugin-panel.php:625 lib/yit-plugin-subpanel.php:157
|
259 |
#: templates/panel/woocommerce/woocommerce-form.php:21
|
260 |
msgid "Are you sure?"
|
261 |
msgstr "Sei sicuro?"
|
262 |
|
263 |
+
#: lib/yit-plugin-panel.php:823
|
264 |
msgid ""
|
265 |
"The element you have entered already exists. Please, enter another name."
|
266 |
msgstr "L'elemento inserito esiste già. Per favore, inserisci un altro nome."
|
267 |
|
268 |
+
#: lib/yit-plugin-panel.php:824
|
269 |
msgid "Settings saved"
|
270 |
msgstr "Impostazioni salvate"
|
271 |
|
272 |
+
#: lib/yit-plugin-panel.php:825
|
273 |
msgid "Settings reset"
|
274 |
msgstr "Impostazioni azzerate"
|
275 |
|
276 |
+
#: lib/yit-plugin-panel.php:826
|
277 |
msgid "Element deleted correctly."
|
278 |
msgstr "Elemento rimosso correttamente."
|
279 |
|
280 |
+
#: lib/yit-plugin-panel.php:827 lib/yit-plugin-panel.php:828
|
281 |
msgid "Element updated correctly."
|
282 |
msgstr "Elemento aggiornato correttamente."
|
283 |
|
284 |
+
#: lib/yit-plugin-panel.php:829
|
285 |
msgid "Database imported correctly."
|
286 |
msgstr "Database importato correttamente."
|
287 |
|
288 |
+
#: lib/yit-plugin-panel.php:830
|
289 |
msgid "An error has occurred during import. Please try again."
|
290 |
msgstr "Si è verificato un errore durante l'importazione. Prova di nuovo."
|
291 |
|
292 |
+
#: lib/yit-plugin-panel.php:831
|
293 |
msgid "The added file is not valid."
|
294 |
msgstr "Il file aggiunto non è valido."
|
295 |
|
296 |
+
#: lib/yit-plugin-panel.php:832
|
297 |
msgid "Sorry, import is disabled."
|
298 |
msgstr "Ci dispiace, l'importazione è disabilitata."
|
299 |
|
300 |
+
#: lib/yit-plugin-panel.php:833
|
301 |
msgid "Sorting successful."
|
302 |
msgstr "Ordinamento effettuato con successo."
|
303 |
|
304 |
+
#: lib/yit-plugin-panel.php:1281
|
305 |
msgid "We need your support"
|
306 |
msgstr "Abbiamo bisogno del tuo sostegno"
|
307 |
|
308 |
+
#: lib/yit-plugin-panel.php:1282
|
309 |
msgid "to keep updating and improving the plugin. Please,"
|
310 |
msgstr "per poter continuare ad aggiornare e migliorare il plugin."
|
311 |
|
312 |
+
#: lib/yit-plugin-panel.php:1284
|
313 |
msgid "help us by leaving a five-star rating"
|
314 |
+
msgstr "puoi darci una mano lasciando una recensione a 5 stelle"
|
315 |
|
316 |
+
#: lib/yit-plugin-panel.php:1285
|
317 |
msgid ":) Thanks!"
|
318 |
msgstr ":) Grazie!"
|
319 |
|
454 |
|
455 |
#. translators: %1$s open link tag, %2$s open link tag
|
456 |
#: lib/yith-system-status.php:334
|
|
|
457 |
msgid ""
|
458 |
"The system check has detected some compatibility issues on your installation."
|
459 |
"%1$sClick here%2$s to know more"
|
460 |
msgstr ""
|
461 |
"Il controllo di sistema ha individuato delle incompatibilità con la tua "
|
462 |
+
"installazione. %1$sVedi qui%2$s per maggiori dettagli"
|
463 |
|
464 |
#: lib/yith-system-status.php:473
|
465 |
msgid "Enabled"
|
471 |
|
472 |
#: lib/yith-system-status.php:478
|
473 |
msgid "N/A"
|
474 |
+
msgstr "n.a."
|
475 |
|
476 |
#. translators: %1$s plugin name, %2$s requirement name
|
477 |
#: lib/yith-system-status.php:506
|
|
|
478 |
msgid "%1$s needs %2$s enabled"
|
479 |
+
msgstr "%1$s necessita dell'attivazione di %2$s"
|
480 |
|
481 |
#. translators: %1$s plugin name, %2$s required memory amount
|
482 |
#: lib/yith-system-status.php:509
|
|
|
483 |
msgid "%1$s needs at least %2$s of available memory"
|
484 |
+
msgstr "%1$s necessita di almeno %2$s di memoria disponibile"
|
485 |
|
486 |
#. translators: %1$s plugin name, %2$s version number
|
487 |
#: lib/yith-system-status.php:512
|
|
|
488 |
msgid "%1$s needs at least %2$s version"
|
489 |
+
msgstr "%1$s necessita almeno della versione %2$s"
|
490 |
|
491 |
#: lib/yith-system-status.php:537
|
492 |
msgid ""
|
501 |
msgstr "Contatta il tuo servizio hosting per aggiornarlo."
|
502 |
|
503 |
#: lib/yith-system-status.php:545
|
|
|
504 |
msgid "Contact your hosting company in order to install it."
|
505 |
+
msgstr "Per installarlo contatta il tuo servizio di hosting."
|
506 |
|
507 |
#. translators: %1$s code, %2$s file name
|
508 |
#: lib/yith-system-status.php:552
|
|
|
509 |
msgid "Remove %1$s from %2$s file"
|
510 |
+
msgstr "Rimuovi %1$s dal file %2$s"
|
511 |
|
512 |
#: lib/yith-system-status.php:560
|
513 |
msgid "Contact your hosting company in order to enable it."
|
515 |
|
516 |
#. translators: %1$s opening link tag, %2$s closing link tag
|
517 |
#: lib/yith-system-status.php:564 lib/yith-system-status.php:588
|
|
|
518 |
msgid ""
|
519 |
"Read more %1$shere%2$s or contact your hosting company in order to increase "
|
520 |
"it."
|
521 |
msgstr ""
|
522 |
+
"Per maggiori informazioni %1$sleggi questo%2$s oppure contatta il tuo host "
|
523 |
+
"per un upgrade."
|
524 |
|
525 |
#. translators: %s recommended memory amount
|
526 |
#: lib/yith-system-status.php:585
|
533 |
|
534 |
#. translators: %1$s TLS label, %2$s cURL label
|
535 |
#: lib/yith-system-status.php:593
|
|
|
536 |
msgid ""
|
537 |
"The system check cannot determine which %1$s version is installed because "
|
538 |
"%2$s module is disabled. Ask your hosting company to enable it."
|
539 |
msgstr ""
|
540 |
+
"Non ci è stato possibile determinare quale versione di %1$s è installata in "
|
541 |
+
"quanto il modulo %2$s è disattivato. Chiedi al tuo servizio hosting di "
|
542 |
+
"attivarlo."
|
543 |
|
544 |
#. translators: %1$s TLS label
|
545 |
#: lib/yith-system-status.php:596
|
547 |
"The system check cannot determine which %1$s version is installed due to a "
|
548 |
"connection issue between your site and our server."
|
549 |
msgstr ""
|
550 |
+
"Non ci è stato possibile determinare quale versione di %1$s è installata a "
|
551 |
+
"causa di un problema di connessione fra il tuo sito e il nostro server."
|
552 |
|
553 |
#: templates/fields/ajax-customers.php:57
|
554 |
msgid "Search Customers"
|
686 |
|
687 |
#: templates/sysinfo/system-information-panel.php:50
|
688 |
msgid "WP debug.log file"
|
689 |
+
msgstr "WP debug.log file"
|
690 |
|
691 |
#: templates/sysinfo/system-information-panel.php:54
|
692 |
msgid "PHP error_log file"
|
693 |
+
msgstr "PHP error_log file"
|
694 |
|
695 |
#: templates/sysinfo/system-information-panel.php:59
|
696 |
#: templates/sysinfo/system-information-panel.php:83
|
711 |
|
712 |
#: templates/sysinfo/system-information-panel.php:120
|
713 |
msgid "Defined WP_CACHE"
|
714 |
+
msgstr "Defined WP_CACHE"
|
715 |
|
716 |
#: templates/sysinfo/system-information-panel.php:123
|
717 |
msgid "Yes"
|
718 |
+
msgstr "Sì"
|
719 |
|
720 |
#: templates/sysinfo/system-information-panel.php:123
|
|
|
721 |
msgid "No"
|
722 |
+
msgstr "No"
|
723 |
|
724 |
#: templates/sysinfo/system-information-panel.php:159
|
725 |
msgid "Show full PHPInfo"
|
727 |
|
728 |
#: templates/sysinfo/system-information-panel.php:167
|
729 |
msgid "Show log files"
|
730 |
+
msgstr "Mostra i log"
|
731 |
|
732 |
#: yit-plugin.php:194
|
733 |
msgid "License"
|
734 |
msgstr "Chiave di licenza"
|
735 |
|
736 |
#. Author of the plugin/theme
|
|
|
737 |
msgid "YITH"
|
738 |
msgstr "YITH"
|
739 |
|
813 |
#: templates/fields/dimensions.php:16
|
814 |
msgctxt "Position in the \"Dimensions\" field"
|
815 |
msgid "Top"
|
816 |
+
msgstr "In alto"
|
817 |
|
818 |
#: templates/fields/dimensions.php:17
|
819 |
msgctxt "Position in the \"Dimensions\" field"
|
820 |
msgid "Right"
|
821 |
+
msgstr "A destra"
|
822 |
|
823 |
#: templates/fields/dimensions.php:18
|
824 |
msgctxt "Position in the \"Dimensions\" field"
|
825 |
msgid "Bottom"
|
826 |
+
msgstr "In basso"
|
827 |
|
828 |
#: templates/fields/dimensions.php:19
|
829 |
msgctxt "Position in the \"Dimensions\" field"
|
830 |
msgid "Left"
|
831 |
+
msgstr "A sinistra"
|
832 |
|
833 |
#: templates/fields/dimensions.php:117
|
834 |
msgctxt "Tooltip in the \"Dimensions\" field"
|
835 |
msgid "Link values together"
|
836 |
+
msgstr "Collega i valori"
|
837 |
|
838 |
#: templates/fields/onoff.php:24
|
839 |
msgctxt "YES/NO button: use MAX 3 characters!"
|
1207 |
#~ msgid "Renew license"
|
1208 |
#~ msgstr "Rinnova la licenza"
|
1209 |
|
|
|
|
|
|
|
1210 |
#~ msgid "Deselect All"
|
1211 |
#~ msgstr "Deseleziona tutto"
|
1212 |
|
plugin-fw/languages/yith-plugin-fw-nl_NL.po
CHANGED
@@ -4,7 +4,7 @@ msgid ""
|
|
4 |
msgstr ""
|
5 |
"Project-Id-Version: YITH Plugin Starter 1.0.0 Plugin FW\n"
|
6 |
"Report-Msgid-Bugs-To: YITH <plugins@yithemes.com>\n"
|
7 |
-
"POT-Creation-Date: 2020-
|
8 |
"PO-Revision-Date: 2020-04-06 15:05+0200\n"
|
9 |
"Last-Translator: \n"
|
10 |
"Language-Team: Your Inspiration Themes <info@yithemes.com>\n"
|
@@ -22,6 +22,33 @@ msgstr ""
|
|
22 |
"X-Textdomain-Support: yes\n"
|
23 |
"X-Poedit-SearchPath-0: .\n"
|
24 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
25 |
#: lib/yit-cpt-unlimited.php:462 lib/yit-cpt-unlimited.php:576
|
26 |
#: lib/yit-cpt-unlimited.php:721 lib/yit-cpt-unlimited.php:1636
|
27 |
msgid "Add %s"
|
@@ -206,7 +233,7 @@ msgstr "Voeg %s toe vanaf afbeeldingen"
|
|
206 |
msgid "Upload multiple files"
|
207 |
msgstr "Upload meerdere bestanden"
|
208 |
|
209 |
-
#: lib/yit-plugin-panel-wc.php:
|
210 |
msgid "The changes you have made will be lost if you leave this page."
|
211 |
msgstr "Als je deze pagina verlaat zullen alle wijzigingen verloren gaan."
|
212 |
|
@@ -218,80 +245,80 @@ msgstr "Plugin instellingen"
|
|
218 |
msgid "How to install premium version"
|
219 |
msgstr "Hoe installeer ik de premium versie"
|
220 |
|
221 |
-
#: lib/yit-plugin-panel.php:
|
222 |
#: templates/panel/woocommerce/woocommerce-form.php:14
|
223 |
msgid "Save Changes"
|
224 |
msgstr "Wijzigingen opslaan"
|
225 |
|
226 |
-
#: lib/yit-plugin-panel.php:
|
227 |
#: templates/panel/woocommerce/woocommerce-form.php:17
|
228 |
msgid ""
|
229 |
"If you continue with this action, you will reset all options in this page."
|
230 |
msgstr "Als u deze actie voortzet, zult u alle opties op deze pagina resetten."
|
231 |
|
232 |
-
#: lib/yit-plugin-panel.php:
|
233 |
msgid "Reset to default"
|
234 |
msgstr "Resetten naar standaard"
|
235 |
|
236 |
-
#: lib/yit-plugin-panel.php:
|
237 |
#: templates/panel/woocommerce/woocommerce-form.php:21
|
238 |
msgid "Are you sure?"
|
239 |
msgstr "Weet u het zeker?"
|
240 |
|
241 |
-
#: lib/yit-plugin-panel.php:
|
242 |
msgid ""
|
243 |
"The element you have entered already exists. Please, enter another name."
|
244 |
msgstr "Het element dat u hebt ingevoerd bestaat al. Voer een andere naam in."
|
245 |
|
246 |
-
#: lib/yit-plugin-panel.php:
|
247 |
msgid "Settings saved"
|
248 |
msgstr "Instellingen opgeslagen"
|
249 |
|
250 |
-
#: lib/yit-plugin-panel.php:
|
251 |
msgid "Settings reset"
|
252 |
msgstr "Instellingen resetten"
|
253 |
|
254 |
-
#: lib/yit-plugin-panel.php:
|
255 |
msgid "Element deleted correctly."
|
256 |
msgstr "Element succesvol verwijderd."
|
257 |
|
258 |
-
#: lib/yit-plugin-panel.php:
|
259 |
msgid "Element updated correctly."
|
260 |
msgstr "Element juist bijgewerkt."
|
261 |
|
262 |
-
#: lib/yit-plugin-panel.php:
|
263 |
msgid "Database imported correctly."
|
264 |
msgstr "Database juist geïmporteerd."
|
265 |
|
266 |
-
#: lib/yit-plugin-panel.php:
|
267 |
msgid "An error has occurred during import. Please try again."
|
268 |
msgstr "Er is een fout opgetreden tijdens importeren. Probeer opnieuw."
|
269 |
|
270 |
-
#: lib/yit-plugin-panel.php:
|
271 |
msgid "The added file is not valid."
|
272 |
msgstr "Het toegevoegde bestand is ongeldig."
|
273 |
|
274 |
-
#: lib/yit-plugin-panel.php:
|
275 |
msgid "Sorry, import is disabled."
|
276 |
msgstr "Sorry, importeren is uitgeschakeld."
|
277 |
|
278 |
-
#: lib/yit-plugin-panel.php:
|
279 |
msgid "Sorting successful."
|
280 |
msgstr "Sorteren succesvol."
|
281 |
|
282 |
-
#: lib/yit-plugin-panel.php:
|
283 |
msgid "We need your support"
|
284 |
msgstr "We hebben uw hulp nodig"
|
285 |
|
286 |
-
#: lib/yit-plugin-panel.php:
|
287 |
msgid "to keep updating and improving the plugin. Please,"
|
288 |
msgstr "om de plugin te blijven updaten en verbeteren. A.u.b.,"
|
289 |
|
290 |
-
#: lib/yit-plugin-panel.php:
|
291 |
msgid "help us by leaving a five-star rating"
|
292 |
msgstr "help ons door een vijf-sterenbeoordeling achter te laten"
|
293 |
|
294 |
-
#: lib/yit-plugin-panel.php:
|
295 |
msgid ":) Thanks!"
|
296 |
msgstr ":) Bedankt!"
|
297 |
|
@@ -1196,8 +1223,5 @@ msgstr "Instellingen"
|
|
1196 |
#~ msgid "Renew license"
|
1197 |
#~ msgstr "Licentie vernieuwen"
|
1198 |
|
1199 |
-
#~ msgid "Select All"
|
1200 |
-
#~ msgstr "Selecteer alles"
|
1201 |
-
|
1202 |
#~ msgid "Deselect All"
|
1203 |
#~ msgstr "Selectie ongedaan maken"
|
4 |
msgstr ""
|
5 |
"Project-Id-Version: YITH Plugin Starter 1.0.0 Plugin FW\n"
|
6 |
"Report-Msgid-Bugs-To: YITH <plugins@yithemes.com>\n"
|
7 |
+
"POT-Creation-Date: 2020-08-07 14:15:08+00:00\n"
|
8 |
"PO-Revision-Date: 2020-04-06 15:05+0200\n"
|
9 |
"Last-Translator: \n"
|
10 |
"Language-Team: Your Inspiration Themes <info@yithemes.com>\n"
|
22 |
"X-Textdomain-Support: yes\n"
|
23 |
"X-Poedit-SearchPath-0: .\n"
|
24 |
|
25 |
+
#: lib/yit-assets.php:102
|
26 |
+
msgid "Clear"
|
27 |
+
msgstr ""
|
28 |
+
|
29 |
+
#: lib/yit-assets.php:103
|
30 |
+
msgid "Clear color"
|
31 |
+
msgstr ""
|
32 |
+
|
33 |
+
#: lib/yit-assets.php:104
|
34 |
+
#, fuzzy
|
35 |
+
msgid "Default"
|
36 |
+
msgstr "Instellen als standaard"
|
37 |
+
|
38 |
+
#: lib/yit-assets.php:105
|
39 |
+
#, fuzzy
|
40 |
+
msgid "Select default color"
|
41 |
+
msgstr "Instellen als standaard"
|
42 |
+
|
43 |
+
#: lib/yit-assets.php:106
|
44 |
+
#, fuzzy
|
45 |
+
msgid "Select Color"
|
46 |
+
msgstr "Selecteer alles"
|
47 |
+
|
48 |
+
#: lib/yit-assets.php:107
|
49 |
+
msgid "Color value"
|
50 |
+
msgstr ""
|
51 |
+
|
52 |
#: lib/yit-cpt-unlimited.php:462 lib/yit-cpt-unlimited.php:576
|
53 |
#: lib/yit-cpt-unlimited.php:721 lib/yit-cpt-unlimited.php:1636
|
54 |
msgid "Add %s"
|
233 |
msgid "Upload multiple files"
|
234 |
msgstr "Upload meerdere bestanden"
|
235 |
|
236 |
+
#: lib/yit-plugin-panel-wc.php:426
|
237 |
msgid "The changes you have made will be lost if you leave this page."
|
238 |
msgstr "Als je deze pagina verlaat zullen alle wijzigingen verloren gaan."
|
239 |
|
245 |
msgid "How to install premium version"
|
246 |
msgstr "Hoe installeer ik de premium versie"
|
247 |
|
248 |
+
#: lib/yit-plugin-panel.php:617 lib/yit-plugin-subpanel.php:151
|
249 |
#: templates/panel/woocommerce/woocommerce-form.php:14
|
250 |
msgid "Save Changes"
|
251 |
msgstr "Wijzigingen opslaan"
|
252 |
|
253 |
+
#: lib/yit-plugin-panel.php:621 lib/yit-plugin-subpanel.php:154
|
254 |
#: templates/panel/woocommerce/woocommerce-form.php:17
|
255 |
msgid ""
|
256 |
"If you continue with this action, you will reset all options in this page."
|
257 |
msgstr "Als u deze actie voortzet, zult u alle opties op deze pagina resetten."
|
258 |
|
259 |
+
#: lib/yit-plugin-panel.php:624 lib/yit-plugin-subpanel.php:156
|
260 |
msgid "Reset to default"
|
261 |
msgstr "Resetten naar standaard"
|
262 |
|
263 |
+
#: lib/yit-plugin-panel.php:625 lib/yit-plugin-subpanel.php:157
|
264 |
#: templates/panel/woocommerce/woocommerce-form.php:21
|
265 |
msgid "Are you sure?"
|
266 |
msgstr "Weet u het zeker?"
|
267 |
|
268 |
+
#: lib/yit-plugin-panel.php:823
|
269 |
msgid ""
|
270 |
"The element you have entered already exists. Please, enter another name."
|
271 |
msgstr "Het element dat u hebt ingevoerd bestaat al. Voer een andere naam in."
|
272 |
|
273 |
+
#: lib/yit-plugin-panel.php:824
|
274 |
msgid "Settings saved"
|
275 |
msgstr "Instellingen opgeslagen"
|
276 |
|
277 |
+
#: lib/yit-plugin-panel.php:825
|
278 |
msgid "Settings reset"
|
279 |
msgstr "Instellingen resetten"
|
280 |
|
281 |
+
#: lib/yit-plugin-panel.php:826
|
282 |
msgid "Element deleted correctly."
|
283 |
msgstr "Element succesvol verwijderd."
|
284 |
|
285 |
+
#: lib/yit-plugin-panel.php:827 lib/yit-plugin-panel.php:828
|
286 |
msgid "Element updated correctly."
|
287 |
msgstr "Element juist bijgewerkt."
|
288 |
|
289 |
+
#: lib/yit-plugin-panel.php:829
|
290 |
msgid "Database imported correctly."
|
291 |
msgstr "Database juist geïmporteerd."
|
292 |
|
293 |
+
#: lib/yit-plugin-panel.php:830
|
294 |
msgid "An error has occurred during import. Please try again."
|
295 |
msgstr "Er is een fout opgetreden tijdens importeren. Probeer opnieuw."
|
296 |
|
297 |
+
#: lib/yit-plugin-panel.php:831
|
298 |
msgid "The added file is not valid."
|
299 |
msgstr "Het toegevoegde bestand is ongeldig."
|
300 |
|
301 |
+
#: lib/yit-plugin-panel.php:832
|
302 |
msgid "Sorry, import is disabled."
|
303 |
msgstr "Sorry, importeren is uitgeschakeld."
|
304 |
|
305 |
+
#: lib/yit-plugin-panel.php:833
|
306 |
msgid "Sorting successful."
|
307 |
msgstr "Sorteren succesvol."
|
308 |
|
309 |
+
#: lib/yit-plugin-panel.php:1281
|
310 |
msgid "We need your support"
|
311 |
msgstr "We hebben uw hulp nodig"
|
312 |
|
313 |
+
#: lib/yit-plugin-panel.php:1282
|
314 |
msgid "to keep updating and improving the plugin. Please,"
|
315 |
msgstr "om de plugin te blijven updaten en verbeteren. A.u.b.,"
|
316 |
|
317 |
+
#: lib/yit-plugin-panel.php:1284
|
318 |
msgid "help us by leaving a five-star rating"
|
319 |
msgstr "help ons door een vijf-sterenbeoordeling achter te laten"
|
320 |
|
321 |
+
#: lib/yit-plugin-panel.php:1285
|
322 |
msgid ":) Thanks!"
|
323 |
msgstr ":) Bedankt!"
|
324 |
|
1223 |
#~ msgid "Renew license"
|
1224 |
#~ msgstr "Licentie vernieuwen"
|
1225 |
|
|
|
|
|
|
|
1226 |
#~ msgid "Deselect All"
|
1227 |
#~ msgstr "Selectie ongedaan maken"
|
plugin-fw/languages/yith-plugin-fw.pot
CHANGED
@@ -4,7 +4,7 @@ msgid ""
|
|
4 |
msgstr ""
|
5 |
"Project-Id-Version: \n"
|
6 |
"Report-Msgid-Bugs-To: YITH <plugins@yithemes.com>\n"
|
7 |
-
"POT-Creation-Date: 2020-
|
8 |
"MIME-Version: 1.0\n"
|
9 |
"Content-Type: text/plain; charset=utf-8\n"
|
10 |
"Content-Transfer-Encoding: 8bit\n"
|
@@ -24,6 +24,30 @@ msgstr ""
|
|
24 |
"X-Textdomain-Support: yes\n"
|
25 |
"X-Generator: grunt-wp-i18n 1.0.3\n"
|
26 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
27 |
#: lib/yit-cpt-unlimited.php:462 lib/yit-cpt-unlimited.php:576
|
28 |
#: lib/yit-cpt-unlimited.php:721 lib/yit-cpt-unlimited.php:1636
|
29 |
msgid "Add %s"
|
@@ -198,7 +222,7 @@ msgstr ""
|
|
198 |
msgid "Upload multiple files"
|
199 |
msgstr ""
|
200 |
|
201 |
-
#: lib/yit-plugin-panel-wc.php:
|
202 |
msgid "The changes you have made will be lost if you leave this page."
|
203 |
msgstr ""
|
204 |
|
@@ -210,78 +234,78 @@ msgstr ""
|
|
210 |
msgid "How to install premium version"
|
211 |
msgstr ""
|
212 |
|
213 |
-
#: lib/yit-plugin-panel.php:
|
214 |
#: templates/panel/woocommerce/woocommerce-form.php:14
|
215 |
msgid "Save Changes"
|
216 |
msgstr ""
|
217 |
|
218 |
-
#: lib/yit-plugin-panel.php:
|
219 |
#: templates/panel/woocommerce/woocommerce-form.php:17
|
220 |
msgid "If you continue with this action, you will reset all options in this page."
|
221 |
msgstr ""
|
222 |
|
223 |
-
#: lib/yit-plugin-panel.php:
|
224 |
msgid "Reset to default"
|
225 |
msgstr ""
|
226 |
|
227 |
-
#: lib/yit-plugin-panel.php:
|
228 |
#: templates/panel/woocommerce/woocommerce-form.php:21
|
229 |
msgid "Are you sure?"
|
230 |
msgstr ""
|
231 |
|
232 |
-
#: lib/yit-plugin-panel.php:
|
233 |
msgid "The element you have entered already exists. Please, enter another name."
|
234 |
msgstr ""
|
235 |
|
236 |
-
#: lib/yit-plugin-panel.php:
|
237 |
msgid "Settings saved"
|
238 |
msgstr ""
|
239 |
|
240 |
-
#: lib/yit-plugin-panel.php:
|
241 |
msgid "Settings reset"
|
242 |
msgstr ""
|
243 |
|
244 |
-
#: lib/yit-plugin-panel.php:
|
245 |
msgid "Element deleted correctly."
|
246 |
msgstr ""
|
247 |
|
248 |
-
#: lib/yit-plugin-panel.php:
|
249 |
msgid "Element updated correctly."
|
250 |
msgstr ""
|
251 |
|
252 |
-
#: lib/yit-plugin-panel.php:
|
253 |
msgid "Database imported correctly."
|
254 |
msgstr ""
|
255 |
|
256 |
-
#: lib/yit-plugin-panel.php:
|
257 |
msgid "An error has occurred during import. Please try again."
|
258 |
msgstr ""
|
259 |
|
260 |
-
#: lib/yit-plugin-panel.php:
|
261 |
msgid "The added file is not valid."
|
262 |
msgstr ""
|
263 |
|
264 |
-
#: lib/yit-plugin-panel.php:
|
265 |
msgid "Sorry, import is disabled."
|
266 |
msgstr ""
|
267 |
|
268 |
-
#: lib/yit-plugin-panel.php:
|
269 |
msgid "Sorting successful."
|
270 |
msgstr ""
|
271 |
|
272 |
-
#: lib/yit-plugin-panel.php:
|
273 |
msgid "We need your support"
|
274 |
msgstr ""
|
275 |
|
276 |
-
#: lib/yit-plugin-panel.php:
|
277 |
msgid "to keep updating and improving the plugin. Please,"
|
278 |
msgstr ""
|
279 |
|
280 |
-
#: lib/yit-plugin-panel.php:
|
281 |
msgid "help us by leaving a five-star rating"
|
282 |
msgstr ""
|
283 |
|
284 |
-
#: lib/yit-plugin-panel.php:
|
285 |
msgid ":) Thanks!"
|
286 |
msgstr ""
|
287 |
|
4 |
msgstr ""
|
5 |
"Project-Id-Version: \n"
|
6 |
"Report-Msgid-Bugs-To: YITH <plugins@yithemes.com>\n"
|
7 |
+
"POT-Creation-Date: 2020-08-07 14:15:08+00:00\n"
|
8 |
"MIME-Version: 1.0\n"
|
9 |
"Content-Type: text/plain; charset=utf-8\n"
|
10 |
"Content-Transfer-Encoding: 8bit\n"
|
24 |
"X-Textdomain-Support: yes\n"
|
25 |
"X-Generator: grunt-wp-i18n 1.0.3\n"
|
26 |
|
27 |
+
#: lib/yit-assets.php:102
|
28 |
+
msgid "Clear"
|
29 |
+
msgstr ""
|
30 |
+
|
31 |
+
#: lib/yit-assets.php:103
|
32 |
+
msgid "Clear color"
|
33 |
+
msgstr ""
|
34 |
+
|
35 |
+
#: lib/yit-assets.php:104
|
36 |
+
msgid "Default"
|
37 |
+
msgstr ""
|
38 |
+
|
39 |
+
#: lib/yit-assets.php:105
|
40 |
+
msgid "Select default color"
|
41 |
+
msgstr ""
|
42 |
+
|
43 |
+
#: lib/yit-assets.php:106
|
44 |
+
msgid "Select Color"
|
45 |
+
msgstr ""
|
46 |
+
|
47 |
+
#: lib/yit-assets.php:107
|
48 |
+
msgid "Color value"
|
49 |
+
msgstr ""
|
50 |
+
|
51 |
#: lib/yit-cpt-unlimited.php:462 lib/yit-cpt-unlimited.php:576
|
52 |
#: lib/yit-cpt-unlimited.php:721 lib/yit-cpt-unlimited.php:1636
|
53 |
msgid "Add %s"
|
222 |
msgid "Upload multiple files"
|
223 |
msgstr ""
|
224 |
|
225 |
+
#: lib/yit-plugin-panel-wc.php:426
|
226 |
msgid "The changes you have made will be lost if you leave this page."
|
227 |
msgstr ""
|
228 |
|
234 |
msgid "How to install premium version"
|
235 |
msgstr ""
|
236 |
|
237 |
+
#: lib/yit-plugin-panel.php:617 lib/yit-plugin-subpanel.php:151
|
238 |
#: templates/panel/woocommerce/woocommerce-form.php:14
|
239 |
msgid "Save Changes"
|
240 |
msgstr ""
|
241 |
|
242 |
+
#: lib/yit-plugin-panel.php:621 lib/yit-plugin-subpanel.php:154
|
243 |
#: templates/panel/woocommerce/woocommerce-form.php:17
|
244 |
msgid "If you continue with this action, you will reset all options in this page."
|
245 |
msgstr ""
|
246 |
|
247 |
+
#: lib/yit-plugin-panel.php:624 lib/yit-plugin-subpanel.php:156
|
248 |
msgid "Reset to default"
|
249 |
msgstr ""
|
250 |
|
251 |
+
#: lib/yit-plugin-panel.php:625 lib/yit-plugin-subpanel.php:157
|
252 |
#: templates/panel/woocommerce/woocommerce-form.php:21
|
253 |
msgid "Are you sure?"
|
254 |
msgstr ""
|
255 |
|
256 |
+
#: lib/yit-plugin-panel.php:823
|
257 |
msgid "The element you have entered already exists. Please, enter another name."
|
258 |
msgstr ""
|
259 |
|
260 |
+
#: lib/yit-plugin-panel.php:824
|
261 |
msgid "Settings saved"
|
262 |
msgstr ""
|
263 |
|
264 |
+
#: lib/yit-plugin-panel.php:825
|
265 |
msgid "Settings reset"
|
266 |
msgstr ""
|
267 |
|
268 |
+
#: lib/yit-plugin-panel.php:826
|
269 |
msgid "Element deleted correctly."
|
270 |
msgstr ""
|
271 |
|
272 |
+
#: lib/yit-plugin-panel.php:827 lib/yit-plugin-panel.php:828
|
273 |
msgid "Element updated correctly."
|
274 |
msgstr ""
|
275 |
|
276 |
+
#: lib/yit-plugin-panel.php:829
|
277 |
msgid "Database imported correctly."
|
278 |
msgstr ""
|
279 |
|
280 |
+
#: lib/yit-plugin-panel.php:830
|
281 |
msgid "An error has occurred during import. Please try again."
|
282 |
msgstr ""
|
283 |
|
284 |
+
#: lib/yit-plugin-panel.php:831
|
285 |
msgid "The added file is not valid."
|
286 |
msgstr ""
|
287 |
|
288 |
+
#: lib/yit-plugin-panel.php:832
|
289 |
msgid "Sorry, import is disabled."
|
290 |
msgstr ""
|
291 |
|
292 |
+
#: lib/yit-plugin-panel.php:833
|
293 |
msgid "Sorting successful."
|
294 |
msgstr ""
|
295 |
|
296 |
+
#: lib/yit-plugin-panel.php:1281
|
297 |
msgid "We need your support"
|
298 |
msgstr ""
|
299 |
|
300 |
+
#: lib/yit-plugin-panel.php:1282
|
301 |
msgid "to keep updating and improving the plugin. Please,"
|
302 |
msgstr ""
|
303 |
|
304 |
+
#: lib/yit-plugin-panel.php:1284
|
305 |
msgid "help us by leaving a five-star rating"
|
306 |
msgstr ""
|
307 |
|
308 |
+
#: lib/yit-plugin-panel.php:1285
|
309 |
msgid ":) Thanks!"
|
310 |
msgstr ""
|
311 |
|
plugin-fw/lib/privacy/yit-privacy.php
CHANGED
@@ -50,11 +50,11 @@ if ( !class_exists( 'YITH_Privacy' ) ) {
|
|
50 |
if ( file_exists( $privacy_content_path ) )
|
51 |
include $privacy_content_path;
|
52 |
|
53 |
-
return apply_filters( '
|
54 |
}
|
55 |
|
56 |
public function get_sections() {
|
57 |
-
return apply_filters( '
|
58 |
'general' => array(
|
59 |
'tutorial' => _x( 'This sample language includes the basics around what personal data your store may be collecting, storing and sharing, as well as who may have access to that data. Depending on what settings are enabled and which additional plugins are used, the specific information shared by your store will vary. We recommend consulting with a lawyer when deciding what information to disclose on your privacy policy.', 'Privacy Policy Content', 'yith-plugin-fw' ),
|
60 |
'description' => '',
|
50 |
if ( file_exists( $privacy_content_path ) )
|
51 |
include $privacy_content_path;
|
52 |
|
53 |
+
return apply_filters( 'yith_plugin_fw_privacy_policy_content', ob_get_clean() );
|
54 |
}
|
55 |
|
56 |
public function get_sections() {
|
57 |
+
return apply_filters( 'yith_plugin_fw_privacy_policy_content_sections', array(
|
58 |
'general' => array(
|
59 |
'tutorial' => _x( 'This sample language includes the basics around what personal data your store may be collecting, storing and sharing, as well as who may have access to that data. Depending on what settings are enabled and which additional plugins are used, the specific information shared by your store will vary. We recommend consulting with a lawyer when deciding what information to disclose on your privacy policy.', 'Privacy Policy Content', 'yith-plugin-fw' ),
|
60 |
'description' => '',
|
plugin-fw/lib/yit-assets.php
CHANGED
@@ -7,97 +7,111 @@
|
|
7 |
* http://www.gnu.org/licenses/gpl-3.0.txt
|
8 |
*/
|
9 |
|
10 |
-
!defined( 'ABSPATH' ) && exit; // Exit if accessed directly
|
11 |
-
|
12 |
-
if ( !class_exists( 'YIT_Assets' ) ) {
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
101 |
}
|
102 |
|
103 |
YIT_Assets::instance();
|
7 |
* http://www.gnu.org/licenses/gpl-3.0.txt
|
8 |
*/
|
9 |
|
10 |
+
! defined( 'ABSPATH' ) && exit; // Exit if accessed directly
|
11 |
+
|
12 |
+
if ( ! class_exists( 'YIT_Assets' ) ) {
|
13 |
+
/**
|
14 |
+
* YIT Assets
|
15 |
+
*
|
16 |
+
* @class YIT_Assets
|
17 |
+
* @package YITH
|
18 |
+
* @since 3.0.0
|
19 |
+
* @author Leanza Francesco <leanzafrancesco@gmail.com>
|
20 |
+
*/
|
21 |
+
class YIT_Assets {
|
22 |
+
/** @var string */
|
23 |
+
public $version = '1.0.0';
|
24 |
+
|
25 |
+
/** @var YIT_Assets */
|
26 |
+
private static $_instance;
|
27 |
+
|
28 |
+
/** @return YIT_Assets */
|
29 |
+
public static function instance() {
|
30 |
+
return ! is_null( self::$_instance ) ? self::$_instance : self::$_instance = new self();
|
31 |
+
}
|
32 |
+
|
33 |
+
/**
|
34 |
+
* Constructor
|
35 |
+
*
|
36 |
+
* @since 1.0
|
37 |
+
* @author Leanza Francesco <leanzafrancesco@gmail.com>
|
38 |
+
*/
|
39 |
+
private function __construct() {
|
40 |
+
$this->version = yith_plugin_fw_get_version();
|
41 |
+
add_action( 'admin_enqueue_scripts', array( $this, 'register_styles_and_scripts' ) );
|
42 |
+
}
|
43 |
+
|
44 |
+
/**
|
45 |
+
* Register styles and scripts
|
46 |
+
*/
|
47 |
+
public function register_styles_and_scripts() {
|
48 |
+
global $wp_scripts, $woocommerce, $wp_version;
|
49 |
+
|
50 |
+
$suffix = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min';
|
51 |
+
|
52 |
+
//scripts
|
53 |
+
wp_register_script( 'yith-colorpicker', YIT_CORE_PLUGIN_URL . '/assets/js/yith-colorpicker.min.js', array( 'jquery', 'wp-color-picker' ), $this->version, true );
|
54 |
+
wp_register_script( 'yith-plugin-fw-fields', YIT_CORE_PLUGIN_URL . '/assets/js/yith-fields' . $suffix . '.js', array( 'jquery', 'jquery-ui-datepicker', 'yith-colorpicker', 'codemirror', 'codemirror-javascript', 'jquery-ui-slider', 'jquery-ui-sortable' ), $this->version, true );
|
55 |
+
|
56 |
+
wp_register_script( 'yit-metabox', YIT_CORE_PLUGIN_URL . '/assets/js/metabox' . $suffix . '.js', array( 'jquery', 'wp-color-picker', 'yith-plugin-fw-fields' ), $this->version, true );
|
57 |
+
wp_register_script( 'yit-plugin-panel', YIT_CORE_PLUGIN_URL . '/assets/js/yit-plugin-panel' . $suffix . '.js', array( 'jquery', 'wp-color-picker', 'jquery-ui-sortable', 'yith-plugin-fw-fields' ), $this->version, true );
|
58 |
+
wp_register_script( 'codemirror', YIT_CORE_PLUGIN_URL . '/assets/js/codemirror/codemirror.js', array( 'jquery' ), '3.15', true );
|
59 |
+
wp_register_script( 'codemirror-javascript', YIT_CORE_PLUGIN_URL . '/assets/js/codemirror/javascript.js', array( 'jquery', 'codemirror' ), '3.15', true );
|
60 |
+
wp_register_script( 'colorbox', YIT_CORE_PLUGIN_URL . '/assets/js/jquery.colorbox' . $suffix . '.js', array( 'jquery' ), '1.6.3', true );
|
61 |
+
wp_register_script( 'yith_how_to', YIT_CORE_PLUGIN_URL . '/assets/js/how-to' . $suffix . '.js', array( 'jquery' ), $this->version, true );
|
62 |
+
wp_register_script( 'yith-plugin-fw-wp-pages', YIT_CORE_PLUGIN_URL . '/assets/js/wp-pages' . $suffix . '.js', array( 'jquery' ), $this->version, false );
|
63 |
+
|
64 |
+
//styles
|
65 |
+
$jquery_version = isset( $wp_scripts->registered['jquery-ui-core']->ver ) ? $wp_scripts->registered['jquery-ui-core']->ver : '1.9.2';
|
66 |
+
wp_register_style( 'codemirror', YIT_CORE_PLUGIN_URL . '/assets/css/codemirror/codemirror.css' );
|
67 |
+
wp_register_style( 'yit-plugin-style', YIT_CORE_PLUGIN_URL . '/assets/css/yit-plugin-panel.css', array(), $this->version );
|
68 |
+
wp_register_style( 'raleway-font', '//fonts.googleapis.com/css?family=Raleway:400,500,600,700,800,100,200,300,900' );
|
69 |
+
wp_register_style( 'yit-jquery-ui-style', '//code.jquery.com/ui/' . $jquery_version . '/themes/smoothness/jquery-ui.css', array(), $jquery_version );
|
70 |
+
wp_register_style( 'colorbox', YIT_CORE_PLUGIN_URL . '/assets/css/colorbox.css', array(), $this->version );
|
71 |
+
wp_register_style( 'yit-upgrade-to-pro', YIT_CORE_PLUGIN_URL . '/assets/css/yit-upgrade-to-pro.css', array( 'colorbox' ), $this->version );
|
72 |
+
wp_register_style( 'yit-plugin-metaboxes', YIT_CORE_PLUGIN_URL . '/assets/css/metaboxes.css', array(), $this->version );
|
73 |
+
wp_register_style( 'yith-plugin-fw-fields', YIT_CORE_PLUGIN_URL . '/assets/css/yith-fields.css', false, $this->version );
|
74 |
+
|
75 |
+
$wc_version_suffix = '';
|
76 |
+
if ( function_exists( 'WC' ) || ! empty( $woocommerce ) ) {
|
77 |
+
$woocommerce_version = function_exists( 'WC' ) ? WC()->version : $woocommerce->version;
|
78 |
+
$wc_version_suffix = version_compare( $woocommerce_version, '3.0.0', '>=' ) ? '' : '-wc-2.6';
|
79 |
+
|
80 |
+
wp_register_style( 'woocommerce_admin_styles', $woocommerce->plugin_url() . '/assets/css/admin.css', array(), $woocommerce_version );
|
81 |
+
} else {
|
82 |
+
wp_register_script( 'select2', '//cdnjs.cloudflare.com/ajax/libs/select2/4.0.3/js/select2.min.js', array( 'jquery' ), '4.0.3', true );
|
83 |
+
wp_register_style( 'yith-select2-no-wc', YIT_CORE_PLUGIN_URL . '/assets/css/yith-select2-no-wc.css', false, $this->version );
|
84 |
+
}
|
85 |
+
|
86 |
+
wp_register_script( 'yith-enhanced-select', YIT_CORE_PLUGIN_URL . '/assets/js/yith-enhanced-select' . $wc_version_suffix . $suffix . '.js', array( 'jquery', 'select2' ), $this->version, true );
|
87 |
+
wp_localize_script( 'yith-enhanced-select', 'yith_framework_enhanced_select_params', array(
|
88 |
+
'ajax_url' => admin_url( 'admin-ajax.php' ),
|
89 |
+
'search_posts_nonce' => wp_create_nonce( 'search-posts' ),
|
90 |
+
'search_terms_nonce' => wp_create_nonce( 'search-terms' ),
|
91 |
+
'search_customers_nonce' => wp_create_nonce( 'search-customers' ),
|
92 |
+
) );
|
93 |
+
|
94 |
+
wp_localize_script( 'yith-plugin-fw-fields', 'yith_framework_fw_fields', array(
|
95 |
+
'admin_url' => admin_url( 'admin.php' ),
|
96 |
+
'ajax_url' => admin_url( 'admin-ajax.php' ),
|
97 |
+
) );
|
98 |
+
|
99 |
+
|
100 |
+
// Localize Colorpicker to avoid issues with WordPress 5.5
|
101 |
+
if ( version_compare( $wp_version, '5.5-RC', '>=' ) ) {
|
102 |
+
wp_localize_script( 'yith-colorpicker', 'wpColorPickerL10n', array(
|
103 |
+
'clear' => __( 'Clear' ),
|
104 |
+
'clearAriaLabel' => __( 'Clear color' ),
|
105 |
+
'defaultString' => __( 'Default' ),
|
106 |
+
'defaultAriaLabel' => __( 'Select default color' ),
|
107 |
+
'pick' => __( 'Select Color' ),
|
108 |
+
'defaultLabel' => __( 'Color value' ),
|
109 |
+
) );
|
110 |
+
}
|
111 |
+
|
112 |
+
wp_enqueue_style( 'yith-plugin-fw-admin', YIT_CORE_PLUGIN_URL . '/assets/css/admin.css', array(), $this->version );
|
113 |
+
}
|
114 |
+
}
|
115 |
}
|
116 |
|
117 |
YIT_Assets::instance();
|
plugin-fw/lib/yit-plugin-panel-wc.php
CHANGED
@@ -213,12 +213,13 @@ if ( !class_exists( 'YIT_Plugin_Panel_WooCommerce' ) ) {
|
|
213 |
public function get_current_tab() {
|
214 |
global $pagenow;
|
215 |
$tabs = $this->get_available_tabs();
|
|
|
216 |
|
217 |
-
|
218 |
-
|
219 |
-
} else {
|
220 |
-
return $tabs[ 0 ];
|
221 |
}
|
|
|
|
|
222 |
}
|
223 |
|
224 |
/**
|
@@ -343,18 +344,41 @@ if ( !class_exists( 'YIT_Plugin_Panel_WooCommerce' ) ) {
|
|
343 |
$option_key = $this->get_current_option_key();
|
344 |
$yit_options = $this->check_for_save_single_option( $yit_options );
|
345 |
|
|
|
|
|
|
|
346 |
foreach ( $yit_options[ $option_key ] as $id => $option ) {
|
347 |
-
|
348 |
-
|
349 |
-
|
350 |
-
|
351 |
-
|
352 |
-
|
353 |
-
|
354 |
-
|
355 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
356 |
}
|
357 |
|
|
|
|
|
|
|
|
|
|
|
|
|
358 |
do_action( 'yit_panel_wc_after_reset' );
|
359 |
}
|
360 |
}
|
@@ -623,6 +647,9 @@ if ( !class_exists( 'YIT_Plugin_Panel_WooCommerce' ) ) {
|
|
623 |
}
|
624 |
$field[ 'value' ] = $value;
|
625 |
|
|
|
|
|
|
|
626 |
require( YIT_CORE_PLUGIN_TEMPLATE_PATH . '/panel/woocommerce/woocommerce-option-row.php' );
|
627 |
}
|
628 |
}
|
213 |
public function get_current_tab() {
|
214 |
global $pagenow;
|
215 |
$tabs = $this->get_available_tabs();
|
216 |
+
$tab = $tabs[0];
|
217 |
|
218 |
+
if ( $pagenow == 'admin.php' && isset( $_REQUEST[ 'tab' ] ) && in_array( $_REQUEST[ 'tab' ], $tabs ) ) {
|
219 |
+
$tab = esc_html( $_REQUEST[ 'tab' ] );
|
|
|
|
|
220 |
}
|
221 |
+
|
222 |
+
return apply_filters('yith_wc_plugin_panel_current_tab', $tab );
|
223 |
}
|
224 |
|
225 |
/**
|
344 |
$option_key = $this->get_current_option_key();
|
345 |
$yit_options = $this->check_for_save_single_option( $yit_options );
|
346 |
|
347 |
+
// Collect an array of options to be saved as array and not as single option.
|
348 |
+
$array_options = array();
|
349 |
+
|
350 |
foreach ( $yit_options[ $option_key ] as $id => $option ) {
|
351 |
+
|
352 |
+
// make sure option id is not an array
|
353 |
+
$matches = array();
|
354 |
+
isset( $option['id'] ) && preg_match('/(.*)\[(.*)\]/', $option['id'], $matches );
|
355 |
+
|
356 |
+
if( ! empty( $matches ) && isset( $option['default'] ) ) {
|
357 |
+
if( ! empty( $matches[2] ) ) {
|
358 |
+
$array_options[ $matches[1] ][ $matches[2] ] = $option[ 'default' ];
|
359 |
+
} else {
|
360 |
+
$array_options[ $matches[1] ][] = $option[ 'default' ];
|
361 |
+
}
|
362 |
+
}
|
363 |
+
else {
|
364 |
+
if ( isset( $option['yith-type'] ) && $option['yith-type'] == 'multi-colorpicker' && ! empty( $option['colorpickers'] ) ) {
|
365 |
+
$default = [];
|
366 |
+
foreach ( $option['colorpickers'] as $colorpicker ) {
|
367 |
+
$default[ $colorpicker['id'] ] = isset( $colorpicker['default'] ) ? $colorpicker['default'] : '';
|
368 |
+
}
|
369 |
+
update_option( $option['id'], $default );
|
370 |
+
} elseif ( isset( $option['default'] ) ) {
|
371 |
+
update_option( $option['id'], $option['default'] );
|
372 |
+
}
|
373 |
+
}
|
374 |
}
|
375 |
|
376 |
+
// Save array options if any
|
377 |
+
foreach ( $array_options as $key => $value ) {
|
378 |
+
update_option( $key, $value );
|
379 |
+
}
|
380 |
+
|
381 |
+
|
382 |
do_action( 'yit_panel_wc_after_reset' );
|
383 |
}
|
384 |
}
|
647 |
}
|
648 |
$field[ 'value' ] = $value;
|
649 |
|
650 |
+
// let's filter field data just before print
|
651 |
+
$field = apply_filters( 'yith_plugin_fw_wc_panel_field_data', $field );
|
652 |
+
|
653 |
require( YIT_CORE_PLUGIN_TEMPLATE_PATH . '/panel/woocommerce/woocommerce-option-row.php' );
|
654 |
}
|
655 |
}
|
plugin-fw/lib/yit-plugin-panel.php
CHANGED
@@ -7,111 +7,111 @@
|
|
7 |
* http://www.gnu.org/licenses/gpl-3.0.txt
|
8 |
*/
|
9 |
|
10 |
-
if ( !defined( 'ABSPATH' ) ) {
|
11 |
-
|
12 |
} // Exit if accessed directly
|
13 |
|
14 |
-
if ( !class_exists( 'YIT_Plugin_Panel' ) ) {
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
|
75 |
-
|
76 |
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
|
90 |
-
|
91 |
-
|
92 |
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
|
107 |
-
|
108 |
add_action( 'admin_init', array( $this, 'maybe_redirect_to_proper_wp_page' ) );
|
109 |
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
|
114 |
-
|
115 |
|
116 |
//yith-plugin-ui
|
117 |
add_action( 'yith_plugin_fw_before_yith_panel', array( $this, 'add_plugin_banner' ), 10, 1 );
|
@@ -130,7 +130,7 @@ if ( !class_exists( 'YIT_Plugin_Panel' ) ) {
|
|
130 |
$excluded_post_types = array( 'product', 'page', 'post' );
|
131 |
|
132 |
return in_array( $pagenow, array( 'post.php', 'post-new.php', 'edit.php' ), true ) &&
|
133 |
-
|
134 |
}
|
135 |
|
136 |
/**
|
@@ -145,1213 +145,1230 @@ if ( !class_exists( 'YIT_Plugin_Panel' ) ) {
|
|
145 |
$excluded_taxonomies = array( 'category', 'post_tag', 'product_cat', 'product_tag' );
|
146 |
|
147 |
return in_array( $pagenow, array( 'edit-tags.php', 'term.php' ), true ) &&
|
148 |
-
|
149 |
}
|
150 |
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
|
162 |
-
|
163 |
-
|
164 |
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
178 |
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
add_filter( 'submenu_file', array( $this, 'set_submenu_file_to_handle_menu_for_wp_pages' ), 10, 2 );
|
189 |
-
}
|
190 |
-
}
|
191 |
-
}
|
192 |
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
* @since 3.0.0
|
197 |
-
* @author Leanza Francesco <leanzafrancesco@gmail.com>
|
198 |
-
*/
|
199 |
-
protected static function _init_actions() {
|
200 |
-
if ( !static::$_actions_initialized ) {
|
201 |
-
add_filter( 'admin_body_class', array( __CLASS__, 'add_body_class' ) );
|
202 |
|
203 |
-
// sort plugins by name in YITH Plugins menu
|
204 |
-
add_action( 'admin_menu', array( __CLASS__, 'sort_plugins' ), 90 );
|
205 |
-
add_filter( 'add_menu_classes', array( __CLASS__, 'add_menu_class_in_yith_plugin' ) );
|
206 |
|
|
|
|
|
|
|
207 |
|
208 |
-
|
209 |
-
|
210 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
211 |
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
|
224 |
-
$sub_tabs = $this->get_sub_tabs( $_tab );
|
225 |
-
$current_tab_key = array_keys( $_tab )[ 0 ];
|
226 |
-
|
227 |
-
$this->_tabs_hierarchy[ $current_tab_key ] = array_merge( array( 'parent' => '', 'has_sub_tabs' => !!$sub_tabs ), $this->get_tab_info_by_options( $_tab[ $current_tab_key ] ) );
|
228 |
-
|
229 |
-
foreach ( $sub_tabs as $sub_item => $sub_options ) {
|
230 |
-
if ( strpos( $sub_item, $item . '-' ) === 0 ) {
|
231 |
-
$sub_item = substr( $sub_item, strlen( $item ) + 1 );
|
232 |
-
}
|
233 |
-
$sub_tab_path = $options_path . '/' . $item . '/' . $sub_item . '-options.php';
|
234 |
-
$sub_tab_path = apply_filters( 'yith_plugin_panel_sub_tab_item_options_path', $sub_tab_path, $sub_tabs, $sub_item, $this );
|
235 |
-
|
236 |
-
if ( file_exists( $sub_tab_path ) ) {
|
237 |
-
$_sub_tab = include $sub_tab_path;
|
238 |
-
$this->_main_array_options = array_merge( $this->_main_array_options, $_sub_tab );
|
239 |
-
|
240 |
-
$current_sub_tab_key = array_keys( $_sub_tab )[ 0 ];
|
241 |
-
$this->_tabs_hierarchy[ $current_sub_tab_key ] = array_merge( array( 'parent' => $current_tab_key ), $this->get_tab_info_by_options( $_sub_tab[ $current_sub_tab_key ] ) );
|
242 |
-
}
|
243 |
-
}
|
244 |
-
}
|
245 |
-
}
|
246 |
-
}
|
247 |
-
}
|
248 |
|
249 |
-
|
250 |
-
|
251 |
-
*
|
252 |
-
* @param $admin_body_classes
|
253 |
-
* @return string
|
254 |
-
* @author Leanza Francesco <leanzafrancesco@gmail.com>
|
255 |
-
* @since 3.0.0
|
256 |
-
*/
|
257 |
-
public static function add_body_class( $admin_body_classes ) {
|
258 |
-
global $pagenow;
|
259 |
-
if ( ( 'admin.php' == $pagenow && strpos( get_current_screen()->id, 'yith-plugins_page' ) !== false ) )
|
260 |
-
$admin_body_classes = substr_count( $admin_body_classes, ' yith-plugin-fw-panel ' ) == 0 ? $admin_body_classes . ' yith-plugin-fw-panel ' : $admin_body_classes;
|
261 |
|
262 |
-
|
263 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
264 |
|
265 |
-
|
266 |
-
|
267 |
-
|
268 |
-
|
269 |
-
|
270 |
-
|
271 |
-
|
272 |
-
|
273 |
-
|
274 |
-
|
275 |
-
|
276 |
-
|
277 |
-
$capability = apply_filters( 'yit_plugin_panel_menu_page_capability', 'manage_options' );
|
278 |
-
$show = apply_filters( 'yit_plugin_panel_menu_page_show', true );
|
279 |
-
|
280 |
-
// YITH text must not be translated
|
281 |
-
if ( !!$show ) {
|
282 |
-
add_menu_page( 'yith_plugin_panel', 'YITH', $capability, 'yith_plugin_panel', null, yith_plugin_fw_get_default_logo(), $position );
|
283 |
-
$admin_page_hooks[ 'yith_plugin_panel' ] = 'yith-plugins'; // prevent issues for backward compatibility
|
284 |
-
}
|
285 |
-
}
|
286 |
-
}
|
287 |
|
288 |
-
|
289 |
-
|
290 |
-
|
291 |
-
|
292 |
-
|
293 |
-
|
294 |
-
|
295 |
-
|
296 |
-
|
297 |
-
|
298 |
-
|
299 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
300 |
|
301 |
-
|
302 |
-
|
303 |
-
|
304 |
-
|
305 |
-
|
306 |
-
* @since 1.0
|
307 |
-
* @author Emanuela Castorina <emanuela.castorina@yithemes.it>
|
308 |
-
* @author Leanza Francesco <leanzafrancesco@gmail.com>
|
309 |
-
*/
|
310 |
-
public function admin_enqueue_scripts() {
|
311 |
-
global $pagenow;
|
312 |
-
|
313 |
-
// enqueue styles only in the current panel page
|
314 |
-
if ( 'admin.php' === $pagenow && strpos( get_current_screen()->id, $this->settings[ 'page' ] ) !== false || apply_filters( 'yit_plugin_panel_asset_loading', false ) ) {
|
315 |
-
wp_enqueue_media();
|
316 |
-
|
317 |
-
wp_enqueue_style( 'yith-plugin-fw-fields' );
|
318 |
-
wp_enqueue_style( 'yit-jquery-ui-style' );
|
319 |
-
wp_enqueue_style( 'raleway-font' );
|
320 |
-
|
321 |
-
wp_enqueue_script( 'jquery-ui' );
|
322 |
-
wp_enqueue_script( 'jquery-ui-core' );
|
323 |
-
wp_enqueue_script( 'jquery-ui-dialog' );
|
324 |
-
wp_enqueue_script( 'yith_how_to' );
|
325 |
-
wp_enqueue_script( 'yith-plugin-fw-fields' );
|
326 |
-
}
|
327 |
|
328 |
-
|
329 |
-
|
330 |
-
|
331 |
-
|
332 |
-
}
|
333 |
|
334 |
-
|
335 |
-
wp_enqueue_style( 'yit-upgrade-to-pro' );
|
336 |
-
wp_enqueue_script( 'colorbox' );
|
337 |
-
}
|
338 |
|
339 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
340 |
|
341 |
-
|
342 |
-
|
343 |
-
|
344 |
-
|
345 |
-
|
346 |
-
|
347 |
-
|
348 |
-
|
349 |
-
|
350 |
-
|
351 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
352 |
|
353 |
-
|
354 |
-
|
355 |
-
* a callback function called by Register Settings function
|
356 |
-
*
|
357 |
-
* @param $input
|
358 |
-
* @return array validate input fields
|
359 |
-
* @since 1.0
|
360 |
-
* @author Emanuela Castorina <emanuela.castorina@yithemes.it>
|
361 |
-
*/
|
362 |
-
public function options_validate( $input ) {
|
363 |
-
|
364 |
-
$option_key = !empty( $input[ 'option_key' ] ) ? $input[ 'option_key' ] : 'general';
|
365 |
-
|
366 |
-
$yit_options = $this->get_main_array_options();
|
367 |
-
|
368 |
-
// default
|
369 |
-
$valid_input = $this->get_options();
|
370 |
-
|
371 |
-
$submit = ( !empty( $input[ 'submit-general' ] ) ? true : false );
|
372 |
-
$reset = ( !empty( $input[ 'reset-general' ] ) ? true : false );
|
373 |
-
|
374 |
-
foreach ( $yit_options[ $option_key ] as $section => $data ) {
|
375 |
-
foreach ( $data as $option ) {
|
376 |
-
if ( isset( $option[ 'sanitize_call' ] ) && isset( $option[ 'id' ] ) ) { //yiw_debug($option, false);
|
377 |
-
if ( is_array( $option[ 'sanitize_call' ] ) ) :
|
378 |
-
foreach ( $option[ 'sanitize_call' ] as $callback ) {
|
379 |
-
if ( is_array( $input[ $option[ 'id' ] ] ) ) {
|
380 |
-
$valid_input[ $option[ 'id' ] ] = array_map( $callback, $input[ $option[ 'id' ] ] );
|
381 |
-
} else {
|
382 |
-
$valid_input[ $option[ 'id' ] ] = call_user_func( $callback, $input[ $option[ 'id' ] ] );
|
383 |
-
}
|
384 |
-
}
|
385 |
-
else :
|
386 |
-
if ( is_array( $input[ $option[ 'id' ] ] ) ) {
|
387 |
-
$valid_input[ $option[ 'id' ] ] = array_map( $option[ 'sanitize_call' ], $input[ $option[ 'id' ] ] );
|
388 |
-
} else {
|
389 |
-
$valid_input[ $option[ 'id' ] ] = call_user_func( $option[ 'sanitize_call' ], $input[ $option[ 'id' ] ] );
|
390 |
-
}
|
391 |
-
endif;
|
392 |
-
} else {
|
393 |
-
if ( isset( $option[ 'id' ] ) ) {
|
394 |
-
$value = isset( $input[ $option[ 'id' ] ] ) ? $input[ $option[ 'id' ] ] : false;
|
395 |
-
if ( isset( $option[ 'type' ] ) && in_array( $option[ 'type' ], array( 'checkbox', 'onoff' ) ) ) {
|
396 |
-
$value = yith_plugin_fw_is_true( $value ) ? 'yes' : 'no';
|
397 |
-
}
|
398 |
-
|
399 |
-
if ( !empty( $option[ 'yith-sanitize-callback' ] ) && is_callable( $option[ 'yith-sanitize-callback' ] ) ) {
|
400 |
-
$value = call_user_func( $option[ 'yith-sanitize-callback' ], $value );
|
401 |
-
}
|
402 |
-
|
403 |
-
$valid_input[ $option[ 'id' ] ] = $value;
|
404 |
-
}
|
405 |
-
}
|
406 |
-
|
407 |
-
}
|
408 |
-
}
|
409 |
|
410 |
-
|
411 |
-
|
412 |
|
413 |
-
|
414 |
-
|
415 |
-
|
416 |
-
|
417 |
-
|
418 |
-
|
419 |
-
|
420 |
-
|
421 |
-
|
422 |
-
|
423 |
-
|
424 |
-
|
425 |
-
|
426 |
-
|
427 |
-
|
428 |
-
|
429 |
-
|
430 |
-
|
431 |
-
|
432 |
-
|
433 |
-
|
434 |
|
435 |
|
436 |
-
|
437 |
|
438 |
-
|
439 |
-
|
440 |
-
|
441 |
-
|
442 |
-
|
443 |
-
|
444 |
-
|
445 |
-
|
446 |
-
|
447 |
-
|
448 |
-
|
449 |
-
|
450 |
|
451 |
-
|
452 |
-
|
453 |
-
|
454 |
-
|
455 |
-
|
456 |
-
|
457 |
-
|
458 |
-
|
459 |
-
|
460 |
-
|
461 |
|
462 |
-
|
463 |
-
|
464 |
-
|
465 |
-
|
466 |
-
|
467 |
-
|
468 |
-
|
469 |
-
|
470 |
-
|
471 |
-
|
472 |
-
|
473 |
-
|
474 |
-
|
475 |
-
|
476 |
-
|
477 |
-
|
478 |
-
|
479 |
-
|
480 |
-
|
481 |
-
|
482 |
-
|
483 |
-
|
484 |
-
|
485 |
-
|
486 |
-
|
487 |
-
|
488 |
-
|
489 |
-
|
490 |
-
|
491 |
-
|
492 |
-
$active_class
|
493 |
-
|
494 |
-
|
495 |
-
|
496 |
-
|
497 |
-
|
498 |
-
|
499 |
-
|
500 |
-
|
501 |
-
|
502 |
-
|
503 |
-
|
504 |
-
|
505 |
-
|
506 |
-
|
507 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
508 |
|
509 |
-
|
510 |
-
|
511 |
-
|
512 |
-
|
513 |
-
|
514 |
-
|
515 |
-
|
516 |
-
|
517 |
-
|
518 |
-
|
519 |
-
|
520 |
-
|
521 |
-
|
522 |
-
|
523 |
-
|
524 |
-
|
525 |
-
|
526 |
-
|
527 |
-
|
528 |
-
|
529 |
-
|
530 |
|
531 |
-
|
532 |
-
|
533 |
|
534 |
-
|
535 |
-
|
536 |
-
|
537 |
-
|
538 |
-
|
539 |
-
|
540 |
-
|
541 |
-
|
542 |
-
|
543 |
-
|
544 |
-
|
545 |
-
|
546 |
-
|
547 |
-
|
548 |
-
|
549 |
-
|
550 |
-
|
551 |
-
|
552 |
-
|
553 |
-
|
554 |
-
|
555 |
-
|
556 |
-
|
557 |
-
|
558 |
-
|
559 |
-
|
560 |
-
|
561 |
-
|
562 |
|
563 |
-
|
564 |
-
|
565 |
-
|
566 |
-
|
567 |
-
|
568 |
-
|
569 |
-
|
570 |
-
|
571 |
-
|
572 |
-
|
573 |
-
|
574 |
-
|
575 |
-
|
576 |
-
|
577 |
-
|
578 |
-
|
579 |
-
|
580 |
-
|
581 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
582 |
|
583 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
584 |
|
585 |
-
|
586 |
-
|
587 |
-
|
588 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
589 |
|
590 |
-
|
591 |
-
|
592 |
-
<div id="wrap" class="yith-plugin-fw plugin-option yit-admin-panel-container">
|
593 |
-
<?php $this->message(); ?>
|
594 |
-
<div class="<?php echo $panel_content_class; ?>">
|
595 |
-
<h2><?php echo $this->get_tab_title() ?></h2>
|
596 |
-
<?php if ( $this->is_show_form() ) : ?>
|
597 |
-
<form id="yith-plugin-fw-panel" method="post" action="options.php">
|
598 |
-
<?php do_settings_sections( 'yit' ); ?>
|
599 |
-
<p> </p>
|
600 |
-
<?php settings_fields( 'yit_' . $this->settings[ 'parent' ] . '_options' ); ?>
|
601 |
-
<input type="hidden" name="<?php echo $this->get_name_field( 'option_key' ) ?>" value="<?php echo esc_attr( $option_key ) ?>"/>
|
602 |
-
<input type="submit" class="button-primary" value="<?php _e( 'Save Changes', 'yith-plugin-fw' ) ?>" style="float:left;margin-right:10px;"/>
|
603 |
-
</form>
|
604 |
-
<form method="post">
|
605 |
-
<?php $warning = __( 'If you continue with this action, you will reset all options in this page.', 'yith-plugin-fw' ) ?>
|
606 |
-
<input type="hidden" name="yit-action" value="reset"/>
|
607 |
-
<input type="submit" name="yit-reset" class="button-secondary" value="<?php _e( 'Reset to default', 'yith-plugin-fw' ) ?>"
|
608 |
-
onclick="return confirm('<?php echo $warning . '\n' . __( 'Are you sure?', 'yith-plugin-fw' ) ?>');"/>
|
609 |
-
</form>
|
610 |
-
<p> </p>
|
611 |
-
<?php endif ?>
|
612 |
-
</div>
|
613 |
-
</div>
|
614 |
-
</div>
|
615 |
-
<?php
|
616 |
-
}
|
617 |
|
618 |
-
|
619 |
-
|
620 |
-
|
621 |
-
|
622 |
-
|
623 |
-
|
624 |
-
*/
|
625 |
-
public function is_custom_tab( $options, $option_key ) {
|
626 |
-
foreach ( $options[ $option_key ] as $section => $option ) {
|
627 |
-
if ( isset( $option[ 'type' ] ) && isset( $option[ 'action' ] ) && 'custom_tab' == $option[ 'type' ] && !empty( $option[ 'action' ] ) ) {
|
628 |
-
return $option[ 'action' ];
|
629 |
-
} else {
|
630 |
-
return false;
|
631 |
-
}
|
632 |
-
}
|
633 |
|
634 |
-
|
635 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
636 |
|
637 |
-
|
638 |
-
|
639 |
-
$type = isset( $first[ 'type' ] ) ? $first[ 'type' ] : 'options';
|
640 |
-
$special_types = array( 'post_type', 'taxonomy', 'custom_tab', 'multi_tab' );
|
641 |
-
return in_array( $type, $special_types ) ? $type : 'options';
|
642 |
-
}
|
643 |
|
644 |
-
|
645 |
-
|
646 |
-
|
647 |
-
|
648 |
-
|
649 |
-
|
650 |
-
|
651 |
-
|
652 |
-
|
|
|
|
|
|
|
653 |
|
654 |
-
|
655 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
656 |
|
657 |
-
|
658 |
-
|
659 |
-
|
660 |
-
|
661 |
-
|
662 |
-
|
663 |
-
|
664 |
-
|
665 |
-
|
666 |
-
|
667 |
-
|
668 |
-
|
669 |
|
670 |
-
/**
|
671 |
-
* Add sections and fields to setting panel
|
672 |
-
* read all options and show sections and fields
|
673 |
-
*
|
674 |
-
* @return void
|
675 |
-
* @since 1.0
|
676 |
-
* @author Emanuela Castorina <emanuela.castorina@yithemes.it>
|
677 |
-
*/
|
678 |
-
public function add_fields() {
|
679 |
-
$yit_options = $this->get_main_array_options();
|
680 |
-
$option_key = $this->get_current_option_key();
|
681 |
|
682 |
-
|
683 |
-
|
684 |
-
|
685 |
-
|
686 |
-
|
687 |
-
|
688 |
-
|
689 |
-
|
690 |
-
|
691 |
-
}
|
692 |
-
}
|
693 |
-
}
|
694 |
|
|
|
695 |
|
696 |
-
|
697 |
-
|
698 |
-
|
699 |
-
*
|
700 |
-
* @return void|array return void when capability is false
|
701 |
-
* @since 1.0
|
702 |
-
* @author Emanuela Castorina <emanuela.castorina@yithemes.it>
|
703 |
-
*/
|
704 |
-
public function add_admin_bar_menu() {
|
705 |
|
706 |
-
|
|
|
707 |
|
708 |
-
|
709 |
-
|
710 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
711 |
|
712 |
-
if ( !empty( $this->settings[ 'admin_tabs' ] ) ) {
|
713 |
-
foreach ( $this->settings[ 'admin-tabs' ] as $item => $title ) {
|
714 |
|
715 |
-
|
716 |
-
|
717 |
-
|
718 |
-
|
719 |
-
|
720 |
-
|
721 |
-
|
722 |
-
|
723 |
-
|
|
|
724 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
725 |
|
726 |
-
|
727 |
-
|
728 |
-
|
729 |
-
|
730 |
-
|
731 |
-
|
732 |
-
|
733 |
-
|
734 |
-
|
735 |
-
|
736 |
|
737 |
-
|
738 |
-
|
739 |
-
|
740 |
-
|
741 |
-
|
742 |
-
|
743 |
-
|
744 |
-
} elseif ( isset( $admin_tabs[ 0 ] ) ) {
|
745 |
-
return $admin_tabs[ 0 ];
|
746 |
-
} else {
|
747 |
-
return 'general';
|
748 |
-
}
|
749 |
-
}
|
750 |
|
751 |
-
|
752 |
-
|
753 |
-
*
|
754 |
-
* @return string the key of the sub-tab if exists, empty string otherwise
|
755 |
-
* @author Leanza Francesco <leanzafrancesco@gmail.com>
|
756 |
-
* @since 3.4.0
|
757 |
-
*/
|
758 |
-
public function get_current_sub_tab() {
|
759 |
-
$sub_tabs = $this->get_sub_tabs();
|
760 |
-
$sub_tab = isset( $_REQUEST[ 'sub_tab' ] ) ? $_REQUEST[ 'sub_tab' ] : '';
|
761 |
-
|
762 |
-
if ( $sub_tabs ) {
|
763 |
-
if ( $sub_tab && !isset( $sub_tabs[ $sub_tab ] ) || !$sub_tab ) {
|
764 |
-
$sub_tab = current( array_keys( $sub_tabs ) );
|
765 |
-
}
|
766 |
-
} else {
|
767 |
-
$sub_tab = '';
|
768 |
-
}
|
769 |
|
770 |
-
|
771 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
772 |
|
773 |
-
|
774 |
-
|
775 |
-
|
776 |
-
* fot normal tabs, it will return the current tab
|
777 |
-
*
|
778 |
-
* @return string the current sub-tab, if exists; the current tab otherwise
|
779 |
-
* @author Leanza Francesco <leanzafrancesco@gmail.com>
|
780 |
-
* @since 3.4.0
|
781 |
-
*/
|
782 |
-
public function get_current_option_key() {
|
783 |
-
$current_tab = $this->get_current_tab();
|
784 |
-
$current_sub_tab = $this->get_current_sub_tab();
|
785 |
|
786 |
-
|
787 |
-
|
788 |
-
}
|
789 |
|
790 |
-
return $current_sub_tab ? $current_sub_tab : $current_tab;
|
791 |
-
}
|
792 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
793 |
|
794 |
-
|
795 |
-
* Message
|
796 |
-
* define an array of message and show the content od message if
|
797 |
-
* is find in the query string
|
798 |
-
*
|
799 |
-
* @return void
|
800 |
-
* @since 1.0
|
801 |
-
* @author Emanuela Castorina <emanuela.castorina@yithemes.it>
|
802 |
-
*/
|
803 |
-
public function message() {
|
804 |
-
|
805 |
-
$message = array(
|
806 |
-
'element_exists' => $this->get_message( '<strong>' . __( 'The element you have entered already exists. Please, enter another name.', 'yith-plugin-fw' ) . '</strong>', 'error', false ),
|
807 |
-
'saved' => $this->get_message( '<strong>' . __( 'Settings saved', 'yith-plugin-fw' ) . '.</strong>', 'updated', false ),
|
808 |
-
'reset' => $this->get_message( '<strong>' . __( 'Settings reset', 'yith-plugin-fw' ) . '.</strong>', 'updated', false ),
|
809 |
-
'delete' => $this->get_message( '<strong>' . __( 'Element deleted correctly.', 'yith-plugin-fw' ) . '</strong>', 'updated', false ),
|
810 |
-
'updated' => $this->get_message( '<strong>' . __( 'Element updated correctly.', 'yith-plugin-fw' ) . '</strong>', 'updated', false ),
|
811 |
-
'settings-updated' => $this->get_message( '<strong>' . __( 'Element updated correctly.', 'yith-plugin-fw' ) . '</strong>', 'updated', false ),
|
812 |
-
'imported' => $this->get_message( '<strong>' . __( 'Database imported correctly.', 'yith-plugin-fw' ) . '</strong>', 'updated', false ),
|
813 |
-
'no-imported' => $this->get_message( '<strong>' . __( 'An error has occurred during import. Please try again.', 'yith-plugin-fw' ) . '</strong>', 'error', false ),
|
814 |
-
'file-not-valid' => $this->get_message( '<strong>' . __( 'The added file is not valid.', 'yith-plugin-fw' ) . '</strong>', 'error', false ),
|
815 |
-
'cant-import' => $this->get_message( '<strong>' . __( 'Sorry, import is disabled.', 'yith-plugin-fw' ) . '</strong>', 'error', false ),
|
816 |
-
'ord' => $this->get_message( '<strong>' . __( 'Sorting successful.', 'yith-plugin-fw' ) . '</strong>', 'updated', false )
|
817 |
-
);
|
818 |
-
|
819 |
-
foreach ( $message as $key => $value ) {
|
820 |
-
if ( isset( $_GET[ $key ] ) ) {
|
821 |
-
echo $message[ $key ];
|
822 |
-
}
|
823 |
-
}
|
824 |
|
825 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
826 |
|
827 |
-
|
828 |
-
|
829 |
-
* return html code of message
|
830 |
-
*
|
831 |
-
* @param $message
|
832 |
-
* @param string $type can be 'error' or 'updated'
|
833 |
-
* @param bool $echo
|
834 |
-
* @return string
|
835 |
-
* @since 1.0
|
836 |
-
* @author Emanuela Castorina <emanuela.castorina@yithemes.it>
|
837 |
-
*/
|
838 |
-
public function get_message( $message, $type = 'error', $echo = true ) {
|
839 |
-
$message = '<div id="message" class="' . $type . ' fade"><p>' . $message . '</p></div>';
|
840 |
-
if ( $echo ) {
|
841 |
-
echo $message;
|
842 |
-
}
|
843 |
|
844 |
-
return $message;
|
845 |
-
}
|
846 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
847 |
|
848 |
-
|
849 |
-
* Get Tab Path Files
|
850 |
-
* return an array with file names of tabs
|
851 |
-
*
|
852 |
-
* @return array
|
853 |
-
* @since 1.0
|
854 |
-
* @author Emanuela Castorina <emanuela.castorina@yithemes.it>
|
855 |
-
*/
|
856 |
-
function get_tabs_path_files() {
|
857 |
|
858 |
-
|
859 |
|
860 |
-
|
|
|
861 |
|
862 |
-
|
863 |
-
|
|
|
864 |
|
865 |
-
|
866 |
-
continue;
|
867 |
-
}
|
868 |
|
869 |
-
|
|
|
870 |
|
871 |
-
|
872 |
-
|
873 |
|
874 |
-
|
875 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
876 |
|
877 |
-
|
878 |
-
|
879 |
-
* return an array with all options defined on options-files
|
880 |
-
*
|
881 |
-
* @return array
|
882 |
-
* @since 1.0
|
883 |
-
* @author Emanuela Castorina <emanuela.castorina@yithemes.it>
|
884 |
-
*/
|
885 |
-
function get_main_array_options() {
|
886 |
-
$this->_maybe_init_vars();
|
887 |
|
888 |
-
|
889 |
-
|
890 |
|
891 |
-
|
892 |
-
|
893 |
|
894 |
-
|
895 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
896 |
|
897 |
-
|
898 |
-
|
899 |
-
|
900 |
-
|
901 |
-
|
902 |
-
|
903 |
-
|
904 |
-
*/
|
905 |
-
public function get_sub_tabs( $_tab = false ) {
|
906 |
-
if ( false === $_tab ) {
|
907 |
-
$_tab = $this->get_current_tab();
|
908 |
-
}
|
909 |
|
910 |
-
|
911 |
-
|
912 |
-
|
913 |
-
|
914 |
-
|
915 |
-
|
916 |
-
|
917 |
|
918 |
-
|
919 |
-
|
920 |
-
|
921 |
-
|
922 |
-
|
923 |
-
|
924 |
-
|
|
|
|
|
925 |
|
926 |
-
|
927 |
-
|
928 |
-
|
929 |
-
$main_array_options = $this->get_main_array_options();
|
930 |
-
$current_tab_options = isset( $main_array_options[ $_tab ] ) ? $main_array_options[ $_tab ] : array();
|
931 |
-
if ( $current_tab_options ) {
|
932 |
-
$_tab = array( $_tab => $current_tab_options );
|
933 |
-
}
|
934 |
-
}
|
935 |
|
936 |
-
|
937 |
-
|
938 |
-
}
|
939 |
|
940 |
-
return $key;
|
941 |
-
}
|
942 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
943 |
|
944 |
-
|
945 |
-
* Set an array with all default options
|
946 |
-
* put default options in an array
|
947 |
-
*
|
948 |
-
* @return array
|
949 |
-
* @since 1.0
|
950 |
-
* @author Emanuela Castorina <emanuela.castorina@yithemes.it>
|
951 |
-
*/
|
952 |
-
public function get_default_options() {
|
953 |
-
$yit_options = $this->get_main_array_options();
|
954 |
-
$default_options = array();
|
955 |
-
|
956 |
-
foreach ( $yit_options as $tab => $sections ) {
|
957 |
-
foreach ( $sections as $section ) {
|
958 |
-
foreach ( $section as $id => $value ) {
|
959 |
-
if ( isset( $value[ 'std' ] ) && isset( $value[ 'id' ] ) ) {
|
960 |
-
$default_options[ $value[ 'id' ] ] = $value[ 'std' ];
|
961 |
-
}
|
962 |
-
}
|
963 |
-
}
|
964 |
-
}
|
965 |
|
966 |
-
|
|
|
967 |
|
968 |
-
return $default_options;
|
969 |
-
}
|
970 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
971 |
|
972 |
-
|
973 |
-
|
974 |
-
|
975 |
-
|
976 |
-
|
977 |
-
|
978 |
-
|
979 |
-
|
980 |
-
|
981 |
-
|
982 |
-
|
983 |
-
|
984 |
-
foreach ( $yit_options[ $option_key ] as $sections => $data ) {
|
985 |
-
foreach ( $data as $option ) {
|
986 |
-
if ( isset( $option[ 'type' ] ) && $option[ 'type' ] == 'title' ) {
|
987 |
-
return $option[ 'name' ];
|
988 |
-
}
|
989 |
-
}
|
990 |
-
}
|
991 |
-
return '';
|
992 |
-
}
|
993 |
|
994 |
-
|
995 |
-
|
996 |
-
|
997 |
-
|
998 |
-
|
999 |
-
|
1000 |
-
|
1001 |
-
* @author Emanuela Castorina <emanuela.castorina@yithemes.it>
|
1002 |
-
*/
|
1003 |
-
function get_section_title( $section ) {
|
1004 |
-
$yit_options = $this->get_main_array_options();
|
1005 |
-
$option_key = $this->get_current_option_key();
|
1006 |
-
|
1007 |
-
foreach ( $yit_options[ $option_key ][ $section ] as $option ) {
|
1008 |
-
if ( isset( $option[ 'type' ] ) && $option[ 'type' ] == 'section' ) {
|
1009 |
-
return $option[ 'name' ];
|
1010 |
-
}
|
1011 |
-
}
|
1012 |
-
return '';
|
1013 |
-
}
|
1014 |
|
1015 |
-
|
1016 |
-
|
1017 |
-
|
1018 |
-
|
1019 |
-
|
1020 |
-
|
1021 |
-
|
1022 |
-
|
1023 |
-
|
1024 |
-
|
1025 |
-
|
1026 |
-
|
1027 |
-
|
1028 |
-
foreach ( $yit_options[ $option_key ][ $section ] as $option ) {
|
1029 |
-
if ( isset( $option[ 'type' ] ) && $option[ 'type' ] == 'section' && isset( $option[ 'desc' ] ) ) {
|
1030 |
-
return '<p>' . $option[ 'desc' ] . '</p>';
|
1031 |
-
}
|
1032 |
-
}
|
1033 |
-
return '';
|
1034 |
-
}
|
1035 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1036 |
|
1037 |
-
/**
|
1038 |
-
* Show form when necessary
|
1039 |
-
* return true if 'showform' is not defined
|
1040 |
-
*
|
1041 |
-
* @return bool
|
1042 |
-
* @since 1.0
|
1043 |
-
* @author Emanuela Castorina <emanuela.castorina@yithemes.it>
|
1044 |
-
*/
|
1045 |
-
function is_show_form() {
|
1046 |
-
$yit_options = $this->get_main_array_options();
|
1047 |
-
$option_key = $this->get_current_option_key();
|
1048 |
-
|
1049 |
-
foreach ( $yit_options[ $option_key ] as $sections => $data ) {
|
1050 |
-
foreach ( $data as $option ) {
|
1051 |
-
if ( !isset( $option[ 'type' ] ) || $option[ 'type' ] != 'title' ) {
|
1052 |
-
continue;
|
1053 |
-
}
|
1054 |
-
if ( isset( $option[ 'showform' ] ) ) {
|
1055 |
-
return $option[ 'showform' ];
|
1056 |
-
} else {
|
1057 |
-
return true;
|
1058 |
-
}
|
1059 |
-
}
|
1060 |
-
}
|
1061 |
-
}
|
1062 |
|
1063 |
-
|
1064 |
-
|
1065 |
-
|
1066 |
-
|
1067 |
-
|
1068 |
-
|
1069 |
-
|
1070 |
-
|
1071 |
-
|
1072 |
-
|
1073 |
-
|
1074 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1075 |
|
1076 |
-
|
1077 |
-
|
1078 |
-
|
1079 |
-
|
1080 |
-
|
1081 |
-
|
1082 |
-
|
1083 |
-
|
1084 |
-
|
1085 |
-
|
1086 |
-
|
1087 |
-
|
1088 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1089 |
|
1090 |
-
/**
|
1091 |
-
* Render the field showed in the setting page
|
1092 |
-
* include the file of the option type, if file do not exists
|
1093 |
-
* return a text area
|
1094 |
-
*
|
1095 |
-
* @param array $param
|
1096 |
-
* @return void
|
1097 |
-
* @since 1.0
|
1098 |
-
* @author Emanuela Castorina <emanuela.castorina@yithemes.it>
|
1099 |
-
*/
|
1100 |
-
function render_field( $param ) {
|
1101 |
|
1102 |
-
|
1103 |
-
|
1104 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1105 |
|
1106 |
-
|
|
|
|
|
1107 |
|
1108 |
-
|
1109 |
-
foreach ( $option[ 'custom_attributes' ] as $attribute => $attribute_value ) {
|
1110 |
-
$custom_attributes[] = esc_attr( $attribute ) . '="' . esc_attr( $attribute_value ) . '"';
|
1111 |
-
}
|
1112 |
-
}
|
1113 |
|
1114 |
-
|
1115 |
-
|
1116 |
-
|
|
|
|
|
1117 |
|
1118 |
-
|
1119 |
-
|
|
|
1120 |
|
1121 |
-
|
1122 |
-
|
1123 |
|
1124 |
-
|
1125 |
-
|
1126 |
-
file_exists( $field_container_path ) && include( $field_container_path );
|
1127 |
-
} else {
|
1128 |
-
do_action( "yit_panel_{$option['type']}", $option, $db_value, $custom_attributes );
|
1129 |
-
}
|
1130 |
-
}
|
1131 |
-
}
|
1132 |
|
1133 |
-
|
1134 |
-
|
1135 |
-
|
1136 |
-
|
1137 |
-
|
1138 |
-
|
1139 |
-
|
1140 |
-
|
1141 |
-
*/
|
1142 |
-
public function get_options() {
|
1143 |
-
$options = get_option( 'yit_' . $this->settings[ 'parent' ] . '_options' );
|
1144 |
-
if ( $options === false || ( isset( $_REQUEST[ 'yit-action' ] ) && $_REQUEST[ 'yit-action' ] == 'reset' ) ) {
|
1145 |
-
$options = $this->get_default_options();
|
1146 |
-
}
|
1147 |
|
1148 |
-
|
1149 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1150 |
|
1151 |
-
|
1152 |
-
|
1153 |
-
*
|
1154 |
-
* @param array $args
|
1155 |
-
* @return void
|
1156 |
-
* @since 1.0
|
1157 |
-
* @author Emanuela Castorina <emanuela.castorina@yithemes.com>
|
1158 |
-
*/
|
1159 |
-
public static function add_infobox( $args = array() ) {
|
1160 |
-
if ( !empty( $args ) ) {
|
1161 |
-
extract( $args );
|
1162 |
-
require_once( YIT_CORE_PLUGIN_TEMPLATE_PATH . '/panel/boxinfo.php' );
|
1163 |
-
}
|
1164 |
-
}
|
1165 |
|
1166 |
-
|
1167 |
-
|
1168 |
-
|
1169 |
-
|
1170 |
-
|
1171 |
-
|
1172 |
-
|
1173 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
1174 |
|
1175 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1176 |
|
1177 |
-
|
1178 |
-
* Fire the action to print the custom tab
|
1179 |
-
*
|
1180 |
-
* @return void
|
1181 |
-
* @deprecated 3.0.12 Do nothing! Method left to prevent Fatal Error if called directly
|
1182 |
-
*/
|
1183 |
-
public function print_video_box() {
|
1184 |
|
1185 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
1186 |
|
1187 |
-
|
1188 |
-
* sort plugins by name in YITH Plugins menu
|
1189 |
-
*
|
1190 |
-
* @since 3.0.0
|
1191 |
-
* @author Leanza Francesco <leanzafrancesco@gmail.com>
|
1192 |
-
*/
|
1193 |
-
public static function sort_plugins() {
|
1194 |
-
global $submenu;
|
1195 |
-
if ( !empty( $submenu[ 'yith_plugin_panel' ] ) ) {
|
1196 |
-
$sorted_plugins = $submenu[ 'yith_plugin_panel' ];
|
1197 |
|
1198 |
-
|
1199 |
-
|
1200 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1201 |
|
1202 |
-
|
1203 |
-
|
1204 |
-
|
1205 |
|
1206 |
-
|
1207 |
-
|
1208 |
-
|
1209 |
-
* @since 3.0.0
|
1210 |
-
* @author Leanza Francesco <leanzafrancesco@gmail.com>
|
1211 |
-
*/
|
1212 |
-
public static function add_menu_class_in_yith_plugin( $menu ) {
|
1213 |
-
global $submenu;
|
1214 |
-
|
1215 |
-
if ( !empty( $submenu[ 'yith_plugin_panel' ] ) ) {
|
1216 |
-
$item_count = count( $submenu[ 'yith_plugin_panel' ] );
|
1217 |
-
$columns = absint( $item_count / 20 ) + 1;
|
1218 |
-
$columns = max( 1, min( $columns, 3 ) );
|
1219 |
-
$columns = apply_filters( 'yith_plugin_fw_yith_plugins_menu_columns', $columns, $item_count );
|
1220 |
-
|
1221 |
-
if ( $columns > 1 ) {
|
1222 |
-
$class = "yith-plugin-fw-menu-$columns-columns";
|
1223 |
-
foreach ( $menu as $order => $top ) {
|
1224 |
-
if ( 'yith_plugin_panel' === $top[ 2 ] ) {
|
1225 |
-
$c = $menu[ $order ][ 4 ];
|
1226 |
-
$menu[ $order ][ 4 ] = add_cssclass( $class, $c );
|
1227 |
-
break;
|
1228 |
-
}
|
1229 |
-
}
|
1230 |
-
}
|
1231 |
-
}
|
1232 |
|
1233 |
-
|
1234 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1235 |
|
1236 |
-
|
1237 |
-
|
1238 |
-
* check if the plugin is a free or not
|
1239 |
-
*
|
1240 |
-
* @author Emanuela Castorina
|
1241 |
-
*/
|
1242 |
-
function is_free() {
|
1243 |
-
return ( !empty( $this->settings[ 'admin-tabs' ] ) && isset( $this->settings[ 'admin-tabs' ][ 'premium' ] ) );
|
1244 |
-
}
|
1245 |
|
1246 |
-
|
1247 |
-
|
1248 |
-
|
1249 |
-
|
|
|
|
|
|
|
|
|
|
|
1250 |
|
1251 |
-
|
1252 |
-
|
1253 |
-
|
|
|
1254 |
|
1255 |
-
|
1256 |
-
|
1257 |
-
|
1258 |
-
<h1 class="notice-container"></h1>
|
1259 |
-
<div class="yith-plugin-fw-banner">
|
1260 |
-
<h1><?php echo esc_html( $this->settings[ 'page_title' ] ) ?></h1>
|
1261 |
-
</div>
|
1262 |
-
<div class="yith-plugin-fw-rate">
|
1263 |
-
<?php printf('<strong>%s</strong> %s <a href="%s" target="_blank"><u>%s</u> <span class="dashicons dashicons-star-filled"></span><span class="dashicons dashicons-star-filled"></span><span class="dashicons dashicons-star-filled"></span><span class="dashicons dashicons-star-filled"></span><span class="dashicons dashicons-star-filled"></span></a> %s',
|
1264 |
-
__('We need your support','yith-plugin-fw'),
|
1265 |
-
__('to keep updating and improving the plugin. Please,','yith-plugin-fw'),
|
1266 |
-
$rate_link,
|
1267 |
-
__('help us by leaving a five-star rating','yith-plugin-fw' ),
|
1268 |
-
__(':) Thanks!','yith-plugin-fw' ) )?>
|
1269 |
-
</div>
|
1270 |
-
<?php else: ?>
|
1271 |
-
<h1 class="notice-container"></h1>
|
1272 |
-
<div class="yith-plugin-fw-banner">
|
1273 |
-
<h1><?php echo esc_html( $this->settings[ 'page_title' ] ) ?></h1>
|
1274 |
-
</div>
|
1275 |
-
<?php endif ?>
|
1276 |
-
<?php
|
1277 |
-
}
|
1278 |
|
1279 |
-
|
1280 |
-
|
1281 |
-
|
1282 |
-
|
1283 |
-
|
1284 |
-
|
1285 |
-
|
1286 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1287 |
|
1288 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1289 |
|
1290 |
-
|
1291 |
-
return;
|
1292 |
-
}
|
1293 |
-
if ( 'admin.php' === $pagenow && $screen && strpos( $screen->id, $this->settings[ 'page' ] ) !== false ) {
|
1294 |
-
switch ( $field[ 'type' ] ) {
|
1295 |
-
case 'datepicker':
|
1296 |
-
echo '<span class="yith-icon icon-calendar"></span>';
|
1297 |
-
break;
|
1298 |
-
default:
|
1299 |
-
break;
|
1300 |
-
}
|
1301 |
-
}
|
1302 |
-
}
|
1303 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1304 |
|
1305 |
-
public function get_post_type_tabs( $post_type ) {
|
1306 |
-
$tabs = array();
|
1307 |
|
1308 |
-
|
1309 |
-
|
1310 |
-
|
1311 |
-
|
1312 |
-
|
1313 |
-
|
1314 |
-
|
1315 |
-
|
1316 |
-
|
1317 |
-
|
|
|
|
|
|
|
1318 |
|
1319 |
$panel_page = isset( $this->settings['page'] ) ? $this->settings['page'] : 'general';
|
1320 |
|
1321 |
return apply_filters( "yith_plugin_fw_panel_{$panel_page}_get_post_type_tabs", $tabs, $post_type );
|
1322 |
-
|
1323 |
|
1324 |
-
|
1325 |
-
|
1326 |
-
|
1327 |
-
|
1328 |
-
|
1329 |
-
|
1330 |
-
|
1331 |
-
|
1332 |
-
|
1333 |
-
|
1334 |
-
|
1335 |
-
|
1336 |
-
|
1337 |
|
1338 |
$panel_page = isset( $this->settings['page'] ) ? $this->settings['page'] : 'general';
|
1339 |
|
1340 |
return apply_filters( "yith_plugin_fw_panel_{$panel_page}_get_taxonomy_tabs", $tabs, $taxonomy );
|
1341 |
-
|
1342 |
|
1343 |
|
1344 |
-
|
1345 |
-
|
1346 |
-
|
1347 |
-
|
1348 |
-
|
1349 |
-
|
1350 |
-
|
1351 |
-
|
1352 |
-
|
1353 |
if ( 'admin.php' === $pagenow && isset( $_GET['page'] ) && $this->settings['page'] === $_GET['page'] &&
|
1354 |
-
|
1355 |
$url = $this->get_nav_url( $this->settings['page'], $this->get_current_tab(), $this->get_current_sub_tab() );
|
1356 |
if ( strpos( $url, 'edit.php' ) !== false || strpos( $url, 'edit-tags.php' ) !== false ) {
|
1357 |
wp_safe_redirect( add_query_arg( array( 'yith-plugin-fw-panel-skip-redirect' => 1 ), $url ) );
|
@@ -1370,6 +1387,8 @@ if ( !class_exists( 'YIT_Plugin_Panel' ) ) {
|
|
1370 |
public function print_panel_tabs_in_wp_pages() {
|
1371 |
if ( self::$_panel_tabs_in_wp_pages ) {
|
1372 |
wp_enqueue_style( 'yit-plugin-style' );
|
|
|
|
|
1373 |
$wrap_class = isset( $this->settings[ 'class' ] ) ? $this->settings[ 'class' ] : '';
|
1374 |
|
1375 |
?>
|
7 |
* http://www.gnu.org/licenses/gpl-3.0.txt
|
8 |
*/
|
9 |
|
10 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
11 |
+
exit;
|
12 |
} // Exit if accessed directly
|
13 |
|
14 |
+
if ( ! class_exists( 'YIT_Plugin_Panel' ) ) {
|
15 |
+
/**
|
16 |
+
* YIT Plugin Panel
|
17 |
+
* Setting Page to Manage Plugins
|
18 |
+
*
|
19 |
+
* @class YIT_Plugin_Panel
|
20 |
+
* @package YITH
|
21 |
+
* @since 1.0
|
22 |
+
* @author Your Inspiration Themes
|
23 |
+
*/
|
24 |
+
class YIT_Plugin_Panel {
|
25 |
|
26 |
+
/**
|
27 |
+
* @var string version of class
|
28 |
+
*/
|
29 |
+
public $version = '1.0.0';
|
30 |
|
31 |
+
/**
|
32 |
+
* @var array a setting list of parameters
|
33 |
+
*/
|
34 |
+
public $settings = array();
|
35 |
|
36 |
+
/**
|
37 |
+
* @var array
|
38 |
+
*/
|
39 |
+
protected $_tabs_path_files;
|
40 |
|
41 |
+
/**
|
42 |
+
* @var array
|
43 |
+
*/
|
44 |
+
protected $_main_array_options;
|
45 |
|
46 |
+
/**
|
47 |
+
* @var array
|
48 |
+
*/
|
49 |
+
protected $_tabs_hierarchy;
|
50 |
|
51 |
+
/**
|
52 |
+
* @var array
|
53 |
+
*/
|
54 |
+
protected static $_panel_tabs_in_wp_pages = array();
|
55 |
|
56 |
+
/**
|
57 |
+
* @var array
|
58 |
+
*/
|
59 |
+
public $links;
|
60 |
|
61 |
+
/**
|
62 |
+
* @var bool
|
63 |
+
*/
|
64 |
+
protected static $_actions_initialized = false;
|
65 |
|
66 |
+
/**
|
67 |
+
* Constructor
|
68 |
+
*
|
69 |
+
* @param array $args
|
70 |
+
* @author Emanuela Castorina <emanuela.castorina@yithemes.it>
|
71 |
+
* @since 1.0
|
72 |
+
*/
|
73 |
+
public function __construct( $args = array() ) {
|
74 |
|
75 |
+
if ( ! empty( $args ) ) {
|
76 |
|
77 |
+
$default_args = array(
|
78 |
+
'parent_slug' => 'edit.php?',
|
79 |
+
'page_title' => __( 'Plugin Settings', 'yith-plugin-fw' ),
|
80 |
+
'menu_title' => __( 'Settings', 'yith-plugin-fw' ),
|
81 |
+
'capability' => 'manage_options',
|
82 |
+
'icon_url' => '',
|
83 |
+
'position' => null,
|
84 |
+
);
|
85 |
|
86 |
+
$args = apply_filters( 'yit_plugin_fw_panel_option_args', wp_parse_args( $args, $default_args ) );
|
87 |
+
if ( isset( $args['parent_page'] ) && 'yit_plugin_panel' === $args['parent_page'] )
|
88 |
+
$args['parent_page'] = 'yith_plugin_panel';
|
89 |
|
90 |
+
$this->settings = $args;
|
91 |
+
$this->_tabs_path_files = $this->get_tabs_path_files();
|
92 |
|
93 |
+
if ( isset( $this->settings['create_menu_page'] ) && $this->settings['create_menu_page'] ) {
|
94 |
+
$this->add_menu_page();
|
95 |
+
}
|
96 |
|
97 |
+
if ( ! empty( $this->settings['links'] ) ) {
|
98 |
+
$this->links = $this->settings['links'];
|
99 |
+
}
|
100 |
|
101 |
+
add_action( 'admin_init', array( $this, 'register_settings' ) );
|
102 |
+
add_action( 'admin_menu', array( $this, 'add_setting_page' ), 20 );
|
103 |
+
add_action( 'admin_menu', array( $this, 'add_premium_version_upgrade_to_menu' ), 100 );
|
104 |
+
add_action( 'admin_bar_menu', array( $this, 'add_admin_bar_menu' ), 100 );
|
105 |
+
add_action( 'admin_init', array( $this, 'add_fields' ) );
|
106 |
|
107 |
+
add_action( 'admin_enqueue_scripts', array( $this, 'init_wp_with_tabs' ), 11 );
|
108 |
add_action( 'admin_init', array( $this, 'maybe_redirect_to_proper_wp_page' ) );
|
109 |
|
110 |
+
// init actions once to prevent multiple actions
|
111 |
+
static::_init_actions();
|
112 |
+
}
|
113 |
|
114 |
+
add_action( 'admin_enqueue_scripts', array( $this, 'admin_enqueue_scripts' ) );
|
115 |
|
116 |
//yith-plugin-ui
|
117 |
add_action( 'yith_plugin_fw_before_yith_panel', array( $this, 'add_plugin_banner' ), 10, 1 );
|
130 |
$excluded_post_types = array( 'product', 'page', 'post' );
|
131 |
|
132 |
return in_array( $pagenow, array( 'post.php', 'post-new.php', 'edit.php' ), true ) &&
|
133 |
+
! in_array( $post_type, $excluded_post_types, true );
|
134 |
}
|
135 |
|
136 |
/**
|
145 |
$excluded_taxonomies = array( 'category', 'post_tag', 'product_cat', 'product_tag' );
|
146 |
|
147 |
return in_array( $pagenow, array( 'edit-tags.php', 'term.php' ), true ) &&
|
148 |
+
! in_array( $taxonomy, $excluded_taxonomies, true );
|
149 |
}
|
150 |
|
151 |
+
/**
|
152 |
+
* Init actions to show YITH Panel tabs in WP Pages
|
153 |
+
*
|
154 |
+
* @author Leanza Francesco <leanzafrancesco@gmail.com>
|
155 |
+
* @since 3.4.0
|
156 |
+
*/
|
157 |
+
public function init_wp_with_tabs() {
|
158 |
+
if ( ! current_user_can( $this->settings['capability'] ) ) {
|
159 |
+
return;
|
160 |
+
}
|
161 |
|
162 |
+
global $post_type, $taxonomy;
|
163 |
+
$tabs = false;
|
164 |
|
165 |
+
if ( $this->is_custom_post_type_page() ) {
|
166 |
+
$tabs = $this->get_post_type_tabs( $post_type );
|
167 |
+
} else if ( $this->is_custom_taxonomy_page() ) {
|
168 |
+
$tabs = $this->get_taxonomy_tabs( $taxonomy );
|
169 |
+
}
|
170 |
|
171 |
+
if ( $tabs ) {
|
172 |
+
// tabs_in_edit
|
173 |
+
$current_tab_args = array(
|
174 |
+
'page' => $this->settings['page'],
|
175 |
+
'current_tab' => isset( $tabs['tab'] ) ? $tabs['tab'] : '',
|
176 |
+
'current_sub_tab' => isset( $tabs['sub_tab'] ) ? $tabs['sub_tab'] : '',
|
177 |
+
);
|
178 |
+
|
179 |
+
wp_enqueue_style( 'yit-plugin-style' );
|
180 |
+
wp_enqueue_style( 'yith-plugin-fw-fields' );
|
181 |
+
wp_enqueue_script( 'yith-plugin-fw-wp-pages' );
|
182 |
+
|
183 |
+
if ( ! self::$_panel_tabs_in_wp_pages ) {
|
184 |
+
self::$_panel_tabs_in_wp_pages = $current_tab_args;
|
185 |
+
add_action( 'all_admin_notices', array( $this, 'print_panel_tabs_in_wp_pages' ) );
|
186 |
+
add_action( 'admin_footer', array( $this, 'print_panel_tabs_in_wp_pages_end' ) );
|
187 |
+
add_filter( 'parent_file', array( $this, 'set_parent_file_to_handle_menu_for_wp_pages' ) );
|
188 |
+
add_filter( 'submenu_file', array( $this, 'set_submenu_file_to_handle_menu_for_wp_pages' ), 10, 2 );
|
189 |
+
}
|
190 |
+
}
|
191 |
+
}
|
192 |
|
193 |
+
/**
|
194 |
+
* Init actions once to prevent multiple actions
|
195 |
+
*
|
196 |
+
* @since 3.0.0
|
197 |
+
* @author Leanza Francesco <leanzafrancesco@gmail.com>
|
198 |
+
*/
|
199 |
+
protected static function _init_actions() {
|
200 |
+
if ( ! static::$_actions_initialized ) {
|
201 |
+
add_filter( 'admin_body_class', array( __CLASS__, 'add_body_class' ) );
|
|
|
|
|
|
|
|
|
202 |
|
203 |
+
// sort plugins by name in YITH Plugins menu
|
204 |
+
add_action( 'admin_menu', array( __CLASS__, 'sort_plugins' ), 90 );
|
205 |
+
add_filter( 'add_menu_classes', array( __CLASS__, 'add_menu_class_in_yith_plugin' ) );
|
|
|
|
|
|
|
|
|
|
|
|
|
206 |
|
|
|
|
|
|
|
207 |
|
208 |
+
static::$_actions_initialized = true;
|
209 |
+
}
|
210 |
+
}
|
211 |
|
212 |
+
protected function _maybe_init_vars() {
|
213 |
+
if ( ! isset( $this->_main_array_options ) && ! isset( $this->_tabs_hierarchy ) ) {
|
214 |
+
$options_path = $this->settings['options-path'];
|
215 |
+
$this->_main_array_options = array();
|
216 |
+
$this->_tabs_hierarchy = array();
|
217 |
+
|
218 |
+
foreach ( $this->settings['admin-tabs'] as $item => $v ) {
|
219 |
+
$path = trailingslashit( $options_path ) . $item . '-options.php';
|
220 |
+
$path = apply_filters( 'yith_plugin_panel_item_options_path', $path, $options_path, $item, $this );
|
221 |
+
if ( file_exists( $path ) ) {
|
222 |
+
$_tab = include $path;
|
223 |
+
$this->_main_array_options = array_merge( $this->_main_array_options, $_tab );
|
224 |
+
$sub_tabs = $this->get_sub_tabs( $_tab );
|
225 |
+
$current_tab_key = array_keys( $_tab )[0];
|
226 |
+
|
227 |
+
$this->_tabs_hierarchy[ $current_tab_key ] = array_merge( array( 'parent' => '', 'has_sub_tabs' => ! ! $sub_tabs ), $this->get_tab_info_by_options( $_tab[ $current_tab_key ] ) );
|
228 |
+
|
229 |
+
foreach ( $sub_tabs as $sub_item => $sub_options ) {
|
230 |
+
if ( strpos( $sub_item, $item . '-' ) === 0 ) {
|
231 |
+
$sub_item = substr( $sub_item, strlen( $item ) + 1 );
|
232 |
+
}
|
233 |
+
$sub_tab_path = $options_path . '/' . $item . '/' . $sub_item . '-options.php';
|
234 |
+
$sub_tab_path = apply_filters( 'yith_plugin_panel_sub_tab_item_options_path', $sub_tab_path, $sub_tabs, $sub_item, $this );
|
235 |
+
|
236 |
+
if ( file_exists( $sub_tab_path ) ) {
|
237 |
+
$_sub_tab = include $sub_tab_path;
|
238 |
+
$this->_main_array_options = array_merge( $this->_main_array_options, $_sub_tab );
|
239 |
+
|
240 |
+
$current_sub_tab_key = array_keys( $_sub_tab )[0];
|
241 |
+
$this->_tabs_hierarchy[ $current_sub_tab_key ] = array_merge( array( 'parent' => $current_tab_key ), $this->get_tab_info_by_options( $_sub_tab[ $current_sub_tab_key ] ) );
|
242 |
+
}
|
243 |
+
}
|
244 |
+
}
|
245 |
+
}
|
246 |
+
}
|
247 |
+
}
|
248 |
|
249 |
+
/**
|
250 |
+
* Add yith-plugin-fw-panel in body classes in Panel pages
|
251 |
+
*
|
252 |
+
* @param $admin_body_classes
|
253 |
+
* @return string
|
254 |
+
* @author Leanza Francesco <leanzafrancesco@gmail.com>
|
255 |
+
* @since 3.0.0
|
256 |
+
*/
|
257 |
+
public static function add_body_class( $admin_body_classes ) {
|
258 |
+
global $pagenow;
|
259 |
+
if ( ( 'admin.php' == $pagenow && strpos( get_current_screen()->id, 'yith-plugins_page' ) !== false ) )
|
260 |
+
$admin_body_classes = substr_count( $admin_body_classes, ' yith-plugin-fw-panel ' ) == 0 ? $admin_body_classes . ' yith-plugin-fw-panel ' : $admin_body_classes;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
261 |
|
262 |
+
return $admin_body_classes;
|
263 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
264 |
|
265 |
+
/**
|
266 |
+
* Add Menu page link
|
267 |
+
*
|
268 |
+
* @return void
|
269 |
+
* @since 1.0
|
270 |
+
* @author Andrea Grillo <andrea.grillo@yithemes.com>
|
271 |
+
*/
|
272 |
+
public function add_menu_page() {
|
273 |
+
global $admin_page_hooks;
|
274 |
+
|
275 |
+
if ( ! isset( $admin_page_hooks['yith_plugin_panel'] ) ) {
|
276 |
+
$position = apply_filters( 'yit_plugins_menu_item_position', '62.32' );
|
277 |
+
$capability = apply_filters( 'yit_plugin_panel_menu_page_capability', 'manage_options' );
|
278 |
+
$show = apply_filters( 'yit_plugin_panel_menu_page_show', true );
|
279 |
+
|
280 |
+
// YITH text must not be translated
|
281 |
+
if ( ! ! $show ) {
|
282 |
+
add_menu_page( 'yith_plugin_panel', 'YITH', $capability, 'yith_plugin_panel', null, yith_plugin_fw_get_default_logo(), $position );
|
283 |
+
$admin_page_hooks['yith_plugin_panel'] = 'yith-plugins'; // prevent issues for backward compatibility
|
284 |
+
}
|
285 |
+
}
|
286 |
+
}
|
287 |
|
288 |
+
/**
|
289 |
+
* Remove duplicate submenu
|
290 |
+
* Submenu page hack: Remove the duplicate YIT Plugin link on subpages
|
291 |
+
*
|
292 |
+
* @return void
|
293 |
+
* @since 1.0
|
294 |
+
* @author Andrea Grillo <andrea.grillo@yithemes.com>
|
295 |
+
*/
|
296 |
+
public function remove_duplicate_submenu_page() {
|
297 |
+
/* === Duplicate Items Hack === */
|
298 |
+
remove_submenu_page( 'yith_plugin_panel', 'yith_plugin_panel' );
|
299 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
300 |
|
301 |
+
/**
|
302 |
+
* Enqueue script and styles in admin side
|
303 |
+
* Add style and scripts to administrator
|
304 |
+
*
|
305 |
+
* @return void
|
306 |
+
* @since 1.0
|
307 |
+
* @author Emanuela Castorina <emanuela.castorina@yithemes.it>
|
308 |
+
* @author Leanza Francesco <leanzafrancesco@gmail.com>
|
309 |
+
*/
|
310 |
+
public function admin_enqueue_scripts() {
|
311 |
+
global $pagenow;
|
312 |
+
|
313 |
+
// enqueue styles only in the current panel page
|
314 |
+
if ( 'admin.php' === $pagenow && strpos( get_current_screen()->id, $this->settings['page'] ) !== false || apply_filters( 'yit_plugin_panel_asset_loading', false ) ) {
|
315 |
+
wp_enqueue_media();
|
316 |
+
|
317 |
+
wp_enqueue_style( 'yith-plugin-fw-fields' );
|
318 |
+
wp_enqueue_style( 'yit-jquery-ui-style' );
|
319 |
+
wp_enqueue_style( 'raleway-font' );
|
320 |
+
|
321 |
+
wp_enqueue_script( 'jquery-ui' );
|
322 |
+
wp_enqueue_script( 'jquery-ui-core' );
|
323 |
+
wp_enqueue_script( 'jquery-ui-dialog' );
|
324 |
+
wp_enqueue_script( 'yith_how_to' );
|
325 |
+
wp_enqueue_script( 'yith-plugin-fw-fields' );
|
326 |
+
}
|
327 |
|
328 |
+
if ( ( 'admin.php' == $pagenow && yith_plugin_fw_is_panel() ) || apply_filters( 'yit_plugin_panel_asset_loading', false ) ) {
|
329 |
+
wp_enqueue_media();
|
330 |
+
wp_enqueue_style( 'yit-plugin-style' );
|
331 |
+
wp_enqueue_script( 'yit-plugin-panel' );
|
332 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
333 |
|
334 |
+
if ( 'admin.php' == $pagenow && strpos( get_current_screen()->id, 'yith_upgrade_premium_version' ) !== false ) {
|
335 |
+
wp_enqueue_style( 'yit-upgrade-to-pro' );
|
336 |
+
wp_enqueue_script( 'colorbox' );
|
337 |
+
}
|
|
|
338 |
|
339 |
+
}
|
|
|
|
|
|
|
340 |
|
341 |
+
/**
|
342 |
+
* Register Settings
|
343 |
+
* Generate wp-admin settings pages by registering your settings and using a few callbacks to control the output
|
344 |
+
*
|
345 |
+
* @return void
|
346 |
+
* @since 1.0
|
347 |
+
* @author Emanuela Castorina <emanuela.castorina@yithemes.it>
|
348 |
+
*/
|
349 |
+
public function register_settings() {
|
350 |
+
register_setting( 'yit_' . $this->settings['parent'] . '_options', 'yit_' . $this->settings['parent'] . '_options', array( $this, 'options_validate' ) );
|
351 |
+
}
|
352 |
|
353 |
+
/**
|
354 |
+
* Options Validate
|
355 |
+
* a callback function called by Register Settings function
|
356 |
+
*
|
357 |
+
* @param $input
|
358 |
+
* @return array validate input fields
|
359 |
+
* @since 1.0
|
360 |
+
* @author Emanuela Castorina <emanuela.castorina@yithemes.it>
|
361 |
+
*/
|
362 |
+
public function options_validate( $input ) {
|
363 |
+
|
364 |
+
$option_key = ! empty( $input['option_key'] ) ? $input['option_key'] : 'general';
|
365 |
+
|
366 |
+
$yit_options = $this->get_main_array_options();
|
367 |
+
|
368 |
+
// default
|
369 |
+
$valid_input = $this->get_options();
|
370 |
+
|
371 |
+
$submit = ( ! empty( $input['submit-general'] ) ? true : false );
|
372 |
+
$reset = ( ! empty( $input['reset-general'] ) ? true : false );
|
373 |
+
|
374 |
+
foreach ( $yit_options[ $option_key ] as $section => $data ) {
|
375 |
+
foreach ( $data as $option ) {
|
376 |
+
if ( isset( $option['sanitize_call'] ) && isset( $option['id'] ) ) { //yiw_debug($option, false);
|
377 |
+
if ( is_array( $option['sanitize_call'] ) ) :
|
378 |
+
foreach ( $option['sanitize_call'] as $callback ) {
|
379 |
+
if ( is_array( $input[ $option['id'] ] ) ) {
|
380 |
+
$valid_input[ $option['id'] ] = array_map( $callback, $input[ $option['id'] ] );
|
381 |
+
} else {
|
382 |
+
$valid_input[ $option['id'] ] = call_user_func( $callback, $input[ $option['id'] ] );
|
383 |
+
}
|
384 |
+
}
|
385 |
+
else :
|
386 |
+
if ( is_array( $input[ $option['id'] ] ) ) {
|
387 |
+
$valid_input[ $option['id'] ] = array_map( $option['sanitize_call'], $input[ $option['id'] ] );
|
388 |
+
} else {
|
389 |
+
$valid_input[ $option['id'] ] = call_user_func( $option['sanitize_call'], $input[ $option['id'] ] );
|
390 |
+
}
|
391 |
+
endif;
|
392 |
+
} else {
|
393 |
+
if ( isset( $option['id'] ) ) {
|
394 |
+
$value = isset( $input[ $option['id'] ] ) ? $input[ $option['id'] ] : false;
|
395 |
+
if ( isset( $option['type'] ) && in_array( $option['type'], array( 'checkbox', 'onoff' ) ) ) {
|
396 |
+
$value = yith_plugin_fw_is_true( $value ) ? 'yes' : 'no';
|
397 |
+
}
|
398 |
+
|
399 |
+
if ( ! empty( $option['yith-sanitize-callback'] ) && is_callable( $option['yith-sanitize-callback'] ) ) {
|
400 |
+
$value = call_user_func( $option['yith-sanitize-callback'], $value );
|
401 |
+
}
|
402 |
+
|
403 |
+
$valid_input[ $option['id'] ] = $value;
|
404 |
+
}
|
405 |
+
}
|
406 |
|
407 |
+
}
|
408 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
409 |
|
410 |
+
return $valid_input;
|
411 |
+
}
|
412 |
|
413 |
+
/**
|
414 |
+
* Add Setting SubPage
|
415 |
+
* add Setting SubPage to wordpress administrator
|
416 |
+
*
|
417 |
+
* @return array validate input fields
|
418 |
+
* @since 1.0
|
419 |
+
* @author Emanuela Castorina <emanuela.castorina@yithemes.it>
|
420 |
+
*/
|
421 |
+
public function add_setting_page() {
|
422 |
+
$this->settings['icon_url'] = isset( $this->settings['icon_url'] ) ? $this->settings['icon_url'] : '';
|
423 |
+
$this->settings['position'] = isset( $this->settings['position'] ) ? $this->settings['position'] : null;
|
424 |
+
$parent = $this->settings['parent_slug'] . $this->settings['parent_page'];
|
425 |
+
|
426 |
+
if ( ! empty( $parent ) ) {
|
427 |
+
add_submenu_page( $parent, $this->settings['page_title'], $this->settings['menu_title'], $this->settings['capability'], $this->settings['page'], array( $this, 'yit_panel' ) );
|
428 |
+
} else {
|
429 |
+
add_menu_page( $this->settings['page_title'], $this->settings['menu_title'], $this->settings['capability'], $this->settings['page'], array( $this, 'yit_panel' ), $this->settings['icon_url'], $this->settings['position'] );
|
430 |
+
}
|
431 |
+
/* === Duplicate Items Hack === */
|
432 |
+
$this->remove_duplicate_submenu_page();
|
433 |
+
do_action( 'yit_after_add_settings_page' );
|
434 |
|
435 |
|
436 |
+
}
|
437 |
|
438 |
+
/**
|
439 |
+
* Add Premium Version upgrade menu item
|
440 |
+
*
|
441 |
+
* @return void
|
442 |
+
* @since 2.9.13
|
443 |
+
* @author Andrea Grillo <andrea.grillo@yithemes.com>
|
444 |
+
*/
|
445 |
+
public function add_premium_version_upgrade_to_menu() {
|
446 |
+
/* === Add the How To menu item only if the customer haven't a premium version enabled === */
|
447 |
+
if ( function_exists( 'YIT_Plugin_Licence' ) && ! ! YIT_Plugin_Licence()->get_products() ) {
|
448 |
+
return;
|
449 |
+
}
|
450 |
|
451 |
+
global $submenu;
|
452 |
+
if ( apply_filters( 'yit_show_upgrade_to_premium_version', isset( $submenu['yith_plugin_panel'] ) ) ) {
|
453 |
+
$submenu['yith_plugin_panel']['how_to'] = array(
|
454 |
+
sprintf( '%s%s%s', '<span id="yith-how-to-premium">', __( 'How to install premium version', 'yith-plugin-fw' ), '</span>' ),
|
455 |
+
'install_plugins',
|
456 |
+
'//support.yithemes.com/hc/en-us/articles/217840988',
|
457 |
+
__( 'How to install premium version', 'yith-plugin-fw' ),
|
458 |
+
);
|
459 |
+
}
|
460 |
+
}
|
461 |
|
462 |
+
/**
|
463 |
+
* Print the tabs navigation
|
464 |
+
*
|
465 |
+
* @param array $args
|
466 |
+
* @author Leanza Francesco <leanzafrancesco@gmail.com>
|
467 |
+
* @since 3.4.0
|
468 |
+
*/
|
469 |
+
public function print_tabs_nav( $args = array() ) {
|
470 |
+
$defaults = array(
|
471 |
+
'current_tab' => $this->get_current_tab(),
|
472 |
+
'premium_class' => isset( $this->settings['class'] ) ? 'yith-premium' : 'premium',
|
473 |
+
'page' => $this->settings['page'],
|
474 |
+
'parent_page' => $this->settings['parent_page'],
|
475 |
+
'wrapper_class' => 'nav-tab-wrapper',
|
476 |
+
);
|
477 |
+
$args = wp_parse_args( $args, $defaults );
|
478 |
+
/**
|
479 |
+
* @var string $current_tab
|
480 |
+
* @var string $premium_class
|
481 |
+
* @var string $page
|
482 |
+
* @var string $parent_page
|
483 |
+
* @var string $wrapper_class
|
484 |
+
*/
|
485 |
+
extract( $args );
|
486 |
+
|
487 |
+
$tabs = '<ul class="yith-plugin-fw-tabs">';
|
488 |
+
|
489 |
+
foreach ( $this->settings['admin-tabs'] as $tab => $tab_value ) {
|
490 |
+
$active_class = ( $current_tab == $tab ) ? ' nav-tab-active' : '';
|
491 |
+
$active_class .= 'premium' == $tab ? ' ' . $premium_class : '';
|
492 |
+
$active_class = apply_filters( 'yith_plugin_fw_panel_active_tab_class', $active_class, $current_tab, $tab );
|
493 |
+
|
494 |
+
$first_sub_tab = $this->get_first_sub_tab_key( $tab );
|
495 |
+
$sub_tab = ! ! $first_sub_tab ? $first_sub_tab : '';
|
496 |
+
$sub_tabs = $this->get_sub_tabs( $tab );
|
497 |
+
$url = $this->get_nav_url( $page, $tab, $sub_tab, $parent_page );
|
498 |
+
$icon = ( $current_tab !== $tab && $sub_tabs ) ? '<i class="yith-icon yith-icon-arrow_down"></i>' : '';
|
499 |
+
|
500 |
+
$tabs .= '<li class="yith-plugin-fw-tab-element">';
|
501 |
+
$tabs .= '<a class="nav-tab' . $active_class . '" href="' . $url . '">' . $tab_value . $icon . '</a>';
|
502 |
+
|
503 |
+
if ( $current_tab !== $tab && $sub_tabs ) {
|
504 |
+
$tabs .= '<div class="nav-subtab-wrap"><ul class="nav-subtab">';
|
505 |
+
foreach ( $sub_tabs as $_key => $_tab ) {
|
506 |
+
$url = $this->get_nav_url( $page, $tab, $_key );
|
507 |
+
$tabs .= '<li class="nav-subtab-item"><a href="' . $url . '">' . $_tab['title'] . '</a></li>';
|
508 |
+
}
|
509 |
+
$tabs .= '</ul></div>';
|
510 |
+
}
|
511 |
+
$tabs .= '</li>';
|
512 |
+
}
|
513 |
+
$tabs .= '</ul>';
|
514 |
+
?>
|
515 |
+
<h2 class="<?php echo $wrapper_class ?>">
|
516 |
+
<?php echo $tabs ?>
|
517 |
+
</h2>
|
518 |
+
<?php
|
519 |
+
$this->print_sub_tabs_nav( $args );
|
520 |
+
}
|
521 |
|
522 |
+
/**
|
523 |
+
* @param string $page
|
524 |
+
* @param string $tab
|
525 |
+
* @param string $sub_tab
|
526 |
+
* @param string $parent_page
|
527 |
+
* @return string
|
528 |
+
*/
|
529 |
+
public function get_nav_url( $page, $tab, $sub_tab = '', $parent_page = '' ) {
|
530 |
+
$tab_hierarchy = $this->get_tabs_hierarchy();
|
531 |
+
$key = ! ! $sub_tab ? $sub_tab : $tab;
|
532 |
+
|
533 |
+
if ( isset( $tab_hierarchy[ $key ], $tab_hierarchy[ $key ]['type'], $tab_hierarchy[ $key ]['post_type'] ) && 'post_type' === $tab_hierarchy[ $key ]['type'] ) {
|
534 |
+
$url = admin_url( "edit.php?post_type={$tab_hierarchy[$key]['post_type']}" );
|
535 |
+
} elseif ( isset( $tab_hierarchy[ $key ], $tab_hierarchy[ $key ]['type'], $tab_hierarchy[ $key ]['taxonomy'] ) && 'taxonomy' === $tab_hierarchy[ $key ]['type'] ) {
|
536 |
+
$url = admin_url( "edit-tags.php?taxonomy={$tab_hierarchy[$key]['taxonomy']}" );
|
537 |
+
} else {
|
538 |
+
$url = ! ! $parent_page ? "?{$parent_page}&" : '?';
|
539 |
+
$url .= "page={$page}&tab={$tab}";
|
540 |
+
$url .= ! ! $sub_tab ? "&sub_tab={$sub_tab}" : '';
|
541 |
+
$url = admin_url( "admin.php{$url}" );
|
542 |
+
}
|
543 |
|
544 |
+
return apply_filters( 'yith_plugin_fw_panel_url', $url, $page, $tab, $sub_tab, $parent_page );
|
545 |
+
}
|
546 |
|
547 |
+
/**
|
548 |
+
* Print the Sub-tabs navigation if the current tab has sub-tabs
|
549 |
+
*
|
550 |
+
* @param array $args
|
551 |
+
* @author Leanza Francesco <leanzafrancesco@gmail.com>
|
552 |
+
* @since 3.4.0
|
553 |
+
*/
|
554 |
+
public function print_sub_tabs_nav( $args = array() ) {
|
555 |
+
$defaults = array(
|
556 |
+
'current_tab' => $this->get_current_tab(),
|
557 |
+
'page' => $this->settings['page'],
|
558 |
+
'current_sub_tab' => $this->get_current_sub_tab(),
|
559 |
+
);
|
560 |
+
$args = wp_parse_args( $args, $defaults );
|
561 |
+
|
562 |
+
/**
|
563 |
+
* @var string $current_tab
|
564 |
+
* @var string $page
|
565 |
+
* @var string $current_sub_tab
|
566 |
+
*/
|
567 |
+
extract( $args );
|
568 |
+
|
569 |
+
$sub_tabs = $this->get_sub_tabs( $current_tab );
|
570 |
+
|
571 |
+
if ( $sub_tabs && $current_sub_tab ) {
|
572 |
+
include YIT_CORE_PLUGIN_TEMPLATE_PATH . '/panel/sub-tabs-nav.php';
|
573 |
+
}
|
574 |
+
}
|
575 |
|
576 |
+
/**
|
577 |
+
* Show a tabbed panel to setting page
|
578 |
+
* a callback function called by add_setting_page => add_submenu_page
|
579 |
+
*
|
580 |
+
* @return void
|
581 |
+
* @since 1.0
|
582 |
+
* @author Emanuela Castorina <emanuela.castorina@yithemes.it>
|
583 |
+
*/
|
584 |
+
public function yit_panel() {
|
585 |
+
$yit_options = $this->get_main_array_options();
|
586 |
+
$wrap_class = isset( $this->settings['class'] ) ? $this->settings['class'] : '';
|
587 |
+
|
588 |
+
$option_key = $this->get_current_option_key();
|
589 |
+
$custom_tab_action = $this->is_custom_tab( $yit_options, $option_key );
|
590 |
+
?>
|
591 |
+
<div class="wrap <?php echo $wrap_class ?>">
|
592 |
+
<div id="icon-themes" class="icon32"><br/></div>
|
593 |
+
<?php
|
594 |
+
do_action( 'yith_plugin_fw_before_yith_panel', $this->settings['page'] );
|
595 |
+
|
596 |
+
$this->print_tabs_nav();
|
597 |
+
|
598 |
+
if ( $custom_tab_action ) {
|
599 |
+
$this->print_custom_tab( $custom_tab_action );
|
600 |
+
return;
|
601 |
+
}
|
602 |
|
603 |
+
$panel_content_class = apply_filters( 'yit_admin_panel_content_class', 'yit-admin-panel-content-wrap' );
|
604 |
+
?>
|
605 |
+
<div id="wrap" class="yith-plugin-fw plugin-option yit-admin-panel-container">
|
606 |
+
<?php $this->message(); ?>
|
607 |
+
<div class="<?php echo $panel_content_class; ?>">
|
608 |
+
<h2><?php echo $this->get_tab_title() ?></h2>
|
609 |
+
<?php if ( $this->is_show_form() ) : ?>
|
610 |
+
<form id="yith-plugin-fw-panel" method="post" action="options.php">
|
611 |
+
<?php do_settings_sections( 'yit' ); ?>
|
612 |
+
<p> </p>
|
613 |
+
<?php settings_fields( 'yit_' . $this->settings['parent'] . '_options' ); ?>
|
614 |
+
<input type="hidden" name="<?php echo $this->get_name_field( 'option_key' ) ?>"
|
615 |
+
value="<?php echo esc_attr( $option_key ) ?>"/>
|
616 |
+
<input type="submit" class="button-primary"
|
617 |
+
value="<?php _e( 'Save Changes', 'yith-plugin-fw' ) ?>"
|
618 |
+
style="float:left;margin-right:10px;"/>
|
619 |
+
</form>
|
620 |
+
<form method="post">
|
621 |
+
<?php $warning = __( 'If you continue with this action, you will reset all options in this page.', 'yith-plugin-fw' ) ?>
|
622 |
+
<input type="hidden" name="yit-action" value="reset"/>
|
623 |
+
<input type="submit" name="yit-reset" class="button-secondary"
|
624 |
+
value="<?php _e( 'Reset to default', 'yith-plugin-fw' ) ?>"
|
625 |
+
onclick="return confirm('<?php echo $warning . '\n' . __( 'Are you sure?', 'yith-plugin-fw' ) ?>');"/>
|
626 |
+
</form>
|
627 |
+
<p> </p>
|
628 |
+
<?php endif ?>
|
629 |
+
</div>
|
630 |
+
</div>
|
631 |
+
</div>
|
632 |
+
<?php
|
633 |
+
}
|
634 |
|
635 |
+
/**
|
636 |
+
* Check if is a custom tab
|
637 |
+
*
|
638 |
+
* @param array $options
|
639 |
+
* @param string $option_key
|
640 |
+
* @return bool
|
641 |
+
*/
|
642 |
+
public function is_custom_tab( $options, $option_key ) {
|
643 |
+
foreach ( $options[ $option_key ] as $section => $option ) {
|
644 |
+
if ( isset( $option['type'] ) && isset( $option['action'] ) && 'custom_tab' == $option['type'] && ! empty( $option['action'] ) ) {
|
645 |
+
return $option['action'];
|
646 |
+
} else {
|
647 |
+
return false;
|
648 |
+
}
|
649 |
+
}
|
650 |
|
651 |
+
return false;
|
652 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
653 |
|
654 |
+
public function get_tab_type_by_options( $tab_options ) {
|
655 |
+
$first = ! ! $tab_options && is_array( $tab_options ) ? current( $tab_options ) : array();
|
656 |
+
$type = isset( $first['type'] ) ? $first['type'] : 'options';
|
657 |
+
$special_types = array( 'post_type', 'taxonomy', 'custom_tab', 'multi_tab' );
|
658 |
+
return in_array( $type, $special_types ) ? $type : 'options';
|
659 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
660 |
|
661 |
+
public function get_tab_info_by_options( $tab_options ) {
|
662 |
+
$type = $this->get_tab_type_by_options( $tab_options );
|
663 |
+
$info = array( 'type' => $type );
|
664 |
+
$first = ! ! $tab_options && is_array( $tab_options ) ? current( $tab_options ) : array();
|
665 |
+
if ( 'post_type' === $type ) {
|
666 |
+
$info['post_type'] = isset( $first['post_type'] ) ? $first['post_type'] : '';
|
667 |
+
} else if ( 'taxonomy' === $type ) {
|
668 |
+
$info['taxonomy'] = isset( $first['taxonomy'] ) ? $first['taxonomy'] : '';
|
669 |
+
}
|
670 |
|
671 |
+
return $info;
|
672 |
+
}
|
|
|
|
|
|
|
|
|
673 |
|
674 |
+
/**
|
675 |
+
* Fire the action to print the custom tab
|
676 |
+
*
|
677 |
+
* @param string $action Action to fire
|
678 |
+
* @return void
|
679 |
+
* @since 1.0
|
680 |
+
* @author Andrea Grillo <andrea.grillo@yithemes.com>
|
681 |
+
* @author Leanza Francesco <leanzafrancesco@gmail.com>
|
682 |
+
*/
|
683 |
+
public function print_custom_tab( $action ) {
|
684 |
+
do_action( $action );
|
685 |
+
}
|
686 |
|
687 |
+
/**
|
688 |
+
* Add sections and fields to setting panel
|
689 |
+
* read all options and show sections and fields
|
690 |
+
*
|
691 |
+
* @return void
|
692 |
+
* @since 1.0
|
693 |
+
* @author Emanuela Castorina <emanuela.castorina@yithemes.it>
|
694 |
+
*/
|
695 |
+
public function add_fields() {
|
696 |
+
$yit_options = $this->get_main_array_options();
|
697 |
+
$option_key = $this->get_current_option_key();
|
698 |
|
699 |
+
if ( ! $option_key ) {
|
700 |
+
return;
|
701 |
+
}
|
702 |
+
foreach ( $yit_options[ $option_key ] as $section => $data ) {
|
703 |
+
add_settings_section( "yit_settings_{$option_key}_{$section}", $this->get_section_title( $section ), $this->get_section_description( $section ), 'yit' );
|
704 |
+
foreach ( $data as $option ) {
|
705 |
+
if ( isset( $option['id'] ) && isset( $option['type'] ) && isset( $option['name'] ) ) {
|
706 |
+
add_settings_field( "yit_setting_" . $option['id'], $option['name'], array( $this, 'render_field' ), 'yit', "yit_settings_{$option_key}_{$section}", array( 'option' => $option, 'label_for' => $this->get_id_field( $option['id'] ) ) );
|
707 |
+
}
|
708 |
+
}
|
709 |
+
}
|
710 |
+
}
|
711 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
712 |
|
713 |
+
/**
|
714 |
+
* Add the tabs to admin bar menu
|
715 |
+
* set all tabs of settings page on wp admin bar
|
716 |
+
*
|
717 |
+
* @return void|array return void when capability is false
|
718 |
+
* @since 1.0
|
719 |
+
* @author Emanuela Castorina <emanuela.castorina@yithemes.it>
|
720 |
+
*/
|
721 |
+
public function add_admin_bar_menu() {
|
|
|
|
|
|
|
722 |
|
723 |
+
global $wp_admin_bar;
|
724 |
|
725 |
+
if ( ! current_user_can( 'manage_options' ) ) {
|
726 |
+
return;
|
727 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
728 |
|
729 |
+
if ( ! empty( $this->settings['admin_tabs'] ) ) {
|
730 |
+
foreach ( $this->settings['admin-tabs'] as $item => $title ) {
|
731 |
|
732 |
+
$wp_admin_bar->add_menu( array(
|
733 |
+
'parent' => $this->settings['parent'],
|
734 |
+
'title' => $title,
|
735 |
+
'id' => $this->settings['parent'] . '-' . $item,
|
736 |
+
'href' => admin_url( 'themes.php' ) . '?page=' . $this->settings['parent_page'] . '&tab=' . $item,
|
737 |
+
) );
|
738 |
+
}
|
739 |
+
}
|
740 |
+
}
|
741 |
|
|
|
|
|
742 |
|
743 |
+
/**
|
744 |
+
* Get current tab
|
745 |
+
* get the id of tab showed, return general is the current tab is not defined
|
746 |
+
*
|
747 |
+
* @return string
|
748 |
+
* @since 1.0
|
749 |
+
* @author Emanuela Castorina <emanuela.castorina@yithemes.it>
|
750 |
+
*/
|
751 |
+
function get_current_tab() {
|
752 |
+
$admin_tabs = array_keys( $this->settings['admin-tabs'] );
|
753 |
|
754 |
+
if ( ! isset( $_GET['page'] ) || $_GET['page'] != $this->settings['page'] ) {
|
755 |
+
return false;
|
756 |
+
}
|
757 |
+
if ( isset( $_REQUEST['yit_tab_options'] ) ) {
|
758 |
+
return $_REQUEST['yit_tab_options'];
|
759 |
+
} elseif ( isset( $_GET['tab'] ) ) {
|
760 |
+
return $_GET['tab'];
|
761 |
+
} elseif ( isset( $admin_tabs[0] ) ) {
|
762 |
+
return $admin_tabs[0];
|
763 |
+
} else {
|
764 |
+
return 'general';
|
765 |
+
}
|
766 |
+
}
|
767 |
|
768 |
+
/**
|
769 |
+
* Get the current sub-tab
|
770 |
+
*
|
771 |
+
* @return string the key of the sub-tab if exists, empty string otherwise
|
772 |
+
* @author Leanza Francesco <leanzafrancesco@gmail.com>
|
773 |
+
* @since 3.4.0
|
774 |
+
*/
|
775 |
+
public function get_current_sub_tab() {
|
776 |
+
$sub_tabs = $this->get_sub_tabs();
|
777 |
+
$sub_tab = isset( $_REQUEST['sub_tab'] ) ? $_REQUEST['sub_tab'] : '';
|
778 |
|
779 |
+
if ( $sub_tabs ) {
|
780 |
+
if ( $sub_tab && ! isset( $sub_tabs[ $sub_tab ] ) || ! $sub_tab ) {
|
781 |
+
$sub_tab = current( array_keys( $sub_tabs ) );
|
782 |
+
}
|
783 |
+
} else {
|
784 |
+
$sub_tab = '';
|
785 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
786 |
|
787 |
+
return $sub_tab;
|
788 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
789 |
|
790 |
+
/**
|
791 |
+
* Return the option key related to the current page
|
792 |
+
* for sub-tabbed tabs, it will return the current sub-tab
|
793 |
+
* fot normal tabs, it will return the current tab
|
794 |
+
*
|
795 |
+
* @return string the current sub-tab, if exists; the current tab otherwise
|
796 |
+
* @author Leanza Francesco <leanzafrancesco@gmail.com>
|
797 |
+
* @since 3.4.0
|
798 |
+
*/
|
799 |
+
public function get_current_option_key() {
|
800 |
+
$current_tab = $this->get_current_tab();
|
801 |
+
$current_sub_tab = $this->get_current_sub_tab();
|
802 |
|
803 |
+
if ( ! $current_tab ) {
|
804 |
+
return false;
|
805 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
806 |
|
807 |
+
return $current_sub_tab ? $current_sub_tab : $current_tab;
|
808 |
+
}
|
|
|
809 |
|
|
|
|
|
810 |
|
811 |
+
/**
|
812 |
+
* Message
|
813 |
+
* define an array of message and show the content od message if
|
814 |
+
* is find in the query string
|
815 |
+
*
|
816 |
+
* @return void
|
817 |
+
* @since 1.0
|
818 |
+
* @author Emanuela Castorina <emanuela.castorina@yithemes.it>
|
819 |
+
*/
|
820 |
+
public function message() {
|
821 |
+
|
822 |
+
$message = array(
|
823 |
+
'element_exists' => $this->get_message( '<strong>' . __( 'The element you have entered already exists. Please, enter another name.', 'yith-plugin-fw' ) . '</strong>', 'error', false ),
|
824 |
+
'saved' => $this->get_message( '<strong>' . __( 'Settings saved', 'yith-plugin-fw' ) . '.</strong>', 'updated', false ),
|
825 |
+
'reset' => $this->get_message( '<strong>' . __( 'Settings reset', 'yith-plugin-fw' ) . '.</strong>', 'updated', false ),
|
826 |
+
'delete' => $this->get_message( '<strong>' . __( 'Element deleted correctly.', 'yith-plugin-fw' ) . '</strong>', 'updated', false ),
|
827 |
+
'updated' => $this->get_message( '<strong>' . __( 'Element updated correctly.', 'yith-plugin-fw' ) . '</strong>', 'updated', false ),
|
828 |
+
'settings-updated' => $this->get_message( '<strong>' . __( 'Element updated correctly.', 'yith-plugin-fw' ) . '</strong>', 'updated', false ),
|
829 |
+
'imported' => $this->get_message( '<strong>' . __( 'Database imported correctly.', 'yith-plugin-fw' ) . '</strong>', 'updated', false ),
|
830 |
+
'no-imported' => $this->get_message( '<strong>' . __( 'An error has occurred during import. Please try again.', 'yith-plugin-fw' ) . '</strong>', 'error', false ),
|
831 |
+
'file-not-valid' => $this->get_message( '<strong>' . __( 'The added file is not valid.', 'yith-plugin-fw' ) . '</strong>', 'error', false ),
|
832 |
+
'cant-import' => $this->get_message( '<strong>' . __( 'Sorry, import is disabled.', 'yith-plugin-fw' ) . '</strong>', 'error', false ),
|
833 |
+
'ord' => $this->get_message( '<strong>' . __( 'Sorting successful.', 'yith-plugin-fw' ) . '</strong>', 'updated', false ),
|
834 |
+
);
|
835 |
+
|
836 |
+
foreach ( $message as $key => $value ) {
|
837 |
+
if ( isset( $_GET[ $key ] ) ) {
|
838 |
+
echo $message[ $key ];
|
839 |
+
}
|
840 |
+
}
|
841 |
|
842 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
843 |
|
844 |
+
/**
|
845 |
+
* Get Message
|
846 |
+
* return html code of message
|
847 |
+
*
|
848 |
+
* @param $message
|
849 |
+
* @param string $type can be 'error' or 'updated'
|
850 |
+
* @param bool $echo
|
851 |
+
* @return string
|
852 |
+
* @since 1.0
|
853 |
+
* @author Emanuela Castorina <emanuela.castorina@yithemes.it>
|
854 |
+
*/
|
855 |
+
public function get_message( $message, $type = 'error', $echo = true ) {
|
856 |
+
$message = '<div id="message" class="' . $type . ' fade"><p>' . $message . '</p></div>';
|
857 |
+
if ( $echo ) {
|
858 |
+
echo $message;
|
859 |
+
}
|
860 |
|
861 |
+
return $message;
|
862 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
863 |
|
|
|
|
|
864 |
|
865 |
+
/**
|
866 |
+
* Get Tab Path Files
|
867 |
+
* return an array with file names of tabs
|
868 |
+
*
|
869 |
+
* @return array
|
870 |
+
* @since 1.0
|
871 |
+
* @author Emanuela Castorina <emanuela.castorina@yithemes.it>
|
872 |
+
*/
|
873 |
+
function get_tabs_path_files() {
|
874 |
|
875 |
+
$option_files_path = $this->settings['options-path'] . '/';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
876 |
|
877 |
+
$tabs = array();
|
878 |
|
879 |
+
foreach ( ( array )glob( $option_files_path . '*.php' ) as $filename ) {
|
880 |
+
preg_match( '/(.*)-options\.(.*)/', basename( $filename ), $filename_parts );
|
881 |
|
882 |
+
if ( ! isset( $filename_parts[1] ) ) {
|
883 |
+
continue;
|
884 |
+
}
|
885 |
|
886 |
+
$tab = $filename_parts[1];
|
|
|
|
|
887 |
|
888 |
+
$tabs[ $tab ] = $filename;
|
889 |
+
}
|
890 |
|
891 |
+
return $tabs;
|
892 |
+
}
|
893 |
|
894 |
+
/**
|
895 |
+
* Get main array options
|
896 |
+
* return an array with all options defined on options-files
|
897 |
+
*
|
898 |
+
* @return array
|
899 |
+
* @since 1.0
|
900 |
+
* @author Emanuela Castorina <emanuela.castorina@yithemes.it>
|
901 |
+
*/
|
902 |
+
function get_main_array_options() {
|
903 |
+
$this->_maybe_init_vars();
|
904 |
|
905 |
+
return $this->_main_array_options;
|
906 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
907 |
|
908 |
+
function get_tabs_hierarchy() {
|
909 |
+
$this->_maybe_init_vars();
|
910 |
|
911 |
+
return $this->_tabs_hierarchy;
|
912 |
+
}
|
913 |
|
914 |
+
/**
|
915 |
+
* Return the sub-tabs array of a specific tab
|
916 |
+
*
|
917 |
+
* @param array|bool $_tab the tab; if not set it'll be the current tab
|
918 |
+
* @since 3.4.0
|
919 |
+
* @author Leanza Francesco <leanzafrancesco@gmail.com>
|
920 |
+
* @return array sub-tabs array
|
921 |
+
*/
|
922 |
+
public function get_sub_tabs( $_tab = false ) {
|
923 |
+
if ( false === $_tab ) {
|
924 |
+
$_tab = $this->get_current_tab();
|
925 |
+
}
|
926 |
|
927 |
+
if ( is_string( $_tab ) ) {
|
928 |
+
$main_array_options = $this->get_main_array_options();
|
929 |
+
$current_tab_options = isset( $main_array_options[ $_tab ] ) ? $main_array_options[ $_tab ] : array();
|
930 |
+
if ( $current_tab_options ) {
|
931 |
+
$_tab = array( $_tab => $current_tab_options );
|
932 |
+
}
|
933 |
+
}
|
|
|
|
|
|
|
|
|
|
|
934 |
|
935 |
+
$_tab_options = ! ! $_tab && is_array( $_tab ) ? current( $_tab ) : false;
|
936 |
+
$_first = ! ! $_tab_options && is_array( $_tab_options ) ? current( $_tab_options ) : false;
|
937 |
+
if ( $_first && is_array( $_first ) && isset( $_first['type'] ) && 'multi_tab' === $_first['type'] && ! empty( $_first['sub-tabs'] ) ) {
|
938 |
+
return $_first['sub-tabs'];
|
939 |
+
}
|
940 |
+
return array();
|
941 |
+
}
|
942 |
|
943 |
+
public function get_first_sub_tab_key( $_tab = false ) {
|
944 |
+
$key = false;
|
945 |
+
if ( is_string( $_tab ) ) {
|
946 |
+
$main_array_options = $this->get_main_array_options();
|
947 |
+
$current_tab_options = isset( $main_array_options[ $_tab ] ) ? $main_array_options[ $_tab ] : array();
|
948 |
+
if ( $current_tab_options ) {
|
949 |
+
$_tab = array( $_tab => $current_tab_options );
|
950 |
+
}
|
951 |
+
}
|
952 |
|
953 |
+
if ( ( $sub_tabs = $this->get_sub_tabs( $_tab ) ) ) {
|
954 |
+
$key = current( array_keys( $sub_tabs ) );
|
955 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
956 |
|
957 |
+
return $key;
|
958 |
+
}
|
|
|
959 |
|
|
|
|
|
960 |
|
961 |
+
/**
|
962 |
+
* Set an array with all default options
|
963 |
+
* put default options in an array
|
964 |
+
*
|
965 |
+
* @return array
|
966 |
+
* @since 1.0
|
967 |
+
* @author Emanuela Castorina <emanuela.castorina@yithemes.it>
|
968 |
+
*/
|
969 |
+
public function get_default_options() {
|
970 |
+
$yit_options = $this->get_main_array_options();
|
971 |
+
$default_options = array();
|
972 |
+
|
973 |
+
foreach ( $yit_options as $tab => $sections ) {
|
974 |
+
foreach ( $sections as $section ) {
|
975 |
+
foreach ( $section as $id => $value ) {
|
976 |
+
if ( isset( $value['std'] ) && isset( $value['id'] ) ) {
|
977 |
+
$default_options[ $value['id'] ] = $value['std'];
|
978 |
+
}
|
979 |
+
}
|
980 |
+
}
|
981 |
+
}
|
982 |
|
983 |
+
unset( $yit_options );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
984 |
|
985 |
+
return $default_options;
|
986 |
+
}
|
987 |
|
|
|
|
|
988 |
|
989 |
+
/**
|
990 |
+
* Get the title of the tab
|
991 |
+
* return the title of tab
|
992 |
+
*
|
993 |
+
* @return string
|
994 |
+
* @since 1.0
|
995 |
+
* @author Emanuela Castorina <emanuela.castorina@yithemes.it>
|
996 |
+
*/
|
997 |
+
function get_tab_title() {
|
998 |
+
$yit_options = $this->get_main_array_options();
|
999 |
+
$option_key = $this->get_current_option_key();
|
1000 |
+
|
1001 |
+
foreach ( $yit_options[ $option_key ] as $sections => $data ) {
|
1002 |
+
foreach ( $data as $option ) {
|
1003 |
+
if ( isset( $option['type'] ) && $option['type'] == 'title' ) {
|
1004 |
+
return $option['name'];
|
1005 |
+
}
|
1006 |
+
}
|
1007 |
+
}
|
1008 |
+
return '';
|
1009 |
+
}
|
1010 |
|
1011 |
+
/**
|
1012 |
+
* Get the title of the section
|
1013 |
+
* return the title of section
|
1014 |
+
*
|
1015 |
+
* @param $section
|
1016 |
+
* @return string
|
1017 |
+
* @since 1.0
|
1018 |
+
* @author Emanuela Castorina <emanuela.castorina@yithemes.it>
|
1019 |
+
*/
|
1020 |
+
function get_section_title( $section ) {
|
1021 |
+
$yit_options = $this->get_main_array_options();
|
1022 |
+
$option_key = $this->get_current_option_key();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1023 |
|
1024 |
+
foreach ( $yit_options[ $option_key ][ $section ] as $option ) {
|
1025 |
+
if ( isset( $option['type'] ) && $option['type'] == 'section' ) {
|
1026 |
+
return $option['name'];
|
1027 |
+
}
|
1028 |
+
}
|
1029 |
+
return '';
|
1030 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1031 |
|
1032 |
+
/**
|
1033 |
+
* Get the description of the section
|
1034 |
+
* return the description of section if is set
|
1035 |
+
*
|
1036 |
+
* @param $section
|
1037 |
+
* @return string
|
1038 |
+
* @since 1.0
|
1039 |
+
* @author Emanuela Castorina <emanuela.castorina@yithemes.it>
|
1040 |
+
*/
|
1041 |
+
function get_section_description( $section ) {
|
1042 |
+
$yit_options = $this->get_main_array_options();
|
1043 |
+
$option_key = $this->get_current_option_key();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1044 |
|
1045 |
+
foreach ( $yit_options[ $option_key ][ $section ] as $option ) {
|
1046 |
+
if ( isset( $option['type'] ) && $option['type'] == 'section' && isset( $option['desc'] ) ) {
|
1047 |
+
return '<p>' . $option['desc'] . '</p>';
|
1048 |
+
}
|
1049 |
+
}
|
1050 |
+
return '';
|
1051 |
+
}
|
1052 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1053 |
|
1054 |
+
/**
|
1055 |
+
* Show form when necessary
|
1056 |
+
* return true if 'showform' is not defined
|
1057 |
+
*
|
1058 |
+
* @return bool
|
1059 |
+
* @since 1.0
|
1060 |
+
* @author Emanuela Castorina <emanuela.castorina@yithemes.it>
|
1061 |
+
*/
|
1062 |
+
function is_show_form() {
|
1063 |
+
$yit_options = $this->get_main_array_options();
|
1064 |
+
$option_key = $this->get_current_option_key();
|
1065 |
+
|
1066 |
+
foreach ( $yit_options[ $option_key ] as $sections => $data ) {
|
1067 |
+
foreach ( $data as $option ) {
|
1068 |
+
if ( ! isset( $option['type'] ) || $option['type'] != 'title' ) {
|
1069 |
+
continue;
|
1070 |
+
}
|
1071 |
+
if ( isset( $option['showform'] ) ) {
|
1072 |
+
return $option['showform'];
|
1073 |
+
} else {
|
1074 |
+
return true;
|
1075 |
+
}
|
1076 |
+
}
|
1077 |
+
}
|
1078 |
+
}
|
1079 |
|
1080 |
+
/**
|
1081 |
+
* Get name field
|
1082 |
+
* return a string with the name of the input field
|
1083 |
+
*
|
1084 |
+
* @param string $name
|
1085 |
+
* @return string
|
1086 |
+
* @since 1.0
|
1087 |
+
* @author Emanuela Castorina <emanuela.castorina@yithemes.it>
|
1088 |
+
*/
|
1089 |
+
function get_name_field( $name = '' ) {
|
1090 |
+
return 'yit_' . $this->settings['parent'] . '_options[' . $name . ']';
|
1091 |
+
}
|
1092 |
|
1093 |
+
/**
|
1094 |
+
* Get id field
|
1095 |
+
* return a string with the id of the input field
|
1096 |
+
*
|
1097 |
+
* @param string $id
|
1098 |
+
* @return string
|
1099 |
+
* @since 1.0
|
1100 |
+
* @author Emanuela Castorina <emanuela.castorina@yithemes.it>
|
1101 |
+
*/
|
1102 |
+
function get_id_field( $id ) {
|
1103 |
+
return 'yit_' . $this->settings['parent'] . '_options_' . $id;
|
1104 |
+
}
|
1105 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1106 |
|
1107 |
+
/**
|
1108 |
+
* Render the field showed in the setting page
|
1109 |
+
* include the file of the option type, if file do not exists
|
1110 |
+
* return a text area
|
1111 |
+
*
|
1112 |
+
* @param array $param
|
1113 |
+
* @return void
|
1114 |
+
* @since 1.0
|
1115 |
+
* @author Emanuela Castorina <emanuela.castorina@yithemes.it>
|
1116 |
+
*/
|
1117 |
+
function render_field( $param ) {
|
1118 |
|
1119 |
+
if ( ! empty( $param ) && isset( $param ['option'] ) ) {
|
1120 |
+
$option = $param ['option'];
|
1121 |
+
$db_options = $this->get_options();
|
1122 |
|
1123 |
+
$custom_attributes = array();
|
|
|
|
|
|
|
|
|
1124 |
|
1125 |
+
if ( ! empty( $option['custom_attributes'] ) && is_array( $option['custom_attributes'] ) ) {
|
1126 |
+
foreach ( $option['custom_attributes'] as $attribute => $attribute_value ) {
|
1127 |
+
$custom_attributes[] = esc_attr( $attribute ) . '="' . esc_attr( $attribute_value ) . '"';
|
1128 |
+
}
|
1129 |
+
}
|
1130 |
|
1131 |
+
$custom_attributes = implode( ' ', $custom_attributes );
|
1132 |
+
$std = isset( $option['std'] ) ? $option['std'] : '';
|
1133 |
+
$db_value = ( isset( $db_options[ $option['id'] ] ) ) ? $db_options[ $option['id'] ] : $std;
|
1134 |
|
1135 |
+
if ( isset( $option['deps'] ) )
|
1136 |
+
$deps = $option['deps'];
|
1137 |
|
1138 |
+
if ( 'on-off' === $option['type'] )
|
1139 |
+
$option['type'] = 'onoff';
|
|
|
|
|
|
|
|
|
|
|
|
|
1140 |
|
1141 |
+
if ( $field_template_path = yith_plugin_fw_get_field_template_path( $option ) ) {
|
1142 |
+
$field_container_path = apply_filters( 'yith_plugin_fw_panel_field_container_template_path', YIT_CORE_PLUGIN_TEMPLATE_PATH . '/panel/panel-field-container.php', $option );
|
1143 |
+
file_exists( $field_container_path ) && include( $field_container_path );
|
1144 |
+
} else {
|
1145 |
+
do_action( "yit_panel_{$option['type']}", $option, $db_value, $custom_attributes );
|
1146 |
+
}
|
1147 |
+
}
|
1148 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
1149 |
|
1150 |
+
/**
|
1151 |
+
* Get options from db
|
1152 |
+
* return the options from db, if the options aren't defined in the db,
|
1153 |
+
* get the default options ad add the options in the db
|
1154 |
+
*
|
1155 |
+
* @return array
|
1156 |
+
* @since 1.0
|
1157 |
+
* @author Emanuela Castorina <emanuela.castorina@yithemes.it>
|
1158 |
+
*/
|
1159 |
+
public function get_options() {
|
1160 |
+
$options = get_option( 'yit_' . $this->settings['parent'] . '_options' );
|
1161 |
+
if ( $options === false || ( isset( $_REQUEST['yit-action'] ) && $_REQUEST['yit-action'] == 'reset' ) ) {
|
1162 |
+
$options = $this->get_default_options();
|
1163 |
+
}
|
1164 |
|
1165 |
+
return $options;
|
1166 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1167 |
|
1168 |
+
/**
|
1169 |
+
* Show a box panel with specific content in two columns as a new woocommerce type
|
1170 |
+
*
|
1171 |
+
* @param array $args
|
1172 |
+
* @return void
|
1173 |
+
* @since 1.0
|
1174 |
+
* @author Emanuela Castorina <emanuela.castorina@yithemes.com>
|
1175 |
+
*/
|
1176 |
+
public static function add_infobox( $args = array() ) {
|
1177 |
+
if ( ! empty( $args ) ) {
|
1178 |
+
extract( $args );
|
1179 |
+
require_once( YIT_CORE_PLUGIN_TEMPLATE_PATH . '/panel/boxinfo.php' );
|
1180 |
+
}
|
1181 |
+
}
|
1182 |
|
1183 |
+
/**
|
1184 |
+
* Show a box panel with specific content in two columns as a new woocommerce type
|
1185 |
+
*
|
1186 |
+
* @param array $args
|
1187 |
+
* @return void
|
1188 |
+
* @deprecated 3.0.12 Do nothing! Method left to prevent Fatal Error if called directly
|
1189 |
+
*/
|
1190 |
+
public static function add_videobox( $args = array() ) {
|
1191 |
|
1192 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
1193 |
|
1194 |
+
/**
|
1195 |
+
* Fire the action to print the custom tab
|
1196 |
+
*
|
1197 |
+
* @return void
|
1198 |
+
* @deprecated 3.0.12 Do nothing! Method left to prevent Fatal Error if called directly
|
1199 |
+
*/
|
1200 |
+
public function print_video_box() {
|
1201 |
|
1202 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1203 |
|
1204 |
+
/**
|
1205 |
+
* sort plugins by name in YITH Plugins menu
|
1206 |
+
*
|
1207 |
+
* @since 3.0.0
|
1208 |
+
* @author Leanza Francesco <leanzafrancesco@gmail.com>
|
1209 |
+
*/
|
1210 |
+
public static function sort_plugins() {
|
1211 |
+
global $submenu;
|
1212 |
+
if ( ! empty( $submenu['yith_plugin_panel'] ) ) {
|
1213 |
+
$sorted_plugins = $submenu['yith_plugin_panel'];
|
1214 |
|
1215 |
+
usort( $sorted_plugins, function ( $a, $b ) {
|
1216 |
+
return strcmp( current( $a ), current( $b ) );
|
1217 |
+
} );
|
1218 |
|
1219 |
+
$submenu['yith_plugin_panel'] = $sorted_plugins;
|
1220 |
+
}
|
1221 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1222 |
|
1223 |
+
/**
|
1224 |
+
* add menu class in YITH Plugins menu
|
1225 |
+
*
|
1226 |
+
* @since 3.0.0
|
1227 |
+
* @author Leanza Francesco <leanzafrancesco@gmail.com>
|
1228 |
+
*/
|
1229 |
+
public static function add_menu_class_in_yith_plugin( $menu ) {
|
1230 |
+
global $submenu;
|
1231 |
+
|
1232 |
+
if ( ! empty( $submenu['yith_plugin_panel'] ) ) {
|
1233 |
+
$item_count = count( $submenu['yith_plugin_panel'] );
|
1234 |
+
$columns = absint( $item_count / 20 ) + 1;
|
1235 |
+
$columns = max( 1, min( $columns, 3 ) );
|
1236 |
+
$columns = apply_filters( 'yith_plugin_fw_yith_plugins_menu_columns', $columns, $item_count );
|
1237 |
+
|
1238 |
+
if ( $columns > 1 ) {
|
1239 |
+
$class = "yith-plugin-fw-menu-$columns-columns";
|
1240 |
+
foreach ( $menu as $order => $top ) {
|
1241 |
+
if ( 'yith_plugin_panel' === $top[2] ) {
|
1242 |
+
$c = $menu[ $order ][4];
|
1243 |
+
$menu[ $order ][4] = add_cssclass( $class, $c );
|
1244 |
+
break;
|
1245 |
+
}
|
1246 |
+
}
|
1247 |
+
}
|
1248 |
+
}
|
1249 |
|
1250 |
+
return $menu;
|
1251 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1252 |
|
1253 |
+
/**
|
1254 |
+
* Check if inside the admin tab there's the premium tab to
|
1255 |
+
* check if the plugin is a free or not
|
1256 |
+
*
|
1257 |
+
* @author Emanuela Castorina
|
1258 |
+
*/
|
1259 |
+
function is_free() {
|
1260 |
+
return ( ! empty( $this->settings['admin-tabs'] ) && isset( $this->settings['admin-tabs']['premium'] ) );
|
1261 |
+
}
|
1262 |
|
1263 |
+
/**
|
1264 |
+
* Add plugin banner
|
1265 |
+
*/
|
1266 |
+
public function add_plugin_banner( $page ) {
|
1267 |
|
1268 |
+
if ( $page != $this->settings['page'] || ! isset( $this->settings['class'] ) ) {
|
1269 |
+
return;
|
1270 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1271 |
|
1272 |
+
if ( $this->is_free() && isset( $this->settings['plugin_slug'] ) ):
|
1273 |
+
$rate_link = apply_filters( 'yith_plugin_fw_rate_url', 'https://wordpress.org/support/plugin/' . $this->settings['plugin_slug'] . '/reviews/?rate=5#new-post' );
|
1274 |
+
?>
|
1275 |
+
<h1 class="notice-container"></h1>
|
1276 |
+
<div class="yith-plugin-fw-banner">
|
1277 |
+
<h1><?php echo esc_html( $this->settings['page_title'] ) ?></h1>
|
1278 |
+
</div>
|
1279 |
+
<div class="yith-plugin-fw-rate">
|
1280 |
+
<?php printf( '<strong>%s</strong> %s <a href="%s" target="_blank"><u>%s</u> <span class="dashicons dashicons-star-filled"></span><span class="dashicons dashicons-star-filled"></span><span class="dashicons dashicons-star-filled"></span><span class="dashicons dashicons-star-filled"></span><span class="dashicons dashicons-star-filled"></span></a> %s',
|
1281 |
+
__( 'We need your support', 'yith-plugin-fw' ),
|
1282 |
+
__( 'to keep updating and improving the plugin. Please,', 'yith-plugin-fw' ),
|
1283 |
+
$rate_link,
|
1284 |
+
__( 'help us by leaving a five-star rating', 'yith-plugin-fw' ),
|
1285 |
+
__( ':) Thanks!', 'yith-plugin-fw' ) ) ?>
|
1286 |
+
</div>
|
1287 |
+
<?php else: ?>
|
1288 |
+
<h1 class="notice-container"></h1>
|
1289 |
+
<div class="yith-plugin-fw-banner">
|
1290 |
+
<h1><?php echo esc_html( $this->settings['page_title'] ) ?></h1>
|
1291 |
+
</div>
|
1292 |
+
<?php endif ?>
|
1293 |
+
<?php
|
1294 |
+
}
|
1295 |
|
1296 |
+
/**
|
1297 |
+
* Add additional element after print the field.
|
1298 |
+
*
|
1299 |
+
* @since 3.2
|
1300 |
+
* @author Emanuela Castorina
|
1301 |
+
*/
|
1302 |
+
public function add_yith_ui( $field ) {
|
1303 |
+
global $pagenow;
|
1304 |
|
1305 |
+
$screen = function_exists( 'get_current_screen' ) ? get_current_screen() : false;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1306 |
|
1307 |
+
if ( empty( $this->settings['class'] ) || ! isset( $field['type'] ) ) {
|
1308 |
+
return;
|
1309 |
+
}
|
1310 |
+
if ( 'admin.php' === $pagenow && $screen && strpos( $screen->id, $this->settings['page'] ) !== false ) {
|
1311 |
+
switch ( $field['type'] ) {
|
1312 |
+
case 'datepicker':
|
1313 |
+
echo '<span class="yith-icon yith-icon-calendar"></span>';
|
1314 |
+
break;
|
1315 |
+
default:
|
1316 |
+
break;
|
1317 |
+
}
|
1318 |
+
}
|
1319 |
+
}
|
1320 |
|
|
|
|
|
1321 |
|
1322 |
+
public function get_post_type_tabs( $post_type ) {
|
1323 |
+
$tabs = array();
|
1324 |
+
|
1325 |
+
foreach ( $this->get_tabs_hierarchy() as $key => $info ) {
|
1326 |
+
if ( isset( $info['type'], $info['post_type'] ) && 'post_type' === $info['type'] && $post_type === $info['post_type'] ) {
|
1327 |
+
if ( ! empty( $info['parent'] ) ) {
|
1328 |
+
$tabs = array( 'tab' => $info['parent'], 'sub_tab' => $key );
|
1329 |
+
} else {
|
1330 |
+
$tabs = array( 'tab' => $key );
|
1331 |
+
}
|
1332 |
+
break;
|
1333 |
+
}
|
1334 |
+
}
|
1335 |
|
1336 |
$panel_page = isset( $this->settings['page'] ) ? $this->settings['page'] : 'general';
|
1337 |
|
1338 |
return apply_filters( "yith_plugin_fw_panel_{$panel_page}_get_post_type_tabs", $tabs, $post_type );
|
1339 |
+
}
|
1340 |
|
1341 |
+
public function get_taxonomy_tabs( $taxonomy ) {
|
1342 |
+
$tabs = array();
|
1343 |
+
|
1344 |
+
foreach ( $this->get_tabs_hierarchy() as $key => $info ) {
|
1345 |
+
if ( isset( $info['type'], $info['taxonomy'] ) && 'taxonomy' === $info['type'] && $taxonomy === $info['taxonomy'] ) {
|
1346 |
+
if ( ! empty( $info['parent'] ) ) {
|
1347 |
+
$tabs = array( 'tab' => $info['parent'], 'sub_tab' => $key );
|
1348 |
+
} else {
|
1349 |
+
$tabs = array( 'tab' => $key );
|
1350 |
+
}
|
1351 |
+
break;
|
1352 |
+
}
|
1353 |
+
}
|
1354 |
|
1355 |
$panel_page = isset( $this->settings['page'] ) ? $this->settings['page'] : 'general';
|
1356 |
|
1357 |
return apply_filters( "yith_plugin_fw_panel_{$panel_page}_get_taxonomy_tabs", $tabs, $taxonomy );
|
1358 |
+
}
|
1359 |
|
1360 |
|
1361 |
+
/**
|
1362 |
+
* If the panel page is a WP Page, this will redirect you to the correct page
|
1363 |
+
* useful when a Post Type (Taxonomy) is the first tab of your panel, so when you open your panel it'll open the Post Type (Taxonomy) list
|
1364 |
+
*
|
1365 |
+
* @since 3.4.0
|
1366 |
+
* @author Leanza Francesco <leanzafrancesco@gmail.com>
|
1367 |
+
*/
|
1368 |
+
public function maybe_redirect_to_proper_wp_page() {
|
1369 |
+
global $pagenow;
|
1370 |
if ( 'admin.php' === $pagenow && isset( $_GET['page'] ) && $this->settings['page'] === $_GET['page'] &&
|
1371 |
+
! $this->is_custom_taxonomy_page() && ! $this->is_custom_post_type_page() && ! isset( $_REQUEST['yith-plugin-fw-panel-skip-redirect'] ) ) {
|
1372 |
$url = $this->get_nav_url( $this->settings['page'], $this->get_current_tab(), $this->get_current_sub_tab() );
|
1373 |
if ( strpos( $url, 'edit.php' ) !== false || strpos( $url, 'edit-tags.php' ) !== false ) {
|
1374 |
wp_safe_redirect( add_query_arg( array( 'yith-plugin-fw-panel-skip-redirect' => 1 ), $url ) );
|
1387 |
public function print_panel_tabs_in_wp_pages() {
|
1388 |
if ( self::$_panel_tabs_in_wp_pages ) {
|
1389 |
wp_enqueue_style( 'yit-plugin-style' );
|
1390 |
+
wp_enqueue_script( 'yit-plugin-panel' );
|
1391 |
+
|
1392 |
$wrap_class = isset( $this->settings[ 'class' ] ) ? $this->settings[ 'class' ] : '';
|
1393 |
|
1394 |
?>
|
plugin-fw/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
{
|
2 |
"name": "yith-plugin-framewowrk",
|
3 |
-
"version": "3.4.
|
4 |
"description": "YITH Plugin Framework",
|
5 |
"main": "Gruntfile.js",
|
6 |
"scripts": {
|
1 |
{
|
2 |
"name": "yith-plugin-framewowrk",
|
3 |
+
"version": "3.4.29",
|
4 |
"description": "YITH Plugin Framework",
|
5 |
"main": "Gruntfile.js",
|
6 |
"scripts": {
|
plugin-fw/templates/fields/inline-fields.php
ADDED
@@ -0,0 +1,60 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* This file belongs to the YIT Plugin Framework.
|
4 |
+
*
|
5 |
+
* This source file is subject to the GNU GENERAL PUBLIC LICENSE (GPL 3.0)
|
6 |
+
* that is bundled with this package in the file LICENSE.txt.
|
7 |
+
* It is also available through the world-wide-web at this URL:
|
8 |
+
* http://www.gnu.org/licenses/gpl-3.0.txt
|
9 |
+
*
|
10 |
+
* @var array $field
|
11 |
+
*/
|
12 |
+
|
13 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
14 |
+
exit; // Exit if accessed directly.
|
15 |
+
}
|
16 |
+
|
17 |
+
extract( $field );
|
18 |
+
$value = maybe_unserialize( $value );
|
19 |
+
if ( ! empty( $fields ) && is_array( $fields ) ) { ?>
|
20 |
+
<div id="<?php echo esc_attr( $id ); ?>" class="<?php echo isset( $class ) ? $class : ''; ?> yith-inline-fields">
|
21 |
+
<?php
|
22 |
+
foreach ( $fields as $key => $field ) {
|
23 |
+
$allowed_types = array( 'select', 'select-buttons', 'number', 'text', 'slider', 'hidden', 'html' );
|
24 |
+
$default_args = array( 'type' => 'select' );
|
25 |
+
|
26 |
+
// set default
|
27 |
+
if ( ! isset( $field[ 'default' ] ) && isset( $field[ 'std' ] ) ) {
|
28 |
+
$field['default'] = $field['std'];
|
29 |
+
}
|
30 |
+
$std = isset( $field['default'] ) ? $field['default'] : '';
|
31 |
+
|
32 |
+
$field['value'] = isset( $value[ $key ] ) ? maybe_unserialize( $value[ $key ] ) : $std;
|
33 |
+
$field['class'] = isset( $field['class'] ) ? $field['class'] : '';
|
34 |
+
$field['id'] = $id . '_' . $key;
|
35 |
+
$field['name'] = $name . '[' . $key . ']';
|
36 |
+
|
37 |
+
if ( ! in_array( $field['type'], $allowed_types, true ) ) {
|
38 |
+
continue;
|
39 |
+
}
|
40 |
+
|
41 |
+
if ( in_array( $field['type'], array( 'select', 'select-buttons' ), true ) ) {
|
42 |
+
$field['class'] = 'wc-enhanced-select';
|
43 |
+
}
|
44 |
+
?>
|
45 |
+
<?php if ( isset( $field['inline-label'] ) && '' !== $field['inline-label'] ) : ?>
|
46 |
+
<div class="option-element">
|
47 |
+
<span><?php echo $field['inline-label']; ?></span>
|
48 |
+
</div>
|
49 |
+
<?php endif; ?>
|
50 |
+
<div class="option-element <?php echo $field['type']; ?> <?php echo $field['class']; ?>">
|
51 |
+
<?php if ( isset( $field['label'] ) && '' !== $field['label'] ) : ?>
|
52 |
+
<label for="<?php echo $field['id']; ?>"><?php echo $field['label']; ?></label>
|
53 |
+
<?php endif; ?>
|
54 |
+
<?php yith_plugin_fw_get_field( $field, true ); ?>
|
55 |
+
</div>
|
56 |
+
<?php } ?>
|
57 |
+
</div>
|
58 |
+
<?php
|
59 |
+
|
60 |
+
}
|
plugin-fw/templates/fields/radio.php
CHANGED
@@ -21,7 +21,7 @@ $class = 'yith-plugin-fw-radio ' . $class;
|
|
21 |
?>
|
22 |
<div class="<?php echo $class ?>" id="<?php echo $id ?>"
|
23 |
<?php echo $custom_attributes ?>
|
24 |
-
<?php if ( isset( $data ) ) echo yith_plugin_fw_html_data_to_string( $data ); ?> value="<?php echo $value ?>">
|
25 |
<?php foreach ( $options as $key => $label ) :
|
26 |
$radio_id = sanitize_key( $id . '-' . $key );
|
27 |
?>
|
21 |
?>
|
22 |
<div class="<?php echo $class ?>" id="<?php echo $id ?>"
|
23 |
<?php echo $custom_attributes ?>
|
24 |
+
<?php if ( isset( $data ) ) echo yith_plugin_fw_html_data_to_string( $data ); ?> data-value="<?php echo $value ?>">
|
25 |
<?php foreach ( $options as $key => $label ) :
|
26 |
$radio_id = sanitize_key( $id . '-' . $key );
|
27 |
?>
|
plugin-fw/templates/fields/textarea-editor.php
CHANGED
@@ -18,6 +18,8 @@ if ( !function_exists( 'wp_editor' ) ) :
|
|
18 |
else:
|
19 |
extract( $field );
|
20 |
|
|
|
|
|
21 |
$editor_args = wp_parse_args( $field, array(
|
22 |
'wpautop' => true, // use wpautop?
|
23 |
'media_buttons' => true, // show insert/upload button(s)
|
@@ -32,7 +34,7 @@ else:
|
|
32 |
'quicktags' => true // load Quicktags, can be used to pass settings directly to Quicktags using an array()
|
33 |
) );
|
34 |
?>
|
35 |
-
<div class="editor" <?php echo $custom_attributes ?>
|
36 |
<?php if ( isset( $data ) ) echo yith_plugin_fw_html_data_to_string( $data ); ?>><?php wp_editor( $value, $id, $editor_args ); ?></div>
|
37 |
|
38 |
<?php endif; ?>
|
18 |
else:
|
19 |
extract( $field );
|
20 |
|
21 |
+
$classes = isset( $classes ) ? ' '.$classes : '';
|
22 |
+
|
23 |
$editor_args = wp_parse_args( $field, array(
|
24 |
'wpautop' => true, // use wpautop?
|
25 |
'media_buttons' => true, // show insert/upload button(s)
|
34 |
'quicktags' => true // load Quicktags, can be used to pass settings directly to Quicktags using an array()
|
35 |
) );
|
36 |
?>
|
37 |
+
<div class="editor<?php echo $classes ?>" <?php echo $custom_attributes ?>
|
38 |
<?php if ( isset( $data ) ) echo yith_plugin_fw_html_data_to_string( $data ); ?>><?php wp_editor( $value, $id, $editor_args ); ?></div>
|
39 |
|
40 |
<?php endif; ?>
|
plugin-fw/templates/fields/toggle-element.php
CHANGED
@@ -44,6 +44,11 @@ if ( empty( $values ) && !$show_add_button && $elements ) {
|
|
44 |
|
45 |
?>
|
46 |
<div class="yith-toggle_wrapper <?php echo $class_wrapper ?>" id="<?php echo $id ?>" data-nonce="<?php echo $ajax_nonce; ?>">
|
|
|
|
|
|
|
|
|
|
|
47 |
<?php
|
48 |
|
49 |
if ( $show_add_button ):
|
@@ -287,4 +292,4 @@ if ( empty( $values ) && !$show_add_button && $elements ) {
|
|
287 |
</div>
|
288 |
</script>
|
289 |
|
290 |
-
</div>
|
44 |
|
45 |
?>
|
46 |
<div class="yith-toggle_wrapper <?php echo $class_wrapper ?>" id="<?php echo $id ?>" data-nonce="<?php echo $ajax_nonce; ?>">
|
47 |
+
<?php
|
48 |
+
if( !empty( $label ) ):
|
49 |
+
?>
|
50 |
+
<label for="<?php esc_attr_e($id);?>"><?php echo esc_html( $label );?></label>
|
51 |
+
<?php endif;?>
|
52 |
<?php
|
53 |
|
54 |
if ( $show_add_button ):
|
292 |
</div>
|
293 |
</script>
|
294 |
|
295 |
+
</div>
|
plugin-fw/templates/metaboxes/tab.php
CHANGED
@@ -73,11 +73,11 @@ do_action( 'yit_before_metaboxes_tab' ) ?>
|
|
73 |
if ( $pos = strpos( $field_name, ']' ) ) {
|
74 |
$field_name = substr_replace( $field_name, '', $pos, 1 );
|
75 |
}
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
|
82 |
?>
|
83 |
<div class="<?php echo $container_classes ?>">
|
73 |
if ( $pos = strpos( $field_name, ']' ) ) {
|
74 |
$field_name = substr_replace( $field_name, '', $pos, 1 );
|
75 |
}
|
76 |
+
$value = yit_get_post_meta( $post->ID, $field_name );
|
77 |
+
$field['value'] = false === $value ? ( isset( $field['std'] ) ? $field['std'] : '' ) : $value;
|
78 |
+
$field['checkboxgroup'] = ( $field['type'] == 'checkbox' && isset( $field['checkboxgroup'] ) ) ? " " . $field['checkboxgroup'] : "";
|
79 |
+
$container_classes = "the-metabox " . $field['type'] . $field['checkboxgroup'] . " clearfix ";
|
80 |
+
$container_classes .= empty( $field['label'] ) ? 'no-label' : '';
|
81 |
|
82 |
?>
|
83 |
<div class="<?php echo $container_classes ?>">
|
plugin-fw/templates/panel/woocommerce/woocommerce-form.php
CHANGED
@@ -10,8 +10,10 @@ $panel_content_class = apply_filters( 'yit_admin_panel_content_class', 'yit-admi
|
|
10 |
<div class="<?php echo $panel_content_class; ?>">
|
11 |
<form id="plugin-fw-wc" method="post">
|
12 |
<?php $this->add_fields() ?>
|
13 |
-
|
14 |
-
|
|
|
|
|
15 |
</form>
|
16 |
<form id="plugin-fw-wc-reset" method="post">
|
17 |
<?php $warning = __( 'If you continue with this action, you will reset all options in this page.', 'yith-plugin-fw' ) ?>
|
10 |
<div class="<?php echo $panel_content_class; ?>">
|
11 |
<form id="plugin-fw-wc" method="post">
|
12 |
<?php $this->add_fields() ?>
|
13 |
+
<p class="submit" style="float: left;margin: 0 10px 0 0;">
|
14 |
+
<?php wp_nonce_field( 'yit_panel_wc_options_' . $this->settings[ 'page' ], 'yit_panel_wc_options_nonce' ); ?>
|
15 |
+
<input class="button-primary" type="submit" value="<?php _e( 'Save Changes', 'yith-plugin-fw' ) ?>"/>
|
16 |
+
</p>
|
17 |
</form>
|
18 |
<form id="plugin-fw-wc-reset" method="post">
|
19 |
<?php $warning = __( 'If you continue with this action, you will reset all options in this page.', 'yith-plugin-fw' ) ?>
|
plugin-fw/yit-functions.php
CHANGED
@@ -338,12 +338,12 @@ if ( !function_exists( 'yit_get_post_meta' ) ) {
|
|
338 |
*
|
339 |
* @param int $id Post ID.
|
340 |
* @param string $meta The meta key to retrieve.
|
341 |
-
* @return mixed Single value or array
|
342 |
* @since 2.0.0
|
343 |
*/
|
344 |
function yit_get_post_meta( $id, $meta ) {
|
345 |
if ( !strpos( $meta, '[' ) ) {
|
346 |
-
return get_post_meta( $id, $meta, true );
|
347 |
}
|
348 |
|
349 |
$sub_meta = explode( '[', $meta );
|
@@ -969,21 +969,34 @@ if ( !function_exists( 'yith_plugin_fw_get_field' ) ) {
|
|
969 |
* @return string|void
|
970 |
*/
|
971 |
function yith_plugin_fw_get_field( $field, $echo = false, $show_container = true ) {
|
972 |
-
if ( empty( $field[ 'type' ] ) )
|
973 |
-
|
|
|
974 |
|
975 |
-
if ( !isset( $field[ 'value' ] ) )
|
976 |
-
|
|
|
977 |
|
978 |
-
if ( !isset( $field[ 'name' ] ) )
|
979 |
-
|
|
|
980 |
|
981 |
-
if ( !isset( $field[ 'custom_attributes' ] ) )
|
982 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
983 |
|
984 |
-
|
985 |
-
|
986 |
|
|
|
|
|
|
|
987 |
|
988 |
$field_template = yith_plugin_fw_get_field_template_path( $field );
|
989 |
|
338 |
*
|
339 |
* @param int $id Post ID.
|
340 |
* @param string $meta The meta key to retrieve.
|
341 |
+
* @return mixed Single value or array. Return false is the meta doesn't exists.
|
342 |
* @since 2.0.0
|
343 |
*/
|
344 |
function yit_get_post_meta( $id, $meta ) {
|
345 |
if ( !strpos( $meta, '[' ) ) {
|
346 |
+
return metadata_exists( 'post', $id, $meta ) ? get_post_meta( $id, $meta, true ) : false;
|
347 |
}
|
348 |
|
349 |
$sub_meta = explode( '[', $meta );
|
969 |
* @return string|void
|
970 |
*/
|
971 |
function yith_plugin_fw_get_field( $field, $echo = false, $show_container = true ) {
|
972 |
+
if ( empty( $field[ 'type' ] ) ) {
|
973 |
+
return '';
|
974 |
+
}
|
975 |
|
976 |
+
if ( !isset( $field[ 'value' ] ) ) {
|
977 |
+
$field['value'] = '';
|
978 |
+
}
|
979 |
|
980 |
+
if ( !isset( $field[ 'name' ] ) ) {
|
981 |
+
$field['name'] = '';
|
982 |
+
}
|
983 |
|
984 |
+
if ( ! isset( $field[ 'custom_attributes' ] ) ) {
|
985 |
+
$field['custom_attributes'] = '';
|
986 |
+
}
|
987 |
+
elseif( is_array( $field[ 'custom_attributes' ] ) ) {
|
988 |
+
// let's build custom attributes as string
|
989 |
+
$custom_attributes = array();
|
990 |
+
foreach ( $field[ 'custom_attributes' ] as $attribute => $attribute_value ) {
|
991 |
+
$custom_attributes[] = esc_attr( $attribute ) . '="' . esc_attr( $attribute_value ) . '"';
|
992 |
+
}
|
993 |
|
994 |
+
$field['custom_attributes'] = implode( ' ', $custom_attributes );
|
995 |
+
}
|
996 |
|
997 |
+
if ( ! isset( $field[ 'default' ] ) && isset( $field[ 'std' ] ) ) {
|
998 |
+
$field['default'] = $field['std'];
|
999 |
+
}
|
1000 |
|
1001 |
$field_template = yith_plugin_fw_get_field_template_path( $field );
|
1002 |
|
widgets/class.yith-wcan-navigation-widget.php
CHANGED
@@ -163,8 +163,9 @@ if ( ! class_exists( 'YITH_WCAN_Navigation_Widget' ) ) {
|
|
163 |
|
164 |
echo "<ul class='yith-wcan-select yith-wcan {$instance['extra_class']}'>";
|
165 |
|
|
|
166 |
foreach ( $terms as $term ) {
|
167 |
-
|
168 |
// Get count based on current view - uses transients
|
169 |
//$transient_name = 'wc_ln_count_' . md5( sanitize_key( $taxonomy ) . sanitize_key( $term->term_id ) );
|
170 |
|
@@ -595,7 +596,7 @@ if ( ! class_exists( 'YITH_WCAN_Navigation_Widget' ) ) {
|
|
595 |
$color = $instance['colors'][$term_id];
|
596 |
}
|
597 |
|
598 |
-
elseif( function_exists( 'ywccl_get_term_meta' ) && ! empty( $wc_product_attributes[ $term->taxonomy ]->attribute_type ) && 'colorpicker' == $wc_product_attributes[ $term->taxonomy ]->attribute_type ) {
|
599 |
$colors = ywccl_get_term_meta( $term->term_id, $term->taxonomy . '_yith_wccl_value' );
|
600 |
if( ! empty( $colors ) ){
|
601 |
$colors = explode( ',', $colors );
|
@@ -836,7 +837,7 @@ if ( ! class_exists( 'YITH_WCAN_Navigation_Widget' ) ) {
|
|
836 |
$label = ywccl_get_term_meta( $term->term_id, $term->taxonomy . '_yith_wccl_value' );
|
837 |
}
|
838 |
|
839 |
-
if ( $label ) {
|
840 |
|
841 |
echo '<li ' . $class . '>';
|
842 |
|
163 |
|
164 |
echo "<ul class='yith-wcan-select yith-wcan {$instance['extra_class']}'>";
|
165 |
|
166 |
+
$this->found = false;
|
167 |
foreach ( $terms as $term ) {
|
168 |
+
|
169 |
// Get count based on current view - uses transients
|
170 |
//$transient_name = 'wc_ln_count_' . md5( sanitize_key( $taxonomy ) . sanitize_key( $term->term_id ) );
|
171 |
|
596 |
$color = $instance['colors'][$term_id];
|
597 |
}
|
598 |
|
599 |
+
elseif( apply_filters( 'yith_wcan_ywccl_support', function_exists( 'ywccl_get_term_meta' ) ) && ! empty( $wc_product_attributes[ $term->taxonomy ]->attribute_type ) && 'colorpicker' == $wc_product_attributes[ $term->taxonomy ]->attribute_type ) {
|
600 |
$colors = ywccl_get_term_meta( $term->term_id, $term->taxonomy . '_yith_wccl_value' );
|
601 |
if( ! empty( $colors ) ){
|
602 |
$colors = explode( ',', $colors );
|
837 |
$label = ywccl_get_term_meta( $term->term_id, $term->taxonomy . '_yith_wccl_value' );
|
838 |
}
|
839 |
|
840 |
+
if ( apply_filters( 'yith_wcan_filter_label_text', $label, $term, $taxonomy ) ) {
|
841 |
|
842 |
echo '<li ' . $class . '>';
|
843 |
|
widgets/class.yith-wcan-reset-navigation-widget.php
CHANGED
@@ -108,7 +108,12 @@ if ( ! class_exists( 'YITH_WCAN_Reset_Navigation_Widget' ) ) {
|
|
108 |
}
|
109 |
else {
|
110 |
ob_end_clean();
|
111 |
-
|
|
|
|
|
|
|
|
|
|
|
112 |
}
|
113 |
}
|
114 |
|
108 |
}
|
109 |
else {
|
110 |
ob_end_clean();
|
111 |
+
if( strpos($before_widget, '<!--widget') !== 0 ){
|
112 |
+
$before_widget = str_replace( '>', ' style="display:none">', $before_widget );
|
113 |
+
}
|
114 |
+
|
115 |
+
$html = sprintf( '%s%s', $before_widget, $after_widget );
|
116 |
+
echo $html;
|
117 |
}
|
118 |
}
|
119 |
|