updated plugin GP Premium version 1.12.3

This commit is contained in:
KawaiiPunk 2020-12-25 19:23:12 +00:00 committed by Gitium
parent 8ded57667b
commit 4d2ff3db4a
5 changed files with 11 additions and 8 deletions

View File

@ -3,7 +3,7 @@
* Plugin Name: GP Premium * Plugin Name: GP Premium
* Plugin URI: https://generatepress.com * Plugin URI: https://generatepress.com
* Description: The entire collection of GeneratePress premium modules. * Description: The entire collection of GeneratePress premium modules.
* Version: 1.12.2 * Version: 1.12.3
* Author: Tom Usborne * Author: Tom Usborne
* Author URI: https://generatepress.com * Author URI: https://generatepress.com
* License: GNU General Public License v2 or later * License: GNU General Public License v2 or later
@ -17,7 +17,7 @@ if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly. exit; // Exit if accessed directly.
} }
define( 'GP_PREMIUM_VERSION', '1.12.2' ); define( 'GP_PREMIUM_VERSION', '1.12.3' );
define( 'GP_PREMIUM_DIR_PATH', plugin_dir_path( __FILE__ ) ); define( 'GP_PREMIUM_DIR_PATH', plugin_dir_path( __FILE__ ) );
define( 'GP_LIBRARY_DIRECTORY', plugin_dir_path( __FILE__ ) . 'library/' ); define( 'GP_LIBRARY_DIRECTORY', plugin_dir_path( __FILE__ ) . 'library/' );
define( 'GP_LIBRARY_DIRECTORY_URL', plugin_dir_url( __FILE__ ) . 'library/' ); define( 'GP_LIBRARY_DIRECTORY_URL', plugin_dir_url( __FILE__ ) . 'library/' );

View File

@ -16,7 +16,7 @@ jQuery(document).ready(function($) {
} }
} ); } );
$( '#_meta-generate-page-header-content' ).bind( 'input change', function() { $( '#_meta-generate-page-header-content' ).on( 'input change', function() {
if ( this.value.length ) { if ( this.value.length ) {
$( '.page-header-content-required' ).hide(); $( '.page-header-content-required' ).hide();
} else { } else {

View File

@ -3,9 +3,9 @@ Contributors: edge22
Donate link: https://generatepress.com Donate link: https://generatepress.com
Tags: generatepress Tags: generatepress
Requires at least: 4.5 Requires at least: 4.5
Tested up to: 5.5 Tested up to: 5.6
Requires PHP: 5.6 Requires PHP: 5.6
Stable tag: 1.12.2 Stable tag: 1.12.3
License: GPLv2 or later License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html License URI: http://www.gnu.org/licenses/gpl-2.0.html
@ -27,6 +27,9 @@ In most cases, #1 will work fine and is way easier.
== Changelog == == Changelog ==
= 1.12.3 =
* WooCommerce: Fix quantity buttons in WP 5.6
= 1.12.2 = = 1.12.2 =
* Blog: Load columns CSS when using filter to enable it anywhere * Blog: Load columns CSS when using filter to enable it anywhere
* Menu Plus: Fix sticky mobile header jump when using inline mobile toggle * Menu Plus: Fix sticky mobile header jump when using inline mobile toggle

View File

@ -157,7 +157,7 @@ jQuery( document ).ready( function( $ ) {
} ); } );
} }
$( document ).on( 'ready', function() { $( function() {
"use strict"; "use strict";
if ( generateWooCommerce.quantityButtons ) { if ( generateWooCommerce.quantityButtons ) {
@ -212,7 +212,7 @@ jQuery( document ).ready( function( $ ) {
} ); } );
} }
$( '.plus, .minus' ).unbind( 'click' ); $( '.plus, .minus' ).off( 'click' );
$( '.plus, .minus' ).on( 'click', function() { $( '.plus, .minus' ).on( 'click', function() {
// Quantity // Quantity

View File

@ -1 +1 @@
jQuery(document).ready(function(c){function t(s,o,n){var r,i;return o=o||250,function(){var t=n||this,a=+new Date,e=arguments;r&&a<r+o?(clearTimeout(i),i=setTimeout(function(){r=a,s.apply(t,e)},o)):(r=a,s.apply(t,e))}}var m;function a(){var t,n=c(".woocommerce div.product form.cart");n.closest(".elementor-add-to-cart").length?c(".elementor.product").removeClass("do-quantity-buttons"):(t=c(".cart div.quantity:not(.buttons-added), .cart td.quantity:not(.buttons-added)").find(".qty"))&&c.each(t,function(t,a){var e,s=c(a);"date"!==s.prop("type")&&"hidden"!==s.prop("type")&&(s.parent().addClass("buttons-added").prepend('<a href="javascript:void(0)" class="minus">-</a>'),s.after('<a href="javascript:void(0)" class="plus">+</a>'),c("input.qty:not(.product-quantity input.qty)").each(function(){var t=parseFloat(c(this).attr("min"));t&&0<t&&parseFloat(c(this).val())<t&&c(this).val(t)}),c("body").hasClass("single-product")&&!n.hasClass("grouped_form")&&(e=c(".woocommerce form input[type=number].qty")).on("keyup",function(){var t=c(this).val();e.val(t)}),c(".plus, .minus").unbind("click"),c(".plus, .minus").on("click",function(){var t=!c("body").hasClass("single-product")||n.hasClass("grouped_form")||n.hasClass("cart_group")?c(this).closest(".quantity").find(".qty"):c(".plus, .minus").closest(".quantity").find(".qty"),a=parseFloat(t.val()),e=parseFloat(t.attr("max")),s=parseFloat(t.attr("min")),o=t.attr("step");a&&""!==a&&"NaN"!==a||(a=0),""!==e&&"NaN"!==e||(e=""),""!==s&&"NaN"!==s||(s=0),"any"!==o&&""!==o&&void 0!==o&&"NaN"!==parseFloat(o)||(o=1),c(this).is(".plus")?e&&(e==a||e<a)?t.val(e):t.val(a+parseFloat(o)):s&&(s==a||a<s)?t.val(s):0<a&&t.val(a-parseFloat(o)),t.trigger("change")}))})}c("body").on("added_to_cart",function(){c(".wc-menu-item").hasClass("has-items")||c(".wc-menu-item").addClass("has-items"),c(".wc-mobile-cart-items").hasClass("has-items")||c(".wc-mobile-cart-items").addClass("has-items")}),c("body").on("removed_from_cart",function(){var t=c(".number-of-items");t.length&&t.hasClass("no-items")&&(c(".wc-menu-item").removeClass("has-items"),c(".wc-mobile-cart-items").removeClass("has-items"))}),generateWooCommerce.addToCartPanel&&(c(document.body).on("added_to_cart",function(){var t=c("#wpadminbar"),a=c(".navigation-stick"),e=0;t.length&&(e=t.outerHeight()),a.length&&"0px"===a.css("top")&&(e+=a.outerHeight()),c(".add-to-cart-panel").addClass("item-added").css({"-webkit-transform":"translateY("+e+"px)","-ms-transform":"translateY("+e+"px)",transform:"translateY("+e+"px)"})}),c(".add-to-cart-panel .continue-shopping").on("click",function(t){t.preventDefault(),c(".add-to-cart-panel").removeClass("item-added").css({"-webkit-transform":"translateY(-100%)","-ms-transform":"translateY(-100%)",transform:"translateY(-100%)"})}),c(window).on("scroll",t(function(){var t=c(".add-to-cart-panel");t.hasClass("item-added")&&t.removeClass("item-added").css({"-webkit-transform":"translateY(-100%)","-ms-transform":"translateY(-100%)",transform:"translateY(-100%)"})},250))),generateWooCommerce.stickyAddToCart&&(m=0,c(window).on("scroll",t(function(){var t=c("#wpadminbar"),a=c(".navigation-stick"),e=0,s=c(window).scrollTop(),o=c(".add-to-cart-panel"),n=o.offset().top+o.outerHeight(),r=c(".single_add_to_cart_button"),i=r.offset().top,l=r.outerHeight(),d=c(".site-footer").offset().top;t.length&&(e=t.outerHeight()),a.length&&(a.hasClass("auto-hide-sticky")?(s<m&&"0px"===a.css("top")&&(e+=a.outerHeight()),m=s):e+=a.outerHeight()),i+l<s&&n<d?o.addClass("show-sticky-add-to-cart").css({"-webkit-transform":"translateY("+e+"px)","-ms-transform":"translateY("+e+"px)",transform:"translateY("+e+"px)"}):o.removeClass("show-sticky-add-to-cart").css({"-webkit-transform":"","-ms-transform":"",transform:""})},250)),c(".go-to-variables").on("click",function(t){t.preventDefault();var a=0,e=c(".navigation-stick"),s=c("#wpadminbar");e.length&&(a=e.outerHeight()),s.length&&(a+=s.outerHeight()),c("html, body").animate({scrollTop:c(".variations").offset().top-a},250)})),c(document).on("ready",function(){"use strict";generateWooCommerce.quantityButtons&&a()}),c(document).ajaxComplete(function(){"use strict";generateWooCommerce.quantityButtons&&a()})}); jQuery(document).ready(function(d){function t(s,o,r){var n,i;return o=o||250,function(){var t=r||this,a=+new Date,e=arguments;n&&a<n+o?(clearTimeout(i),i=setTimeout(function(){n=a,s.apply(t,e)},o)):(n=a,s.apply(t,e))}}var m;function a(){var t,r=d(".woocommerce div.product form.cart");r.closest(".elementor-add-to-cart").length?d(".elementor.product").removeClass("do-quantity-buttons"):(t=d(".cart div.quantity:not(.buttons-added), .cart td.quantity:not(.buttons-added)").find(".qty"))&&d.each(t,function(t,a){var e,s=d(a);"date"!==s.prop("type")&&"hidden"!==s.prop("type")&&(s.parent().addClass("buttons-added").prepend('<a href="javascript:void(0)" class="minus">-</a>'),s.after('<a href="javascript:void(0)" class="plus">+</a>'),d("input.qty:not(.product-quantity input.qty)").each(function(){var t=parseFloat(d(this).attr("min"));t&&0<t&&parseFloat(d(this).val())<t&&d(this).val(t)}),d("body").hasClass("single-product")&&!r.hasClass("grouped_form")&&(e=d(".woocommerce form input[type=number].qty")).on("keyup",function(){var t=d(this).val();e.val(t)}),d(".plus, .minus").off("click"),d(".plus, .minus").on("click",function(){var t=!d("body").hasClass("single-product")||r.hasClass("grouped_form")||r.hasClass("cart_group")?d(this).closest(".quantity").find(".qty"):d(".plus, .minus").closest(".quantity").find(".qty"),a=parseFloat(t.val()),e=parseFloat(t.attr("max")),s=parseFloat(t.attr("min")),o=t.attr("step");a&&""!==a&&"NaN"!==a||(a=0),""!==e&&"NaN"!==e||(e=""),""!==s&&"NaN"!==s||(s=0),"any"!==o&&""!==o&&void 0!==o&&"NaN"!==parseFloat(o)||(o=1),d(this).is(".plus")?e&&(e==a||e<a)?t.val(e):t.val(a+parseFloat(o)):s&&(s==a||a<s)?t.val(s):0<a&&t.val(a-parseFloat(o)),t.trigger("change")}))})}d("body").on("added_to_cart",function(){d(".wc-menu-item").hasClass("has-items")||d(".wc-menu-item").addClass("has-items"),d(".wc-mobile-cart-items").hasClass("has-items")||d(".wc-mobile-cart-items").addClass("has-items")}),d("body").on("removed_from_cart",function(){var t=d(".number-of-items");t.length&&t.hasClass("no-items")&&(d(".wc-menu-item").removeClass("has-items"),d(".wc-mobile-cart-items").removeClass("has-items"))}),generateWooCommerce.addToCartPanel&&(d(document.body).on("added_to_cart",function(){var t=d("#wpadminbar"),a=d(".navigation-stick"),e=0;t.length&&(e=t.outerHeight()),a.length&&"0px"===a.css("top")&&(e+=a.outerHeight()),d(".add-to-cart-panel").addClass("item-added").css({"-webkit-transform":"translateY("+e+"px)","-ms-transform":"translateY("+e+"px)",transform:"translateY("+e+"px)"})}),d(".add-to-cart-panel .continue-shopping").on("click",function(t){t.preventDefault(),d(".add-to-cart-panel").removeClass("item-added").css({"-webkit-transform":"translateY(-100%)","-ms-transform":"translateY(-100%)",transform:"translateY(-100%)"})}),d(window).on("scroll",t(function(){var t=d(".add-to-cart-panel");t.hasClass("item-added")&&t.removeClass("item-added").css({"-webkit-transform":"translateY(-100%)","-ms-transform":"translateY(-100%)",transform:"translateY(-100%)"})},250))),generateWooCommerce.stickyAddToCart&&(m=0,d(window).on("scroll",t(function(){var t=d("#wpadminbar"),a=d(".navigation-stick"),e=0,s=d(window).scrollTop(),o=d(".add-to-cart-panel"),r=o.offset().top+o.outerHeight(),n=d(".single_add_to_cart_button"),i=n.offset().top,l=n.outerHeight(),c=d(".site-footer").offset().top;t.length&&(e=t.outerHeight()),a.length&&(a.hasClass("auto-hide-sticky")?(s<m&&"0px"===a.css("top")&&(e+=a.outerHeight()),m=s):e+=a.outerHeight()),i+l<s&&r<c?o.addClass("show-sticky-add-to-cart").css({"-webkit-transform":"translateY("+e+"px)","-ms-transform":"translateY("+e+"px)",transform:"translateY("+e+"px)"}):o.removeClass("show-sticky-add-to-cart").css({"-webkit-transform":"","-ms-transform":"",transform:""})},250)),d(".go-to-variables").on("click",function(t){t.preventDefault();var a=0,e=d(".navigation-stick"),s=d("#wpadminbar");e.length&&(a=e.outerHeight()),s.length&&(a+=s.outerHeight()),d("html, body").animate({scrollTop:d(".variations").offset().top-a},250)})),d(function(){"use strict";generateWooCommerce.quantityButtons&&a()}),d(document).ajaxComplete(function(){"use strict";generateWooCommerce.quantityButtons&&a()})});