YITH WooCommerce Catalog Mode - Version 1.6.6

Version Description

Last Stable Tag 1.6.6

Download this release

Release Info

Developer yithemes
Plugin Icon 128x128 YITH WooCommerce Catalog Mode
Version 1.6.6
Comparing to
See all releases

Code changes from version 1.6.5 to 1.6.6

init.php CHANGED
@@ -5,10 +5,10 @@
5
* Description: <code><strong>YITH WooCommerce Catalog Mode</strong></code> allows hiding product prices, cart and checkout from your store and turning it into a performing product catalogue. You will be able to adjust your catalogue settings as you prefer based on your requirements. <a href="https://yithemes.com/" target="_blank">Get more plugins for your e-commerce shop on <strong>YITH</strong></a>
6
* Author: YITH
7
* Text Domain: yith-woocommerce-catalog-mode
8
- * Version: 1.6.5
9
* Author URI: http://yithemes.com/
10
- * WC requires at least: 3.3.0
11
- * WC tested up to: 3.5.x
12
*/
13
14
if ( ! defined( 'ABSPATH' ) ) {
@@ -36,7 +36,7 @@ function ywctm_install_free_admin_notice() {
36
}
37
38
if ( ! defined( 'YWCTM_VERSION' ) ) {
39
- define( 'YWCTM_VERSION', '1.6.5' );
40
}
41
42
if ( ! defined( 'YWCTM_FREE_INIT' ) ) {
5
* Description: <code><strong>YITH WooCommerce Catalog Mode</strong></code> allows hiding product prices, cart and checkout from your store and turning it into a performing product catalogue. You will be able to adjust your catalogue settings as you prefer based on your requirements. <a href="https://yithemes.com/" target="_blank">Get more plugins for your e-commerce shop on <strong>YITH</strong></a>
6
* Author: YITH
7
* Text Domain: yith-woocommerce-catalog-mode
8
+ * Version: 1.6.6
9
* Author URI: http://yithemes.com/
10
+ * WC requires at least: 3.4.0
11
+ * WC tested up to: 3.6.x
12
*/
13
14
if ( ! defined( 'ABSPATH' ) ) {
36
}
37
38
if ( ! defined( 'YWCTM_VERSION' ) ) {
39
+ define( 'YWCTM_VERSION', '1.6.6' );
40
}
41
42
if ( ! defined( 'YWCTM_FREE_INIT' ) ) {
plugin-fw/assets/css/admin.css CHANGED
@@ -53,6 +53,27 @@
53
display: block;
54
}
55
56
/*-----------------------
57
YITH Plugins Columns
58
------------------------*/
53
display: block;
54
}
55
56
+ /*-----------------------
57
+ YITH FEEDS
58
+ ------------------------*/
59
+
60
+ .yith-feeds-logo{
61
+ display: table-cell;
62
+ background: #005b7c;
63
+ padding: 5px;
64
+ border-radius: 50%;
65
+ margin-right: 10px;
66
+ vertical-align: text-bottom;
67
+ width: 18px;
68
+ height: auto;
69
+ vertical-align: middle;
70
+ }
71
+
72
+ .yith-feeds-plugin-name{
73
+ display: table-cell;
74
+ vertical-align: middle;
75
+ }
76
+
77
/*-----------------------
78
YITH Plugins Columns
79
------------------------*/
plugin-fw/assets/css/yit-upgrader.css CHANGED
@@ -15,4 +15,8 @@
15
overflow-y : auto;
16
z-index : 999;
17
background: #fcfcfc;
18
}
15
overflow-y : auto;
16
z-index : 999;
17
background: #fcfcfc;
18
+ }
19
+
20
+ .yith-updating:before{
21
+ animation: rotation 2s infinite linear;
22
}
plugin-fw/assets/js/multisite-updater.js CHANGED
@@ -74,7 +74,7 @@
74
}
75
76
if( version_compare( plugin[ headers ].Version, plugin[ headers ].Latest, '>' ) ){
77
- html = html + localize.strings.version_issue
78
}
79
80
html = html +
74
}
75
76
if( version_compare( plugin[ headers ].Version, plugin[ headers ].Latest, '>' ) ){
77
+ html = html + localize.strings.version_issue.replace( '%plugin_name%', name )
78
}
79
80
html = html +
plugin-fw/assets/js/multisite-updater.min.js CHANGED
@@ -1,4 +1 @@
1
- (function(f){function n(c,d,f){this.php_js=this.php_js||{};this.php_js.ENV=this.php_js.ENV||{};var a=0,h=0,b=0,e={dev:-6,alpha:-5,a:-5,beta:-4,b:-4,RC:-3,rc:-3,"#":-2,p:1,pl:1};a=function(a){a=(""+a).replace(/[_\-+]/g,".");a=a.replace(/([^.\d]+)/g,".$1.").replace(/\.{2,}/g,".");return a.length?a.split("."):[-8]};numVersion=function(a){return a?isNaN(a)?e[a]||-7:parseInt(a,10):0};c=a(c);d=a(d);h=Math.max(c.length,d.length);for(a=0;a<h;a++)if(c[a]!=d[a])if(c[a]=numVersion(c[a]),d[a]=numVersion(d[a]),
2
- c[a]<d[a]){b=-1;break}else if(c[a]>d[a]){b=1;break}if(!f)return b;switch(f){case ">":case "gt":return 0<b;case ">=":case "ge":return 0<=b;case "<=":case "le":return 0>=b;case "==":case "=":case "eq":return 0===b;case "<>":case "!=":case "ne":return 0!==b;case "":case "<":case "lt":return 0>b;default:return null}}var l=f("#menu-plugins"),g=l.find(".update-plugins").find(".update-count").text(),p=plugins.registered,q=plugins.activated;if(0==g||""==g)g=0,l.find(".wp-menu-name").append('<span class="update-plugins"><span class="plugin-count"></span></span>');
3
- (function(c,d,g,a){for(var h in c){var b=c[h],e;for(e in b)if("slug"!=e&&!n(b[e].Version,b[e].Latest,"=")){g=parseInt(g)+1;f(".plugin-count").empty().html(g);var m=""+b[e].Name,l='*[data-slug="'+m.replace(RegExp(" ","g"),"-").trim().toLowerCase()+'"]';f(l).addClass("update");var k='<tr class="plugin-update-tr"><td colspan="3" class="plugin-update colspanchange"><div class="update-message notice inline notice-warning notice-alt">'+a.strings.new_version.replace("%plugin_name%",m)+'<a class="thickbox open-plugin-details-modal" href="'+
4
- a.details_url[h]+'">'+a.strings.latest.replace("%latest%",b[e].Latest)+"</a>";k="undefined"==typeof d[h]?k+" <em>"+a.strings.unavailable+"</em>"+a.strings.activate.replace("%activate_link%",a.licence_activation_url).replace("%plugin_name%",m):k+'. <a href="'+a.update_url[h]+'">'+a.strings.update_now+"</a>";n(b[e].Version,b[e].Latest,">")&&(k+=a.strings.version_issue);k+="</div></td></tr>";f(k).insertAfter(l)}}})(p,q,g,plugins);f("body").on("click",".yit-changelog-button",function(){f("#TB_window").remove()})})(jQuery);
1
+ !function(e){var a=e("#menu-plugins"),n=a.find(".update-plugins").find(".update-count").text(),t=plugins.registered,s=plugins.activated;if(0==n||""==n){n=0,a.find(".wp-menu-name").append('<span class="update-plugins"><span class="plugin-count"></span></span>')}function i(e,a,n){this.php_js=this.php_js||{},this.php_js.ENV=this.php_js.ENV||{};var t,s=0,i=0,r={dev:-6,alpha:-5,a:-5,beta:-4,b:-4,RC:-3,rc:-3,"#":-2,p:1,pl:1},l=function(e){return(e=(e=(""+e).replace(/[_\-+]/g,".")).replace(/([^.\d]+)/g,".$1.").replace(/\.{2,}/g,".")).length?e.split("."):[-8]};for(numVersion=function(e){return e?isNaN(e)?r[e]||-7:parseInt(e,10):0},e=l(e),a=l(a),t=Math.max(e.length,a.length),s=0;s<t;s++)if(e[s]!=a[s]){if(e[s]=numVersion(e[s]),a[s]=numVersion(a[s]),e[s]<a[s]){i=-1;break}if(e[s]>a[s]){i=1;break}}if(!n)return i;switch(n){case">":case"gt":return i>0;case">=":case"ge":return i>=0;case"<=":case"le":return i<=0;case"==":case"=":case"eq":return 0===i;case"<>":case"!=":case"ne":return 0!==i;case"":case"<":case"lt":return i<0;default:return null}}!function(a,n,t,s){for(var r in a){var l=a[r];for(var p in l)if("slug"!=p&&!i(l[p].Version,l[p].Latest,"=")){t=parseInt(t)+1,e(".plugin-count").empty().html(t);var u=new RegExp(" ","g"),c=l[p],g=""+c.Name,o=g.replace(u,"-").trim(),d='*[data-slug="'+o.toLowerCase()+'"]';e(d).addClass("update");var f='<tr class="plugin-update-tr"><td colspan="3" class="plugin-update colspanchange"><div class="update-message notice inline notice-warning notice-alt">'+s.strings.new_version.replace("%plugin_name%",g)+'<a class="thickbox open-plugin-details-modal" href="'+s.details_url[r]+'">'+s.strings.latest.replace("%latest%",l[p].Latest)+"</a>";f=void 0===n[r]?f+" <em>"+s.strings.unavailable+"</em>"+s.strings.activate.replace("%activate_link%",s.licence_activation_url).replace("%plugin_name%",g):f+'. <a href="'+s.update_url[r]+'">'+s.strings.update_now+"</a>",i(l[p].Version,l[p].Latest,">")&&(f+=s.strings.version_issue.replace("%plugin_name%",g)),e(f+="</div></td></tr>").insertAfter(d)}}}(t,s,n,plugins),e("body").on("click",".yit-changelog-button",function(){e("#TB_window").remove()})}(jQuery);
plugin-fw/assets/js/yith-dashboard.js ADDED
@@ -0,0 +1,47 @@
1
+ (function ($) {
2
+ // bind a button or a link to open the dialog
3
+ $('.yith-last-changelog').click(function(e) {
4
+ e.preventDefault();
5
+ var inlineId = $( this ).data( 'changelogid' ),
6
+ inlineModal = $('#' + inlineId),
7
+ plugininfo = $( this ).data( 'plugininfo' ),
8
+ b = {},
9
+ close_function = function() { $( this ).dialog( "close" ); };
10
+
11
+ b[yith_dashboard.buttons.close] = close_function;
12
+
13
+ // initalise the dialog
14
+ inlineModal.dialog({
15
+ title: plugininfo,
16
+ dialogClass: 'wp-dialog',
17
+ autoOpen: false,
18
+ draggable: false,
19
+ width: 'auto',
20
+ modal: true,
21
+ resizable: false,
22
+ closeOnEscape: true,
23
+ position: {
24
+ my: "center",
25
+ at: "center",
26
+ of: window
27
+ },
28
+ buttons: b,
29
+ show: {
30
+ effect: "blind",
31
+ duration: 1000
32
+ },
33
+ open: function () {
34
+ // close dialog by clicking the overlay behind it
35
+ $('.ui-widget-overlay').bind('click', function(){
36
+ inlineModal.dialog('close');
37
+ })
38
+ },
39
+ create: function () {
40
+ // style fix for WordPress admin
41
+ $('.ui-dialog-titlebar-close').addClass('ui-button');
42
+ },
43
+ });
44
+
45
+ inlineModal.dialog('open');
46
+ });
47
+ })(jQuery);
plugin-fw/assets/js/yith-dashboard.min.js ADDED
@@ -0,0 +1,2 @@
1
+ (function(a){a(".yith-last-changelog").click(function(b){b.preventDefault();b=a(this).data("changelogid");var c=a("#"+b);b=a(this).data("plugininfo");var d={};d[yith_dashboard.buttons.close]=function(){a(this).dialog("close")};c.dialog({title:b,dialogClass:"wp-dialog",autoOpen:!1,draggable:!1,width:"auto",modal:!0,resizable:!1,closeOnEscape:!0,position:{my:"center",at:"center",of:window},buttons:d,show:{effect:"blind",duration:1E3},open:function(){a(".ui-widget-overlay").bind("click",function(){c.dialog("close")})},
2
+ create:function(){a(".ui-dialog-titlebar-close").addClass("ui-button")}});c.dialog("open")})})(jQuery);
plugin-fw/assets/js/yith-update-plugins.js ADDED
@@ -0,0 +1,49 @@
1
+ /**
2
+ * This file belongs to the YIT Framework.
3
+ *
4
+ * This source file is subject to the GNU GENERAL PUBLIC LICENSE (GPL 3.0)
5
+ * that is bundled with this package in the file LICENSE.txt.
6
+ * It is also available through the world-wide-web at this URL:
7
+ * http://www.gnu.org/licenses/gpl-3.0.txt
8
+ */
9
+ (function ( $ ) {
10
+ $(document).on( 'click', 'a.yith-update-link', function(event){
11
+ var t = $(this),
12
+ p_wrapper = t.parent('p');
13
+
14
+ event.preventDefault();
15
+ $.ajax({
16
+ type: 'POST',
17
+ url: yith_plugin_fw.ajaxurl,
18
+ data: {
19
+ 'action': "update-plugin",
20
+ 'plugin': t.data('plugin'),
21
+ 'slug': t.data('slug'),
22
+ 'name': t.data('name'),
23
+ '_ajax_nonce': yith_plugin_fw.ajax_nonce
24
+ },
25
+ beforeSend: function(){
26
+ p_wrapper.text( yith_plugin_fw.l10n.updating.replace( '%s', t.data('name') ) );
27
+ p_wrapper.addClass( 'yith-updating' );
28
+ },
29
+ success: function (response) {
30
+ p_wrapper.removeClass( 'yith-updating' ).addClass( 'yith-updated' );
31
+ var notice_wrapper = p_wrapper.parent('div');
32
+ notice_wrapper.removeClass( 'notice-warning' ),
33
+ result_text = '';
34
+
35
+ if( response.success === true ){
36
+ notice_wrapper.addClass('notice-success updated-message').removeClass( 'update-message' );
37
+ result_text = yith_plugin_fw.l10n.updated;
38
+ }
39
+
40
+ else {
41
+ notice_wrapper.addClass('notice-error');
42
+ result_text = yith_plugin_fw.l10n.failed;
43
+ }
44
+
45
+ p_wrapper.text( result_text.replace( '%s', t.data('name') ) );
46
+ }
47
+ });
48
+ });
49
+ })( jQuery );
plugin-fw/assets/js/yith-update-plugins.min.js ADDED
@@ -0,0 +1,2 @@
1
+ (function(b){b(document).on("click","a.yith-update-link",function(e){var a=b(this),c=a.parent("p");e.preventDefault();b.ajax({type:"POST",url:yith_plugin_fw.ajaxurl,data:{action:"update-plugin",plugin:a.data("plugin"),slug:a.data("slug"),name:a.data("name"),_ajax_nonce:yith_plugin_fw.ajax_nonce},beforeSend:function(){c.text(yith_plugin_fw.l10n.updating.replace("%s",a.data("name")));c.addClass("yith-updating")},success:function(b){c.removeClass("yith-updating").addClass("yith-updated");var d=c.parent("div");
2
+ d.removeClass("notice-warning");result_text="";!0===b.success?(d.addClass("notice-success updated-message").removeClass("update-message"),result_text=yith_plugin_fw.l10n.updated):(d.addClass("notice-error"),result_text=yith_plugin_fw.l10n.failed);c.text(result_text.replace("%s",a.data("name")))}})})})(jQuery);
plugin-fw/init.php CHANGED
@@ -1,13 +1,13 @@
1
<?php
2
/**
3
* Framework Name: YIT Plugin Framework
4
- * Version: 3.1.20
5
* Author: YITHEMES
6
* Text Domain: yith-plugin-fw
7
* Domain Path: /languages/
8
*
9
* @author Your Inspiration Themes
10
- * @version 3.1.20
11
*/
12
/**
13
* This file belongs to the YIT Plugin Framework.
1
<?php
2
/**
3
* Framework Name: YIT Plugin Framework
4
+ * Version: 3.1.28
5
* Author: YITHEMES
6
* Text Domain: yith-plugin-fw
7
* Domain Path: /languages/
8
*
9
* @author Your Inspiration Themes
10
+ * @version 3.1.26
11
*/
12
/**
13
* This file belongs to the YIT Plugin Framework.
plugin-fw/lib/promo/yith-promo.php CHANGED
@@ -32,10 +32,10 @@ if( ! function_exists( 'yith_plugin_fw_promo_notices' ) ){
32
33
if ( ! is_wp_error( $remote_data ) && isset( $remote_data['response']['code'] ) && '200' == $remote_data['response']['code'] ) {
34
$promo_data = @simplexml_load_string( $remote_data['body'] );
35
36
if( true === $create_transient ){
37
$is_membership_user = false;
38
- $license = YIT_Plugin_Licence()->get_licence();
39
$xml_expiry_date = '';
40
41
if( is_array( $license ) && apply_filters( 'yith_plugin_fw_check_for_membership_user', true ) ){
@@ -102,6 +102,7 @@ if( ! function_exists( 'yith_plugin_fw_promo_notices' ) ){
102
$banner = isset( $promo->banner ) ? $promo->banner : '';
103
$style = $link = '';
104
$show_notice = false;
105
106
if( ! empty( $border_color ) ){
107
$style .= "border-left-color: {$border_color};";
@@ -129,7 +130,7 @@ if( ! function_exists( 'yith_plugin_fw_promo_notices' ) ){
129
130
if( ! empty( $url ) && ! empty( $url_label )) {
131
$promo_id .= $url . $url_label;
132
- $link = sprintf( '<a href="%s" target="_blank">%s</a>', $url, $url_label );
133
$show_notice = true;
134
}
135
@@ -150,7 +151,7 @@ if( ! function_exists( 'yith_plugin_fw_promo_notices' ) ){
150
if ( true === $show_notice ) :
151
wp_enqueue_script( 'yith-promo' );
152
?>
153
- <div id="<?php echo $unique_promo_id; ?>" class="yith-notice-is-dismissible notice notice-yith notice-alt is-dismissible" style="<?php echo $style; ?>" data-expiry= <?php echo $promo->end_date; ?>>
154
<p>
155
<?php if( ! empty( $banner ) ) { printf( '%s', $banner ); } ?>
156
<?php printf( "%s %s %s", $title, $description, $link ); ?>
32
33
if ( ! is_wp_error( $remote_data ) && isset( $remote_data['response']['code'] ) && '200' == $remote_data['response']['code'] ) {
34
$promo_data = @simplexml_load_string( $remote_data['body'] );
35
+ $license = YIT_Plugin_Licence()->get_licence();
36
37
if( true === $create_transient ){
38
$is_membership_user = false;
39
$xml_expiry_date = '';
40
41
if( is_array( $license ) && apply_filters( 'yith_plugin_fw_check_for_membership_user', true ) ){
102
$banner = isset( $promo->banner ) ? $promo->banner : '';
103
$style = $link = '';
104
$show_notice = false;
105
+ $original_promo_id = $promo_id;
106
107
if( ! empty( $border_color ) ){
108
$style .= "border-left-color: {$border_color};";
130
131
if( ! empty( $url ) && ! empty( $url_label )) {
132
$promo_id .= $url . $url_label;
133
+ $link = sprintf( '<a class="yith-promo-url" href="%s" target="_blank">%s</a>', $url, $url_label );
134
$show_notice = true;
135
}
136
151
if ( true === $show_notice ) :
152
wp_enqueue_script( 'yith-promo' );
153
?>
154
+ <div id="<?php echo $unique_promo_id; ?>" class="yith-notice-is-dismissible notice notice-yith notice-alt is-dismissible <?php echo $original_promo_id;?>" style="<?php echo $style; ?>" data-expiry="<?php echo $promo->end_date; ?>">
155
<p>
156
<?php if( ! empty( $banner ) ) { printf( '%s', $banner ); } ?>
157
<?php printf( "%s %s %s", $title, $description, $link ); ?>
plugin-fw/lib/yit-upgrade.php CHANGED
@@ -140,7 +140,7 @@ if ( ! class_exists( 'YIT_Upgrade' ) ) {
140
141
$error = false;
142
if ( ! is_wp_error( $remote_xml ) && isset( $remote_xml['response']['code'] ) && '200' == $remote_xml['response']['code'] ) {
143
- $plugin_remote_info = @simplexml_load_string( $remote_xml['body'] );
144
if ( $plugin_remote_info ) {
145
$info['Latest'] = (string) $plugin_remote_info->latest;
146
$info['changelog'] = (string) $plugin_remote_info->changelog;
@@ -198,7 +198,7 @@ if ( ! class_exists( 'YIT_Upgrade' ) ) {
198
'unavailable' => __( 'Automatic update is unavailable for this plugin,', 'yith-plugin-fw' ),
199
'activate' => __( 'please <a href="%activate_link%">activate</a> your copy of %plugin_name%.', 'yith-plugin-fw' ),
200
'update_now' => __( 'Update now.', 'yith-plugin-fw' ),
201
- 'version_issue' => __( '<br/><b>Please note:</b> You are using a higher version than the latest available one. </em>Please, make sure you\'ve downloaded the latest version of <em>%1$s</em> from the only <a href="https://yithemes.com" target="_blank">YITH official website</a>, specifically, from your <a href="https://yithemes.com/my-account/recent-downloads/" target="_blank">Downloads page</a>. This is the only way to be sure the version you are using is 100% malware-free.', 'yith-plugin-fw' ),
202
);
203
204
foreach ( $this->_plugins as $init => $info ) {
@@ -214,7 +214,7 @@ if ( ! class_exists( 'YIT_Upgrade' ) ) {
214
'details_url' => $details_url,
215
'strings' => $strings,
216
);
217
- $suffix = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min';
218
219
if( defined( 'YIT_CORE_PLUGIN_URL' ) ){
220
yit_enqueue_script( 'yit-multisite-updater', YIT_CORE_PLUGIN_URL . '/assets/js/multisite-updater' . $suffix . '.js', array( 'jquery' ), false, true );
@@ -226,7 +226,24 @@ if ( ! class_exists( 'YIT_Upgrade' ) ) {
226
public function admin_enqueue_scripts() {
227
global $pagenow;
228
if ( 'plugins.php' === $pagenow && defined( 'YIT_CORE_PLUGIN_URL' ) ) {
229
wp_enqueue_style( 'yit-upgrader', YIT_CORE_PLUGIN_URL . '/assets/css/yit-upgrader.css' );
230
}
231
}
232
@@ -454,7 +471,7 @@ if ( ! class_exists( 'YIT_Upgrade' ) ) {
454
455
if ( ! is_wp_error( $remote_xml ) && isset( $remote_xml['response']['code'] ) && '200' == $remote_xml['response']['code'] ) {
456
457
- $plugin_remote_info = @simplexml_load_string( $remote_xml['body'] );
458
459
if ( $plugin_remote_info ) {
460
$wrong_current_version_check = version_compare( $plugin['info']['Version'], $plugin_remote_info->latest, '>' );
@@ -514,8 +531,10 @@ if ( ! class_exists( 'YIT_Upgrade' ) ) {
514
*/
515
public function plugin_update_row() {
516
517
- $current = get_site_transient( 'update_plugins' );
518
- $init = str_replace( 'after_plugin_row_', '', current_filter() );
519
520
if ( ! isset( $current->response[ $init ] ) ) {
521
return false;
@@ -537,7 +556,7 @@ if ( ! class_exists( 'YIT_Upgrade' ) ) {
537
global $wp_version;
538
$is_wp_4_6 = version_compare( $wp_version, '4.6', '>=' );
539
540
- echo '<tr class="plugin-update-tr active' . ( is_plugin_active( $init ) ? ' active' : '' ) . '"><td colspan="' . $wp_list_table->get_column_count() . '" class="plugin-update colspanchange">';
541
542
echo '<div class="update-message' . ( $is_wp_4_6 ? ' notice inline notice-warning notice-alt' : '' ) . '">';
543
@@ -556,7 +575,7 @@ if ( ! class_exists( 'YIT_Upgrade' ) ) {
556
}
557
558
else {
559
- printf( __( 'There is a new version of %1$s available. <a href="%2$s" class="thickbox yit-changelog-button open-plugin-details-modal" title="%3$s">View version %4$s details</a> or <a href="%5$s">update now</a>.', 'yith-plugin-fw' ), $this->_plugins[ $init ]['info']['Name'], esc_url( $details_url ), esc_attr( $this->_plugins[ $init ]['info']['Name'] ), $r->new_version, wp_nonce_url( self_admin_url( 'update.php?action=upgrade-plugin&plugin=' ) . $init, 'upgrade-plugin_' . $init ) );
560
}
561
562
if( version_compare( $this->_plugins[ $init ]['info']['Version'] , $r->new_version, '>' ) ){
140
141
$error = false;
142
if ( ! is_wp_error( $remote_xml ) && isset( $remote_xml['response']['code'] ) && '200' == $remote_xml['response']['code'] ) {
143
+ $plugin_remote_info = function_exists( 'simplexml_load_string' ) ? @simplexml_load_string( $remote_xml['body'] ) : false;
144
if ( $plugin_remote_info ) {
145
$info['Latest'] = (string) $plugin_remote_info->latest;
146
$info['changelog'] = (string) $plugin_remote_info->changelog;
198
'unavailable' => __( 'Automatic update is unavailable for this plugin,', 'yith-plugin-fw' ),
199
'activate' => __( 'please <a href="%activate_link%">activate</a> your copy of %plugin_name%.', 'yith-plugin-fw' ),
200
'update_now' => __( 'Update now.', 'yith-plugin-fw' ),
201
+ 'version_issue' => __( '<br/><b>Please note:</b> You are using a higher version than the latest available one. </em>Please, make sure you\'ve downloaded the latest version of <em>%plugin_name%</em> from the only <a href="https://yithemes.com" target="_blank">YITH official website</a>, specifically, from your <a href="https://yithemes.com/my-account/recent-downloads/" target="_blank">Downloads page</a>. This is the only way to be sure the version you are using is 100% malware-free.', 'yith-plugin-fw' ),
202
);
203
204
foreach ( $this->_plugins as $init => $info ) {
214
'details_url' => $details_url,
215
'strings' => $strings,
216
);
217
+ $suffix = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min';
218
219
if( defined( 'YIT_CORE_PLUGIN_URL' ) ){
220
yit_enqueue_script( 'yit-multisite-updater', YIT_CORE_PLUGIN_URL . '/assets/js/multisite-updater' . $suffix . '.js', array( 'jquery' ), false, true );
226
public function admin_enqueue_scripts() {
227
global $pagenow;
228
if ( 'plugins.php' === $pagenow && defined( 'YIT_CORE_PLUGIN_URL' ) ) {
229
+ $suffix = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min';
230
wp_enqueue_style( 'yit-upgrader', YIT_CORE_PLUGIN_URL . '/assets/css/yit-upgrader.css' );
231
+ wp_enqueue_script( 'yith-update-plugins', YIT_CORE_PLUGIN_URL . '/assets/js/yith-update-plugins' . $suffix . '.js', array( 'jquery' ), false, true );
232
+
233
+ $update_plugins_localized = array(
234
+ 'ajax_nonce' => wp_create_nonce( 'updates' ),
235
+ 'ajaxurl' => admin_url( 'admin-ajax.php', 'relative' ),
236
+ 'l10n' => array(
237
+ /* translators: %s: Plugin name and version */
238
+ 'updating' => _x( 'Updating %s...', 'plugin-fw', 'yith-plugin-fw' ), // No ellipsis.
239
+ /* translators: %s: Plugin name and version */
240
+ 'updated' => _x( '%s updated!', 'plugin-fw', 'yith-plugin-fw' ),
241
+ /* translators: %s: Plugin name and version */
242
+ 'failed' => _x( '%s update failed', 'plugin-fw', 'yith-plugin-fw' ),
243
+ ),
244
+ );
245
+
246
+ wp_localize_script( 'yith-update-plugins', 'yith_plugin_fw', $update_plugins_localized );
247
}
248
}
249
471
472
if ( ! is_wp_error( $remote_xml ) && isset( $remote_xml['response']['code'] ) && '200' == $remote_xml['response']['code'] ) {
473
474
+ $plugin_remote_info = function_exists( 'simplexml_load_string' ) ? @simplexml_load_string( $remote_xml['body'] ) : false;
475
476
if ( $plugin_remote_info ) {
477
$wrong_current_version_check = version_compare( $plugin['info']['Version'], $plugin_remote_info->latest, '>' );
531
*/
532
public function plugin_update_row() {
533
534
+ $current = get_site_transient( 'update_plugins' );
535
+ $init = str_replace( 'after_plugin_row_', '', current_filter() );
536
+ $update_now_class = apply_filters( 'yith_plugin_fw_update_now_class', '' );
537
+ $update_now_class = trim( $update_now_class . ' yith-update-link update-link' );
538
539
if ( ! isset( $current->response[ $init ] ) ) {
540
return false;
556
global $wp_version;
557
$is_wp_4_6 = version_compare( $wp_version, '4.6', '>=' );
558
559
+ echo '<tr class="plugin-update-tr' . ( is_plugin_active( $init ) ? ' active' : '' ) . '"><td colspan="' . $wp_list_table->get_column_count() . '" class="plugin-update colspanchange">';
560
561
echo '<div class="update-message' . ( $is_wp_4_6 ? ' notice inline notice-warning notice-alt' : '' ) . '">';
562
575
}
576
577
else {
578
+ printf( __( 'There is a new version of %1$s available. <a href="%2$s" class="thickbox yit-changelog-button open-plugin-details-modal" title="%3$s">View version %4$s details</a> or <a href="%5$s" class="%6$s" data-plugin="%7$s" data-slug="%8$s" data-name="%1$s">update now</a>.', 'yith-plugin-fw' ), $this->_plugins[ $init ]['info']['Name'], esc_url( $details_url ), esc_attr( $this->_plugins[ $init ]['info']['Name'] ), $r->new_version, wp_nonce_url( self_admin_url( 'update.php?action=upgrade-plugin&plugin=' ) . $init, 'upgrade-plugin_' . $init ), $update_now_class, $init, $this->_plugins[ $init ]['slug'] );
579
}
580
581
if( version_compare( $this->_plugins[ $init ]['info']['Version'] , $r->new_version, '>' ) ){
plugin-fw/lib/yith-dashboard.php CHANGED
@@ -26,7 +26,7 @@ if( ! class_exists( 'YITH_Dashboard' ) ){
26
* @access protected
27
* @since 1.0.0
28
*/
29
- static protected $_products_feed = 'https://yithemes.com/feed/?post_type=product';
30
static protected $_blog_feed = 'https://yithemes.com/feed/';
31
32
/**
@@ -37,8 +37,8 @@ if( ! class_exists( 'YITH_Dashboard' ) ){
37
* @access public
38
*/
39
public static function dashboard_widget_setup() {
40
- wp_add_dashboard_widget( 'yith_dashboard_products_news', __( 'New YITH products' , 'yith-plugin-fw' ), 'YITH_Dashboard::dashboard_products_news' );
41
- wp_add_dashboard_widget( 'yith_dashboard_blog_news', __( 'News from the YITH Blog' , 'yith-plugin-fw' ), 'YITH_Dashboard::dashboard_blog_news' );
42
}
43
44
@@ -50,10 +50,67 @@ if( ! class_exists( 'YITH_Dashboard' ) ){
50
* @access public
51
*/
52
public static function dashboard_products_news() {
53
- $args = array( 'show_author' => 0, 'show_date' => 1, 'show_summary' => 1, 'items'=> 3 );
54
- wp_widget_rss_output( static::$_products_feed, $args );
55
- }
56
57
58
/**
59
* Blog news Widget
@@ -64,11 +121,36 @@ if( ! class_exists( 'YITH_Dashboard' ) ){
64
*/
65
public static function dashboard_blog_news() {
66
$args = array( 'show_author' => 0, 'show_date' => 1, 'show_summary' => 1, 'items'=> 3 );
67
- wp_widget_rss_output( static::$_blog_feed, $args );
68
}
69
}
70
if( apply_filters( 'yith_plugin_fw_show_dashboard_widgets', true ) ){
71
add_action( 'wp_dashboard_setup', 'YITH_Dashboard::dashboard_widget_setup' );
72
}
73
}
74
26
* @access protected
27
* @since 1.0.0
28
*/
29
+ static protected $_products_feed = 'https://yithemes.com/latest-updates/feeds/';
30
static protected $_blog_feed = 'https://yithemes.com/feed/';
31
32
/**
37
* @access public
38
*/
39
public static function dashboard_widget_setup() {
40
+ wp_add_dashboard_widget( 'yith_dashboard_products_news', __( 'YITH Latest Updates' , 'yith-plugin-fw' ), 'YITH_Dashboard::dashboard_products_news' );
41
+ wp_add_dashboard_widget( 'yith_dashboard_blog_news', __( 'Latest news from YITH Blog' , 'yith-plugin-fw' ), 'YITH_Dashboard::dashboard_blog_news' );
42
}
43
44
50
* @access public
51
*/
52
public static function dashboard_products_news() {
53
+ $items = 10;
54
+ $rss = static::$_products_feed;
55
+ if ( is_string( $rss ) ) {
56
+ $rss = fetch_feed( $rss );
57
+ } elseif ( is_array( $rss ) && isset( $rss['url'] ) ) {
58
+ $rss = fetch_feed( $rss['url'] );
59
+ } elseif ( ! is_object( $rss ) ) {
60
+ return;
61
+ }
62
+
63
+ if ( is_wp_error( $rss ) ) {
64
+ if ( is_admin() || current_user_can( 'manage_options' ) ) {
65
+ echo '<p><strong>' . __( 'RSS Error:', 'yith-plugin-fw' ) . '</strong> ' . $rss->get_error_message() . '</p>';
66
+ }
67
+ return;
68
+ }
69
+
70
+ if ( ! $rss->get_item_quantity() ) {
71
+ echo '<ul><li>' . __( 'An error has occurred, which probably means the feed is down. Try again later.', 'yith-plugin-fw' ) . '</li></ul>';
72
+ $rss->__destruct();
73
+ unset( $rss );
74
+ return;
75
+ }
76
+
77
+ $last_updates = $rss->get_items( 0, $items );
78
+ $html_classes = 'rsswidget yith-update-feeds';
79
+ $output = '';
80
+
81
+ if( count( $last_updates ) > 0 ){
82
+ $output = '<ul class="yith-update-feeds">';
83
+ }
84
+
85
+ foreach ( $last_updates as $last_update ) {
86
+ /**
87
+ * @var $last_update \SimplePie_Item
88
+ */
89
+ $output .= '<li class="yith-update-feed">';
90
+ $date = $last_update->get_date( 'U' );
91
+ $date_i18n = ! empty( $date ) ? date_i18n( get_option( 'date_format' ), $date ) : '';
92
+ $html_date = ! empty( $date_i18n ) ? ' <span class="rss-date">' . date_i18n( get_option( 'date_format' ), $date ) . '</span>' : '';
93
+ $output .= sprintf( '<a target="_blank" href="%s" class="%s">%s</a> %s', $last_update->get_permalink(), $html_classes, $last_update->get_title(), $html_date );
94
+ $changelog = $last_update->get_description();
95
+
96
+ if( ! empty( $changelog ) ){
97
+ //add_thickbox();
98
+ $output .= ' - ';
99
+ $output .= sprintf( '<a class="yith-last-changelog" href="#" data-changelogid="%s" data-plugininfo="%s">%s</a>', $last_update->get_id( true ), $last_update->get_title(), _x( 'View Changelog', 'Plugin FW', 'yith-plugin-fw' ) );
100
+ $output .= sprintf( '<div style="display: none;" id="%s"><div style="display: table;"><img class="yith-feeds-logo" src="%s" /><h3 class="yith-feeds-plugin-name"><span style="font-weight: normal;">%s</span> %s</h3></div><p>%s</p></div>', $last_update->get_id( true ), yith_plugin_fw_get_default_logo(), _x( 'Latest update released on', 'Plugin FW', 'yith-plugin-fw' ), $date_i18n, $changelog );
101
+ }
102
+
103
+ $output .= '</li>';
104
+ }
105
+
106
+ if( ! empty( $output ) ){
107
+ $output .= '</ul>';
108
+ }
109
110
+ echo $output;
111
+ $rss->__destruct();
112
+ unset( $rss );
113
+ }
114
115
/**
116
* Blog news Widget
121
*/
122
public static function dashboard_blog_news() {
123
$args = array( 'show_author' => 0, 'show_date' => 1, 'show_summary' => 1, 'items'=> 3 );
124
+ $feed = static::$_blog_feed;
125
+ wp_widget_rss_output( $feed, $args );
126
+ }
127
+
128
+ /**
129
+ * Enqueue Styles and Scripts for View Last Changelog widget
130
+ *
131
+ * @return void
132
+ * @since 1.0.0
133
+ * @access public
134
+ */
135
+ public static function enqueue_scripts(){
136
+ if( function_exists( 'get_current_screen' ) && 'dashboard' == get_current_screen()->id ){
137
+ $script_path = defined( 'YIT_CORE_PLUGIN_URL' ) ? YIT_CORE_PLUGIN_URL : get_template_directory_uri() . '/core/plugin-fw';
138
+ $suffix = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min';
139
+ wp_enqueue_script( 'yith-dashboard', $script_path . '/assets/js/yith-dashboard' . $suffix . '.js', array( 'jquery-ui-dialog' ), '1.0.0', true );
140
+ wp_enqueue_style( 'wp-jquery-ui-dialog' );
141
+ $l10n = array(
142
+ 'buttons' => array(
143
+ 'close' => _x( 'Close', 'Button label', 'yith-plugin-fw' )
144
+ )
145
+ );
146
+ wp_localize_script( 'yith-dashboard', 'yith_dashboard', $l10n );
147
+ }
148
}
149
}
150
+
151
if( apply_filters( 'yith_plugin_fw_show_dashboard_widgets', true ) ){
152
add_action( 'wp_dashboard_setup', 'YITH_Dashboard::dashboard_widget_setup' );
153
+ add_action( 'admin_enqueue_scripts', 'YITH_Dashboard::enqueue_scripts', 20 );
154
}
155
}
156
plugin-fw/licence/assets/js/yit-licence.js CHANGED
@@ -69,7 +69,7 @@
69
if ( false === error ) {
70
jQuery.ajax( {
71
type : 'POST',
72
- url : ajaxurl,
73
data : data,
74
success: function ( response ) {
75
69
if ( false === error ) {
70
jQuery.ajax( {
71
type : 'POST',
72
+ url : typeof ajaxurl != 'undefined' ? ajaxurl : yith_ajax.url,
73
data : data,
74
success: function ( response ) {
75
plugin-fw/licence/assets/js/yit-licence.min.js CHANGED
@@ -1 +1,8 @@
1
- !function(e){var a=function(){var i=e(".licence-activation"),s=e(".licence-check"),d=e(".licence-deactive");i.on("click",function(i,s){i.preventDefault();var d,c=e(this),r=c.data("formid"),l=e("#"+r),u=l.serialize(),F=e(l).find(".message"),t=e(l).find(".message-wrapper"),n=l.find(".user-email"),o=l.find(".licence-key"),p=l.find(".user-email").val(),v=l.find(".licence-key").val(),C=!1,x=new Array,m=l.find(".product-row"),D=e(".licence-activation"),f=e("#products-to-active").find(".spinner");if(F.empty(),t.removeClass("visible"),n.removeClass("require"),o.removeClass("require"),m.removeClass("error"),f.addClass("show"),c.add(D).prop("disabled",!0).addClass("clicked"),""!==p&&(d=p,new RegExp(/^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?#x2F;i).test(d))||(C=!0,n.addClass("require"),x[x.length]=licence_message.email),""===v&&(C=!0,x[x.length]=licence_message.license_key,o.addClass("require")),!1===C)jQuery.ajax({type:"POST",url:ajaxurl,data:u,success:function(i){f.removeClass("show"),c.add(D).prop("disabled",!1).removeClass("clicked"),!0===i.activated?(e(".product-licence-activation").empty().replaceWith(i.template),a()):!1!==i&&void 0!==i.error?(F.text(i.error),t.addClass("visible"),m.addClass("error")):(F.text(licence_message.server),t.addClass("visible"),m.addClass("error")),void 0!==i.debug&&console.log(i.debug)}});else{if(1==x.length)F.text(licence_message.error.replace("%field%",x[0])),t.addClass("visible"),m.addClass("error");else{for(var h=licence_message.errors,b=0;b<x.length;b++)h=h.replace("%field_"+(b+1)+"%",x[b]),t.addClass("visible");F.text(h),t.addClass("visible"),m.addClass("error")}f.removeClass("show"),c.add(D).prop("disabled",!1).removeClass("clicked")}}),s.on("click",function(i){i.preventDefault();var s=e(this),d=e("#licence-check-update"),c=d.serialize();s.prop("disabled",!0).addClass("clicked"),d.find("div.spinner").addClass("show"),jQuery.ajax({type:"POST",url:ajaxurl,data:c,success:function(i){e(".product-licence-activation").empty().replaceWith(i.template),a()}})}),d.on("click",function(i){if(i.preventDefault(),1==(1==script_info.is_debug||confirm(licence_message.are_you_sure))){var s=e(this),d=s.data("licence-key"),c=s.data("licence-email"),r=s.data("product-init"),l=s.data("action"),u=e(".licence-renew"),F=e(".licence-deactive"),t=e("#yith-licence-notice"),n=e(".activated-table");s.add(u).add(F).prop("disabled",!0).addClass("clicked"),e("#activated-products").find(".spinner").addClass("show"),jQuery.ajax({type:"POST",url:ajaxurl,data:{action:l,licence_key:d,email:c,product_init:r},success:function(i){t.css("maxWidth",n.width()),0==i?(t.find("p.yith-licence-notice-message").html(licence_message.server),t.removeClass("notice-success").addClass("notice-error visible"),s.add(u).add(F).add(u).prop("disabled",!1).removeClass("clicked"),e("#activated-products").find(".spinner").removeClass("show")):(0==i.activated&&(e(".product-licence-activation").empty().replaceWith(i.template),a()),void 0!==i.error&&(t.find("p.yith-licence-notice-message").html(i.error),t.removeClass("notice-success").addClass("notice-error visible"),s.add(u).add(F).add(u).prop("disabled",!1).removeClass("clicked"),e("#activated-products").find(".spinner").removeClass("show")))}})}})};a(),e("body").on("click",".yit-changelog-button",function(a){e("#TB_window").remove()})}(jQuery);
1
+ (function(b){var t=function(c){c.on("click",function(k,e){k.preventDefault();var c=b(this),a=c.data("formid"),d=b("#"+a),f=d.serialize(),h=b(d).find(".message"),g=b(d).find(".message-wrapper"),l=d.find(".user-email"),u=d.find(".licence-key"),v=d.find(".user-email").val(),t=d.find(".licence-key").val(),n=!1;a=[];var p=d.find(".product-row"),q=b(".licence-activation"),r=b("#products-to-active").find(".spinner");h.empty();g.removeClass("visible");l.removeClass("require");u.removeClass("require");p.removeClass("error");
2
+ r.addClass("show");c.add(q).prop("disabled",!0).addClass("clicked");""!==v&&(new RegExp(/^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?#x2F;i)).test(v)||
3
+ (n=!0,l.addClass("require"),a[a.length]=licence_message.email);""===t&&(n=!0,a[a.length]=licence_message.license_key,u.addClass("require"));if(!1===n)jQuery.ajax({type:"POST",url:"undefined"!=typeof ajaxurl?ajaxurl:yith_ajax.url,data:f,success:function(a){r.removeClass("show");c.add(q).prop("disabled",!1).removeClass("clicked");!0===a.activated?(b(".product-licence-activation").empty().replaceWith(a.template),m()):(!1!==a&&"undefined"!==typeof a.error?h.text(a.error):h.text(licence_message.server),
4
+ g.addClass("visible"),p.addClass("error"));"undefined"!==typeof a.debug&&console.log(a.debug)}});else{if(1==a.length)h.text(licence_message.error.replace("%field%",a[0]));else{d=licence_message.errors;for(f=0;f<a.length;f++)d=d.replace("%field_"+(f+1)+"%",a[f]),g.addClass("visible");h.text(d)}g.addClass("visible");p.addClass("error");r.removeClass("show");c.add(q).prop("disabled",!1).removeClass("clicked")}})},w=function(c){c.on("click",function(c){c.preventDefault();c=b(this);var e=b("#licence-check-update"),
5
+ k=e.serialize();c.prop("disabled",!0).addClass("clicked");e.find("div.spinner").addClass("show");jQuery.ajax({type:"POST",url:ajaxurl,data:k,success:function(a){b(".product-licence-activation").empty().replaceWith(a.template);m()}})})},x=function(c){c.on("click",function(c){c.preventDefault();if(1==(1==script_info.is_debug?!0:confirm(licence_message.are_you_sure))){var e=b(this);c=e.data("licence-key");var k=e.data("licence-email"),a=e.data("product-init"),d=e.data("action"),f=b(".licence-renew"),
6
+ h=b(".licence-deactive"),g=b("#yith-licence-notice"),l=b(".activated-table");e.add(f).add(h).prop("disabled",!0).addClass("clicked");b("#activated-products").find(".spinner").addClass("show");jQuery.ajax({type:"POST",url:ajaxurl,data:{action:d,licence_key:c,email:k,product_init:a},success:function(a){g.css("maxWidth",l.width());0==a?(g.find("p.yith-licence-notice-message").html(licence_message.server),g.removeClass("notice-success").addClass("notice-error visible"),e.add(f).add(h).add(f).prop("disabled",
7
+ !1).removeClass("clicked"),b("#activated-products").find(".spinner").removeClass("show")):(0==a.activated&&(b(".product-licence-activation").empty().replaceWith(a.template),m()),"undefined"!=typeof a.error&&(g.find("p.yith-licence-notice-message").html(a.error),g.removeClass("notice-success").addClass("notice-error visible"),e.add(f).add(h).add(f).prop("disabled",!1).removeClass("clicked"),b("#activated-products").find(".spinner").removeClass("show")))}})}})},m=function(){var c=b(".licence-activation"),
8
+ k=b(".licence-check"),e=b(".licence-deactive");t(c);w(k);x(e)};m();b("body").on("click",".yit-changelog-button",function(c){b("#TB_window").remove()})})(jQuery);
plugin-fw/licence/lib/yit-licence.php CHANGED
@@ -191,6 +191,11 @@ if ( !class_exists( 'YIT_Licence' ) ) {
191
)
192
);
193
194
/* Enqueue Scripts only in Licence Activation page of plugins and themes */
195
if ( strpos( get_current_screen()->id, 'yith_plugins_activation' ) !== false || strpos( get_current_screen()->id, 'yit_panel_license' ) !== false ) {
196
wp_enqueue_script( 'yit-licence' );
191
)
192
);
193
194
+ wp_localize_script( 'yit-licence', 'yith_ajax', array(
195
+ 'url' => admin_url( 'admin-ajax.php', 'relative' )
196
+ )
197
+ );
198
+
199
/* Enqueue Scripts only in Licence Activation page of plugins and themes */
200
if ( strpos( get_current_screen()->id, 'yith_plugins_activation' ) !== false || strpos( get_current_screen()->id, 'yit_panel_license' ) !== false ) {
201
wp_enqueue_script( 'yit-licence' );
plugin-fw/templates/fields/custom.php ADDED
@@ -0,0 +1,16 @@
1
+ <?php
2
+ /**
3
+ * This file belongs to the YIT Plugin Framework.
4
+ * This source file is subject to the GNU GENERAL PUBLIC LICENSE (GPL 3.0)
5
+ * that is bundled with this package in the file LICENSE.txt.
6
+ * It is also available through the world-wide-web at this URL:
7
+ * http://www.gnu.org/licenses/gpl-3.0.txt
8
+ *
9
+ * @var array $field
10
+ */
11
+
12
+ !defined( 'ABSPATH' ) && exit; // Exit if accessed directly
13
+
14
+ if ( isset( $field[ 'action' ] ) ) {
15
+ do_action( $field[ 'action' ], $field );
16
+ }
readme.txt CHANGED
@@ -3,8 +3,8 @@
3
Contributors: yithemes
4
Tags: woocommerce catalog mode plugin, woocommerce catalog only, woocommerce, products, themes, yit, yith, yithemes, e-commerce, shop, catalog mode, catalogue mode, remove add to cart, ask for price, ask price, asking for price, asking price, button remove, call, call for price, call me, call us, contact, email, hide add to cart, hide price
5
Requires at least: 4.0
6
- Tested up to: 5.0
7
- Stable tag: 1.6.5
8
License: GPLv2 or later
9
License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
@@ -113,6 +113,11 @@ yith-woocommerce-catalog-mode-<WORDPRESS LOCALE >.mo
113
114
== Changelog ==
115
116
= Version 1.6.5 - Released: Feb 07, 2019 =
117
118
* Update: plugin framework
@@ -272,7 +277,7 @@ yith-woocommerce-catalog-mode-<WORDPRESS LOCALE >.mo
272
273
== Upgrade Notice ==
274
275
- Last Stable Tag 1.6.5
276
277
== Suggestions ==
278
3
Contributors: yithemes
4
Tags: woocommerce catalog mode plugin, woocommerce catalog only, woocommerce, products, themes, yit, yith, yithemes, e-commerce, shop, catalog mode, catalogue mode, remove add to cart, ask for price, ask price, asking for price, asking price, button remove, call, call for price, call me, call us, contact, email, hide add to cart, hide price
5
Requires at least: 4.0
6
+ Tested up to: 5.1
7
+ Stable tag: 1.6.6
8
License: GPLv2 or later
9
License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
113
114
== Changelog ==
115
116
+ = Version 1.6.6 - Released: Apr 15, 2019 =
117
+
118
+ * New: Support to WooCommerce 3.6.0 RC2
119
+ * Update: plugin framework
120
+
121
= Version 1.6.5 - Released: Feb 07, 2019 =
122
123
* Update: plugin framework
277
278
== Upgrade Notice ==
279
280
+ Last Stable Tag 1.6.6
281
282
== Suggestions ==
283
wpml-config.xml DELETED
@@ -1,7 +0,0 @@
1
- <?xml version="1.0"?>
2
- <wpml-config>
3
- <admin-texts>
4
- <key name="ywctm_exclude_price_alternative_text"/>
5
- <key name="ywctm_button_text"/>
6
- </admin-texts>
7
- </wpml-config>