updated plugin GP Premium version 1.11.2

This commit is contained in:
2020-08-13 14:53:39 +00:00
committed by Gitium
parent 3f0f8d3ac9
commit 885bbdd113
151 changed files with 11329 additions and 6954 deletions

View File

@ -144,8 +144,9 @@ generate_spacing_live_update( 'mobile_featured_image_padding_left', 'mobile_cont
* Main navigation spacing
*/
var menu_items = '.main-navigation .main-nav ul li a,\
.menu-toggle,\
.main-navigation .mobile-bar-items a';
.main-navigation .menu-toggle,\
.main-navigation .mobile-bar-items a,\
.main-navigation .menu-bar-item > a';
// Menu item width
generate_spacing_live_update( 'menu_item_padding_left', 'menu_item', menu_items + ', .slideout-navigation button.slideout-exit', 'padding-left', false, false, gp_spacing.desktop );
@ -156,8 +157,8 @@ generate_spacing_live_update( 'menu_item_padding_right', 'menu_item', menu_items
//generate_spacing_live_update( 'tablet_menu_item_padding_right', 'tablet_menu_item', menu_items, 'padding-right', false, false, gp_spacing.tablet );
// Mobile menu item width
generate_spacing_live_update( 'mobile_menu_item_padding_left', 'mobile_menu_item', '.menu-toggle,.main-navigation .mobile-bar-items a', 'padding-left', false, false, gp_spacing.mobile );
generate_spacing_live_update( 'mobile_menu_item_padding_right', 'mobile_menu_item', '.menu-toggle,.main-navigation .mobile-bar-items a', 'padding-right', false, false, gp_spacing.mobile );
generate_spacing_live_update( 'mobile_menu_item_padding_left', 'mobile_menu_item', '.main-navigation .menu-toggle,.main-navigation .mobile-bar-items a, .main-navigation .menu-bar-item > a', 'padding-left', false, false, gp_spacing.mobile );
generate_spacing_live_update( 'mobile_menu_item_padding_right', 'mobile_menu_item', '.main-navigation .menu-toggle,.main-navigation .mobile-bar-items a, .main-navigation .menu-bar-item > a', 'padding-right', false, false, gp_spacing.mobile );
// Menu item height
generate_spacing_live_update( 'menu_item_height', 'menu_item_height', menu_items, 'line-height', false, false, gp_spacing.desktop );
@ -389,61 +390,68 @@ wp.customize( 'generate_spacing_settings[right_sidebar_width]', function( value
var body = jQuery( 'body' );
if ( jQuery( '#right-sidebar' ).length ) {
if ( gp_spacing.isFlex ) {
var rightSidebar = jQuery( '#right-sidebar' );
// Left sidebar width
var left_sidebar = ( jQuery( '#left-sidebar' ).length ) ? wp.customize.value('generate_spacing_settings[left_sidebar_width]')() : 0;
if ( rightSidebar.length ) {
rightSidebar.css( 'width', newval + '%' );
}
} else {
// Left sidebar width
var left_sidebar = ( jQuery( '#left-sidebar' ).length ) ? wp.customize.value('generate_spacing_settings[left_sidebar_width]')() : 0;
// Right sidebar class
jQuery( "#right-sidebar" ).removeClass(function (index, css) {
return (css.match (/(^|\s)grid-\S+/g) || []).join(' ');
}).removeClass(function (index, css) {
return (css.match (/(^|\s)tablet-grid-\S+/g) || []).join(' ');
}).addClass( 'grid-' + newval ).addClass( 'tablet-grid-' + newval ).addClass( 'grid-parent' );
// Right sidebar class
jQuery( "#right-sidebar" ).removeClass(function (index, css) {
return (css.match (/(^|\s)grid-\S+/g) || []).join(' ');
}).removeClass(function (index, css) {
return (css.match (/(^|\s)tablet-grid-\S+/g) || []).join(' ');
}).addClass( 'grid-' + newval ).addClass( 'tablet-grid-' + newval ).addClass( 'grid-parent' );
// Content area class
jQuery( ".content-area" ).removeClass(function (index, css) {
return (css.match (/(^|\s)grid-\S+/g) || []).join(' ');
}).removeClass(function (index, css) {
return (css.match (/(^|\s)tablet-grid-\S+/g) || []).join(' ');
}).addClass( 'grid-' + ( 100 - newval - left_sidebar ) ).addClass( 'tablet-grid-' + ( 100 - newval - left_sidebar ) ).addClass( 'grid-parent' );
// Content area class
jQuery( ".content-area" ).removeClass(function (index, css) {
return (css.match (/(^|\s)grid-\S+/g) || []).join(' ');
}).removeClass(function (index, css) {
return (css.match (/(^|\s)tablet-grid-\S+/g) || []).join(' ');
}).addClass( 'grid-' + ( 100 - newval - left_sidebar ) ).addClass( 'tablet-grid-' + ( 100 - newval - left_sidebar ) ).addClass( 'grid-parent' );
if ( body.hasClass( 'both-sidebars' ) ) {
var content_width = ( 100 - newval - left_sidebar );
jQuery( '#left-sidebar' ).removeClass(function (index, css) {
return (css.match (/(^|\s)pull-\S+/g) || []).join(' ');
}).removeClass(function (index, css) {
return (css.match (/(^|\s)tablet-pull-\S+/g) || []).join(' ');
}).removeClass(function (index, css) {
return (css.match (/(^|\s)push-\S+/g) || []).join(' ');
}).removeClass(function (index, css) {
return (css.match (/(^|\s)tablet-push-\S+/g) || []).join(' ');
}).addClass( 'pull-' + ( content_width ) ).addClass( 'tablet-pull-' + ( content_width ) );
}
if ( body.hasClass( 'both-sidebars' ) ) {
var content_width = ( 100 - newval - left_sidebar );
jQuery( '#left-sidebar' ).removeClass(function (index, css) {
return (css.match (/(^|\s)pull-\S+/g) || []).join(' ');
}).removeClass(function (index, css) {
return (css.match (/(^|\s)tablet-pull-\S+/g) || []).join(' ');
}).removeClass(function (index, css) {
return (css.match (/(^|\s)push-\S+/g) || []).join(' ');
}).removeClass(function (index, css) {
return (css.match (/(^|\s)tablet-push-\S+/g) || []).join(' ');
}).addClass( 'pull-' + ( content_width ) ).addClass( 'tablet-pull-' + ( content_width ) );
}
if ( body.hasClass( 'both-left' ) ) {
var total_sidebar_width = ( parseInt( left_sidebar ) + parseInt( newval ) );
if ( body.hasClass( 'both-left' ) ) {
var total_sidebar_width = ( parseInt( left_sidebar ) + parseInt( newval ) );
jQuery( '#right-sidebar' ).removeClass(function (index, css) {
return (css.match (/(^|\s)pull-\S+/g) || []).join(' ');
}).removeClass(function (index, css) {
return (css.match (/(^|\s)tablet-pull-\S+/g) || []).join(' ');
}).addClass( 'pull-' + ( 100 - total_sidebar_width ) ).addClass( 'tablet-pull-' + ( 100 - total_sidebar_width ) );
jQuery( '#right-sidebar' ).removeClass(function (index, css) {
return (css.match (/(^|\s)pull-\S+/g) || []).join(' ');
}).removeClass(function (index, css) {
return (css.match (/(^|\s)tablet-pull-\S+/g) || []).join(' ');
}).addClass( 'pull-' + ( 100 - total_sidebar_width ) ).addClass( 'tablet-pull-' + ( 100 - total_sidebar_width ) );
jQuery( '#left-sidebar' ).removeClass(function (index, css) {
return (css.match (/(^|\s)pull-\S+/g) || []).join(' ');
}).removeClass(function (index, css) {
return (css.match (/(^|\s)tablet-pull-\S+/g) || []).join(' ');
}).addClass( 'pull-' + ( 100 - total_sidebar_width ) ).addClass( 'tablet-pull-' + ( 100 - total_sidebar_width ) );
jQuery( '#left-sidebar' ).removeClass(function (index, css) {
return (css.match (/(^|\s)pull-\S+/g) || []).join(' ');
}).removeClass(function (index, css) {
return (css.match (/(^|\s)tablet-pull-\S+/g) || []).join(' ');
}).addClass( 'pull-' + ( 100 - total_sidebar_width ) ).addClass( 'tablet-pull-' + ( 100 - total_sidebar_width ) );
jQuery( '.content-area' ).removeClass(function (index, css) {
return (css.match (/(^|\s)pull-\S+/g) || []).join(' ');
}).removeClass(function (index, css) {
return (css.match (/(^|\s)tablet-pull-\S+/g) || []).join(' ');
}).removeClass(function (index, css) {
return (css.match (/(^|\s)push-\S+/g) || []).join(' ');
}).removeClass(function (index, css) {
return (css.match (/(^|\s)tablet-push-\S+/g) || []).join(' ');
}).addClass( 'push-' + ( total_sidebar_width ) ).addClass( 'tablet-push-' + ( total_sidebar_width ) );
jQuery( '.content-area' ).removeClass(function (index, css) {
return (css.match (/(^|\s)pull-\S+/g) || []).join(' ');
}).removeClass(function (index, css) {
return (css.match (/(^|\s)tablet-pull-\S+/g) || []).join(' ');
}).removeClass(function (index, css) {
return (css.match (/(^|\s)push-\S+/g) || []).join(' ');
}).removeClass(function (index, css) {
return (css.match (/(^|\s)tablet-push-\S+/g) || []).join(' ');
}).addClass( 'push-' + ( total_sidebar_width ) ).addClass( 'tablet-push-' + ( total_sidebar_width ) );
}
}
jQuery('body').trigger('generate_spacing_updated');
}
@ -457,93 +465,101 @@ wp.customize( 'generate_spacing_settings[left_sidebar_width]', function( value )
value.bind( function( newval ) {
var body = jQuery( 'body' );
if ( jQuery( '#left-sidebar' ).length ) {
// Right sidebar width
var right_sidebar = ( jQuery( '#right-sidebar' ).length ) ? wp.customize.value('generate_spacing_settings[right_sidebar_width]')() : 0;
if ( gp_spacing.isFlex ) {
var leftSidebar = jQuery( '#left-sidebar' );
// Right sidebar class
jQuery( "#left-sidebar" ).removeClass(function (index, css) {
return (css.match (/(^|\s)grid-\S+/g) || []).join(' ');
}).removeClass(function (index, css) {
return (css.match (/(^|\s)tablet-grid-\S+/g) || []).join(' ');
}).addClass( 'grid-' + newval ).addClass( 'tablet-grid-' + newval ).addClass( 'grid-parent' );
if ( leftSidebar.length ) {
leftSidebar.css( 'width', newval + '%' );
}
} else {
// Right sidebar width
var right_sidebar = ( jQuery( '#right-sidebar' ).length ) ? wp.customize.value('generate_spacing_settings[right_sidebar_width]')() : 0;
// Content area class
jQuery( ".content-area" ).removeClass(function (index, css) {
return (css.match (/(^|\s)grid-\S+/g) || []).join(' ');
}).removeClass(function (index, css) {
return (css.match (/(^|\s)tablet-grid-\S+/g) || []).join(' ');
}).addClass( 'grid-' + ( 100 - newval - right_sidebar ) ).addClass( 'tablet-grid-' + ( 100 - newval - right_sidebar ) ).addClass( 'grid-parent' );
// Right sidebar class
jQuery( "#left-sidebar" ).removeClass(function (index, css) {
return (css.match (/(^|\s)grid-\S+/g) || []).join(' ');
}).removeClass(function (index, css) {
return (css.match (/(^|\s)tablet-grid-\S+/g) || []).join(' ');
}).addClass( 'grid-' + newval ).addClass( 'tablet-grid-' + newval ).addClass( 'grid-parent' );
if ( body.hasClass( 'left-sidebar' ) ) {
jQuery( '#left-sidebar' ).removeClass(function (index, css) {
return (css.match (/(^|\s)pull-\S+/g) || []).join(' ');
// Content area class
jQuery( ".content-area" ).removeClass(function (index, css) {
return (css.match (/(^|\s)grid-\S+/g) || []).join(' ');
}).removeClass(function (index, css) {
return (css.match (/(^|\s)tablet-pull-\S+/g) || []).join(' ');
}).removeClass(function (index, css) {
return (css.match (/(^|\s)push-\S+/g) || []).join(' ');
}).removeClass(function (index, css) {
return (css.match (/(^|\s)tablet-push-\S+/g) || []).join(' ');
}).addClass( 'pull-' + ( 100 - newval ) ).addClass( 'tablet-pull-' + ( 100 - newval ) );
return (css.match (/(^|\s)tablet-grid-\S+/g) || []).join(' ');
}).addClass( 'grid-' + ( 100 - newval - right_sidebar ) ).addClass( 'tablet-grid-' + ( 100 - newval - right_sidebar ) ).addClass( 'grid-parent' );
jQuery( '.content-area' ).removeClass(function (index, css) {
return (css.match (/(^|\s)pull-\S+/g) || []).join(' ');
}).removeClass(function (index, css) {
return (css.match (/(^|\s)tablet-pull-\S+/g) || []).join(' ');
}).removeClass(function (index, css) {
return (css.match (/(^|\s)push-\S+/g) || []).join(' ');
}).removeClass(function (index, css) {
return (css.match (/(^|\s)tablet-push-\S+/g) || []).join(' ');
}).addClass( 'push-' + newval ).addClass( 'tablet-push-' + newval ).addClass( 'grid-' + ( 100 - newval ) ).addClass( 'tablet-grid-' + ( 100 - newval ) );
}
if ( body.hasClass( 'left-sidebar' ) ) {
jQuery( '#left-sidebar' ).removeClass(function (index, css) {
return (css.match (/(^|\s)pull-\S+/g) || []).join(' ');
}).removeClass(function (index, css) {
return (css.match (/(^|\s)tablet-pull-\S+/g) || []).join(' ');
}).removeClass(function (index, css) {
return (css.match (/(^|\s)push-\S+/g) || []).join(' ');
}).removeClass(function (index, css) {
return (css.match (/(^|\s)tablet-push-\S+/g) || []).join(' ');
}).addClass( 'pull-' + ( 100 - newval ) ).addClass( 'tablet-pull-' + ( 100 - newval ) );
if ( body.hasClass( 'both-sidebars' ) ) {
var content_width = ( 100 - newval - right_sidebar );
jQuery( '#left-sidebar' ).removeClass(function (index, css) {
return (css.match (/(^|\s)pull-\S+/g) || []).join(' ');
}).removeClass(function (index, css) {
return (css.match (/(^|\s)tablet-pull-\S+/g) || []).join(' ');
}).removeClass(function (index, css) {
return (css.match (/(^|\s)push-\S+/g) || []).join(' ');
}).removeClass(function (index, css) {
return (css.match (/(^|\s)tablet-push-\S+/g) || []).join(' ');
}).addClass( 'pull-' + ( content_width ) ).addClass( 'tablet-pull-' + ( content_width ) );
jQuery( '.content-area' ).removeClass(function (index, css) {
return (css.match (/(^|\s)pull-\S+/g) || []).join(' ');
}).removeClass(function (index, css) {
return (css.match (/(^|\s)tablet-pull-\S+/g) || []).join(' ');
}).removeClass(function (index, css) {
return (css.match (/(^|\s)push-\S+/g) || []).join(' ');
}).removeClass(function (index, css) {
return (css.match (/(^|\s)tablet-push-\S+/g) || []).join(' ');
}).addClass( 'push-' + newval ).addClass( 'tablet-push-' + newval ).addClass( 'grid-' + ( 100 - newval ) ).addClass( 'tablet-grid-' + ( 100 - newval ) );
}
jQuery( '.content-area' ).removeClass(function (index, css) {
return (css.match (/(^|\s)pull-\S+/g) || []).join(' ');
}).removeClass(function (index, css) {
return (css.match (/(^|\s)tablet-pull-\S+/g) || []).join(' ');
}).removeClass(function (index, css) {
return (css.match (/(^|\s)push-\S+/g) || []).join(' ');
}).removeClass(function (index, css) {
return (css.match (/(^|\s)tablet-push-\S+/g) || []).join(' ');
}).addClass( 'push-' + ( newval ) ).addClass( 'tablet-push-' + ( newval ) );
}
if ( body.hasClass( 'both-sidebars' ) ) {
var content_width = ( 100 - newval - right_sidebar );
jQuery( '#left-sidebar' ).removeClass(function (index, css) {
return (css.match (/(^|\s)pull-\S+/g) || []).join(' ');
}).removeClass(function (index, css) {
return (css.match (/(^|\s)tablet-pull-\S+/g) || []).join(' ');
}).removeClass(function (index, css) {
return (css.match (/(^|\s)push-\S+/g) || []).join(' ');
}).removeClass(function (index, css) {
return (css.match (/(^|\s)tablet-push-\S+/g) || []).join(' ');
}).addClass( 'pull-' + ( content_width ) ).addClass( 'tablet-pull-' + ( content_width ) );
if ( body.hasClass( 'both-left' ) ) {
var content_width = ( 100 - newval - right_sidebar );
var total_sidebar_width = ( parseInt( right_sidebar ) + parseInt( newval ) );
jQuery( '.content-area' ).removeClass(function (index, css) {
return (css.match (/(^|\s)pull-\S+/g) || []).join(' ');
}).removeClass(function (index, css) {
return (css.match (/(^|\s)tablet-pull-\S+/g) || []).join(' ');
}).removeClass(function (index, css) {
return (css.match (/(^|\s)push-\S+/g) || []).join(' ');
}).removeClass(function (index, css) {
return (css.match (/(^|\s)tablet-push-\S+/g) || []).join(' ');
}).addClass( 'push-' + ( newval ) ).addClass( 'tablet-push-' + ( newval ) );
}
jQuery( '#right-sidebar' ).removeClass(function (index, css) {
return (css.match (/(^|\s)pull-\S+/g) || []).join(' ');
}).removeClass(function (index, css) {
return (css.match (/(^|\s)tablet-pull-\S+/g) || []).join(' ');
}).addClass( 'pull-' + ( 100 - total_sidebar_width ) ).addClass( 'tablet-pull-' + ( 100 - total_sidebar_width ) );
if ( body.hasClass( 'both-left' ) ) {
var content_width = ( 100 - newval - right_sidebar );
var total_sidebar_width = ( parseInt( right_sidebar ) + parseInt( newval ) );
jQuery( '#left-sidebar' ).removeClass(function (index, css) {
return (css.match (/(^|\s)pull-\S+/g) || []).join(' ');
}).removeClass(function (index, css) {
return (css.match (/(^|\s)tablet-pull-\S+/g) || []).join(' ');
}).addClass( 'pull-' + ( 100 - total_sidebar_width ) ).addClass( 'tablet-pull-' + ( 100 - total_sidebar_width ) );
jQuery( '#right-sidebar' ).removeClass(function (index, css) {
return (css.match (/(^|\s)pull-\S+/g) || []).join(' ');
}).removeClass(function (index, css) {
return (css.match (/(^|\s)tablet-pull-\S+/g) || []).join(' ');
}).addClass( 'pull-' + ( 100 - total_sidebar_width ) ).addClass( 'tablet-pull-' + ( 100 - total_sidebar_width ) );
jQuery( '.content-area' ).removeClass(function (index, css) {
return (css.match (/(^|\s)pull-\S+/g) || []).join(' ');
}).removeClass(function (index, css) {
return (css.match (/(^|\s)tablet-pull-\S+/g) || []).join(' ');
}).removeClass(function (index, css) {
return (css.match (/(^|\s)push-\S+/g) || []).join(' ');
}).removeClass(function (index, css) {
return (css.match (/(^|\s)tablet-push-\S+/g) || []).join(' ');
}).addClass( 'push-' + ( total_sidebar_width ) ).addClass( 'tablet-push-' + ( total_sidebar_width ) );
jQuery( '#left-sidebar' ).removeClass(function (index, css) {
return (css.match (/(^|\s)pull-\S+/g) || []).join(' ');
}).removeClass(function (index, css) {
return (css.match (/(^|\s)tablet-pull-\S+/g) || []).join(' ');
}).addClass( 'pull-' + ( 100 - total_sidebar_width ) ).addClass( 'tablet-pull-' + ( 100 - total_sidebar_width ) );
jQuery( '.content-area' ).removeClass(function (index, css) {
return (css.match (/(^|\s)pull-\S+/g) || []).join(' ');
}).removeClass(function (index, css) {
return (css.match (/(^|\s)tablet-pull-\S+/g) || []).join(' ');
}).removeClass(function (index, css) {
return (css.match (/(^|\s)push-\S+/g) || []).join(' ');
}).removeClass(function (index, css) {
return (css.match (/(^|\s)tablet-push-\S+/g) || []).join(' ');
}).addClass( 'push-' + ( total_sidebar_width ) ).addClass( 'tablet-push-' + ( total_sidebar_width ) );
}
}
jQuery('body').trigger('generate_spacing_updated');
}