diff --git a/wp-content/plugins/gp-premium/blog/functions/css/columns.css b/wp-content/plugins/gp-premium/blog/functions/css/columns.css index 969c8f4c..6931a338 100644 --- a/wp-content/plugins/gp-premium/blog/functions/css/columns.css +++ b/wp-content/plugins/gp-premium/blog/functions/css/columns.css @@ -127,7 +127,8 @@ margin-left: 0; margin-right: 0; } - .generate-columns-container > * { + .generate-columns-container > *, + .generate-columns-container .generate-columns { padding-left: 0; } .generate-columns-container .page-header { diff --git a/wp-content/plugins/gp-premium/blog/functions/css/columns.min.css b/wp-content/plugins/gp-premium/blog/functions/css/columns.min.css index c5e4ccba..3cf7ea34 100644 --- a/wp-content/plugins/gp-premium/blog/functions/css/columns.min.css +++ b/wp-content/plugins/gp-premium/blog/functions/css/columns.min.css @@ -1 +1 @@ -.masonry-enabled .page-header{position:relative!important}.separate-containers .site-main>.generate-columns-container{margin-bottom:0}.load-more.are-images-unloaded,.masonry-container.are-images-unloaded,.masonry-enabled #nav-below{opacity:0}.generate-columns-container:not(.masonry-container){display:flex;flex-flow:row wrap;align-items:stretch}.generate-columns-container:not(.masonry-container) .generate-columns{display:flex}.generate-columns .inside-article{width:100%;box-sizing:border-box}.generate-columns-activated.post-image-aligned-left .generate-columns-container article:not(.featured-column) .post-image,.generate-columns-activated.post-image-aligned-right .generate-columns-container article:not(.featured-column) .post-image{float:none;text-align:center;margin-left:0;margin-right:0}.generate-columns-container .page-header,.generate-columns-container .paging-navigation{flex:1 1 100%;clear:both}.generate-columns-container .paging-navigation{margin-bottom:0}.no-sidebar .generate-columns-container .inside-article>*{max-width:none}.load-more:not(.has-svg-icon) .button.loading:before{content:"\e900";display:inline-block;font-family:"GP Premium";font-style:normal;font-weight:400;font-variant:normal;text-transform:none;line-height:1;animation:spin 2s infinite linear;margin-right:7px}.load-more .button:not(.loading) .gp-icon{display:none}.load-more .gp-icon svg{animation:spin 2s infinite linear;margin-right:7px}@keyframes spin{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}.generate-columns{box-sizing:border-box}.generate-columns.grid-20,.grid-sizer.grid-20{width:20%}.generate-columns.grid-25,.grid-sizer.grid-25{width:25%}.generate-columns.grid-33,.grid-sizer.grid-33{width:33.3333%}.generate-columns.grid-50,.grid-sizer.grid-50{width:50%}.generate-columns.grid-60,.grid-sizer.grid-60{width:60%}.generate-columns.grid-66,.grid-sizer.grid-66{width:66.66667%}@media (min-width:768px) and (max-width:1024px){.generate-columns.tablet-grid-50,.grid-sizer.tablet-grid-50{width:50%}}@media (max-width:767px){.generate-columns-activated .generate-columns-container{margin-left:0;margin-right:0}.generate-columns-container>*{padding-left:0}.generate-columns-container .page-header{margin-left:0}.generate-columns.mobile-grid-100,.grid-sizer.mobile-grid-100{width:100%}.generate-columns-container>.paging-navigation{margin-left:0}}@media (max-width:768px){.load-more{display:block;text-align:center;margin-bottom:0}} \ No newline at end of file +.masonry-enabled .page-header{position:relative!important}.separate-containers .site-main>.generate-columns-container{margin-bottom:0}.load-more.are-images-unloaded,.masonry-container.are-images-unloaded,.masonry-enabled #nav-below{opacity:0}.generate-columns-container:not(.masonry-container){display:flex;flex-flow:row wrap;align-items:stretch}.generate-columns-container:not(.masonry-container) .generate-columns{display:flex}.generate-columns .inside-article{width:100%;box-sizing:border-box}.generate-columns-activated.post-image-aligned-left .generate-columns-container article:not(.featured-column) .post-image,.generate-columns-activated.post-image-aligned-right .generate-columns-container article:not(.featured-column) .post-image{float:none;text-align:center;margin-left:0;margin-right:0}.generate-columns-container .page-header,.generate-columns-container .paging-navigation{flex:1 1 100%;clear:both}.generate-columns-container .paging-navigation{margin-bottom:0}.no-sidebar .generate-columns-container .inside-article>*{max-width:none}.load-more:not(.has-svg-icon) .button.loading:before{content:"\e900";display:inline-block;font-family:"GP Premium";font-style:normal;font-weight:400;font-variant:normal;text-transform:none;line-height:1;animation:spin 2s infinite linear;margin-right:7px}.load-more .button:not(.loading) .gp-icon{display:none}.load-more .gp-icon svg{animation:spin 2s infinite linear;margin-right:7px}@keyframes spin{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}.generate-columns{box-sizing:border-box}.generate-columns.grid-20,.grid-sizer.grid-20{width:20%}.generate-columns.grid-25,.grid-sizer.grid-25{width:25%}.generate-columns.grid-33,.grid-sizer.grid-33{width:33.3333%}.generate-columns.grid-50,.grid-sizer.grid-50{width:50%}.generate-columns.grid-60,.grid-sizer.grid-60{width:60%}.generate-columns.grid-66,.grid-sizer.grid-66{width:66.66667%}@media (min-width:768px) and (max-width:1024px){.generate-columns.tablet-grid-50,.grid-sizer.tablet-grid-50{width:50%}}@media (max-width:767px){.generate-columns-activated .generate-columns-container{margin-left:0;margin-right:0}.generate-columns-container .generate-columns,.generate-columns-container>*{padding-left:0}.generate-columns-container .page-header{margin-left:0}.generate-columns.mobile-grid-100,.grid-sizer.mobile-grid-100{width:100%}.generate-columns-container>.paging-navigation{margin-left:0}}@media (max-width:768px){.load-more{display:block;text-align:center;margin-bottom:0}} \ No newline at end of file diff --git a/wp-content/plugins/gp-premium/blog/functions/css/style.css b/wp-content/plugins/gp-premium/blog/functions/css/style.css index bc322596..499f5d19 100644 --- a/wp-content/plugins/gp-premium/blog/functions/css/style.css +++ b/wp-content/plugins/gp-premium/blog/functions/css/style.css @@ -238,7 +238,8 @@ margin-left: 0; margin-right: 0; } - .generate-columns-container > * { + .generate-columns-container > *, + .generate-columns-container .generate-columns { padding-left: 0; } .generate-columns-container .page-header { diff --git a/wp-content/plugins/gp-premium/blog/functions/css/style.min.css b/wp-content/plugins/gp-premium/blog/functions/css/style.min.css index 36b0aaa3..e37470be 100644 --- a/wp-content/plugins/gp-premium/blog/functions/css/style.min.css +++ b/wp-content/plugins/gp-premium/blog/functions/css/style.min.css @@ -1 +1 @@ -.post-image-above-header .inside-article .featured-image,.post-image-above-header .inside-article .post-image{margin-top:0;margin-bottom:2em}.post-image-aligned-left .inside-article .featured-image,.post-image-aligned-left .inside-article .post-image{margin-top:0;margin-right:2em;float:left;text-align:left}.post-image-aligned-center .featured-image,.post-image-aligned-center .post-image{text-align:center}.post-image-aligned-right .inside-article .featured-image,.post-image-aligned-right .inside-article .post-image{margin-top:0;margin-left:2em;float:right;text-align:right}.post-image-below-header.post-image-aligned-center .inside-article .featured-image,.post-image-below-header.post-image-aligned-left .inside-article .featured-image,.post-image-below-header.post-image-aligned-left .inside-article .post-image,.post-image-below-header.post-image-aligned-right .inside-article .featured-image,.post-image-below-header.post-image-aligned-right .inside-article .post-image{margin-top:2em}.post-image-aligned-left>.featured-image,.post-image-aligned-right>.featured-image{float:none;margin-left:auto;margin-right:auto}.post-image-aligned-left .featured-image{text-align:left}.post-image-aligned-right .featured-image{text-align:right}.post-image-aligned-left .inside-article:after,.post-image-aligned-left .inside-article:before,.post-image-aligned-right .inside-article:after,.post-image-aligned-right .inside-article:before{content:"";display:table}.post-image-aligned-left .inside-article:after,.post-image-aligned-right .inside-article:after{clear:both}.post-image-aligned-left .inside-article,.post-image-aligned-right .inside-article{zoom:1}.one-container.post-image-above-header .no-featured-image-padding.generate-columns .inside-article .post-image,.one-container.post-image-above-header .page-header+.no-featured-image-padding .inside-article .post-image{margin-top:0}.one-container.both-right.post-image-aligned-center .no-featured-image-padding .featured-image,.one-container.both-right.post-image-aligned-center .no-featured-image-padding .post-image,.one-container.right-sidebar.post-image-aligned-center .no-featured-image-padding .featured-image,.one-container.right-sidebar.post-image-aligned-center .no-featured-image-padding .post-image{margin-right:0}.one-container.both-left.post-image-aligned-center .no-featured-image-padding .featured-image,.one-container.both-left.post-image-aligned-center .no-featured-image-padding .post-image,.one-container.left-sidebar.post-image-aligned-center .no-featured-image-padding .featured-image,.one-container.left-sidebar.post-image-aligned-center .no-featured-image-padding .post-image{margin-left:0}.one-container.both-sidebars.post-image-aligned-center .no-featured-image-padding .featured-image,.one-container.both-sidebars.post-image-aligned-center .no-featured-image-padding .post-image{margin-left:0;margin-right:0}.one-container.post-image-aligned-center .no-featured-image-padding.generate-columns .featured-image,.one-container.post-image-aligned-center .no-featured-image-padding.generate-columns .post-image{margin-left:0;margin-right:0}@media (max-width:768px){body:not(.post-image-aligned-center) .featured-image,body:not(.post-image-aligned-center) .inside-article .featured-image,body:not(.post-image-aligned-center) .inside-article .post-image{margin-right:0;margin-left:0;float:none;text-align:center}}.masonry-enabled .page-header{position:relative!important}.separate-containers .site-main>.generate-columns-container{margin-bottom:0}.load-more.are-images-unloaded,.masonry-container.are-images-unloaded,.masonry-enabled #nav-below{opacity:0}.generate-columns-container:not(.masonry-container){display:flex;flex-flow:row wrap;align-items:stretch}.generate-columns-container:not(.masonry-container) .generate-columns{display:flex}.generate-columns .inside-article{width:100%;box-sizing:border-box}.generate-columns-activated.post-image-aligned-left .generate-columns-container article:not(.featured-column) .post-image,.generate-columns-activated.post-image-aligned-right .generate-columns-container article:not(.featured-column) .post-image{float:none;text-align:center;margin-left:0;margin-right:0}.generate-columns-container .page-header,.generate-columns-container .paging-navigation{flex:1 1 100%;clear:both}.generate-columns-container .paging-navigation{margin-bottom:0}.no-sidebar .generate-columns-container .inside-article>*{max-width:none}.load-more:not(.has-svg-icon) .button.loading:before{content:"\e900";display:inline-block;font-family:"GP Premium";font-style:normal;font-weight:400;font-variant:normal;text-transform:none;line-height:1;animation:spin 2s infinite linear;margin-right:7px}.load-more .button:not(.loading) .gp-icon{display:none}.load-more .gp-icon svg{animation:spin 2s infinite linear;margin-right:7px}@keyframes spin{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}.generate-columns{box-sizing:border-box}.generate-columns.grid-20,.grid-sizer.grid-20{width:20%}.generate-columns.grid-25,.grid-sizer.grid-25{width:25%}.generate-columns.grid-33,.grid-sizer.grid-33{width:33.3333%}.generate-columns.grid-50,.grid-sizer.grid-50{width:50%}.generate-columns.grid-60,.grid-sizer.grid-60{width:60%}.generate-columns.grid-66,.grid-sizer.grid-66{width:66.66667%}@media (min-width:768px) and (max-width:1024px){.generate-columns.tablet-grid-50,.grid-sizer.tablet-grid-50{width:50%}}@media (max-width:767px){.generate-columns-activated .generate-columns-container{margin-left:0;margin-right:0}.generate-columns-container>*{padding-left:0}.generate-columns-container .page-header{margin-left:0}.generate-columns.mobile-grid-100,.grid-sizer.mobile-grid-100{width:100%}.generate-columns-container>.paging-navigation{margin-left:0}}@media (max-width:768px){.load-more{display:block;text-align:center;margin-bottom:0}} \ No newline at end of file +.post-image-above-header .inside-article .featured-image,.post-image-above-header .inside-article .post-image{margin-top:0;margin-bottom:2em}.post-image-aligned-left .inside-article .featured-image,.post-image-aligned-left .inside-article .post-image{margin-top:0;margin-right:2em;float:left;text-align:left}.post-image-aligned-center .featured-image,.post-image-aligned-center .post-image{text-align:center}.post-image-aligned-right .inside-article .featured-image,.post-image-aligned-right .inside-article .post-image{margin-top:0;margin-left:2em;float:right;text-align:right}.post-image-below-header.post-image-aligned-center .inside-article .featured-image,.post-image-below-header.post-image-aligned-left .inside-article .featured-image,.post-image-below-header.post-image-aligned-left .inside-article .post-image,.post-image-below-header.post-image-aligned-right .inside-article .featured-image,.post-image-below-header.post-image-aligned-right .inside-article .post-image{margin-top:2em}.post-image-aligned-left>.featured-image,.post-image-aligned-right>.featured-image{float:none;margin-left:auto;margin-right:auto}.post-image-aligned-left .featured-image{text-align:left}.post-image-aligned-right .featured-image{text-align:right}.post-image-aligned-left .inside-article:after,.post-image-aligned-left .inside-article:before,.post-image-aligned-right .inside-article:after,.post-image-aligned-right .inside-article:before{content:"";display:table}.post-image-aligned-left .inside-article:after,.post-image-aligned-right .inside-article:after{clear:both}.post-image-aligned-left .inside-article,.post-image-aligned-right .inside-article{zoom:1}.one-container.post-image-above-header .no-featured-image-padding.generate-columns .inside-article .post-image,.one-container.post-image-above-header .page-header+.no-featured-image-padding .inside-article .post-image{margin-top:0}.one-container.both-right.post-image-aligned-center .no-featured-image-padding .featured-image,.one-container.both-right.post-image-aligned-center .no-featured-image-padding .post-image,.one-container.right-sidebar.post-image-aligned-center .no-featured-image-padding .featured-image,.one-container.right-sidebar.post-image-aligned-center .no-featured-image-padding .post-image{margin-right:0}.one-container.both-left.post-image-aligned-center .no-featured-image-padding .featured-image,.one-container.both-left.post-image-aligned-center .no-featured-image-padding .post-image,.one-container.left-sidebar.post-image-aligned-center .no-featured-image-padding .featured-image,.one-container.left-sidebar.post-image-aligned-center .no-featured-image-padding .post-image{margin-left:0}.one-container.both-sidebars.post-image-aligned-center .no-featured-image-padding .featured-image,.one-container.both-sidebars.post-image-aligned-center .no-featured-image-padding .post-image{margin-left:0;margin-right:0}.one-container.post-image-aligned-center .no-featured-image-padding.generate-columns .featured-image,.one-container.post-image-aligned-center .no-featured-image-padding.generate-columns .post-image{margin-left:0;margin-right:0}@media (max-width:768px){body:not(.post-image-aligned-center) .featured-image,body:not(.post-image-aligned-center) .inside-article .featured-image,body:not(.post-image-aligned-center) .inside-article .post-image{margin-right:0;margin-left:0;float:none;text-align:center}}.masonry-enabled .page-header{position:relative!important}.separate-containers .site-main>.generate-columns-container{margin-bottom:0}.load-more.are-images-unloaded,.masonry-container.are-images-unloaded,.masonry-enabled #nav-below{opacity:0}.generate-columns-container:not(.masonry-container){display:flex;flex-flow:row wrap;align-items:stretch}.generate-columns-container:not(.masonry-container) .generate-columns{display:flex}.generate-columns .inside-article{width:100%;box-sizing:border-box}.generate-columns-activated.post-image-aligned-left .generate-columns-container article:not(.featured-column) .post-image,.generate-columns-activated.post-image-aligned-right .generate-columns-container article:not(.featured-column) .post-image{float:none;text-align:center;margin-left:0;margin-right:0}.generate-columns-container .page-header,.generate-columns-container .paging-navigation{flex:1 1 100%;clear:both}.generate-columns-container .paging-navigation{margin-bottom:0}.no-sidebar .generate-columns-container .inside-article>*{max-width:none}.load-more:not(.has-svg-icon) .button.loading:before{content:"\e900";display:inline-block;font-family:"GP Premium";font-style:normal;font-weight:400;font-variant:normal;text-transform:none;line-height:1;animation:spin 2s infinite linear;margin-right:7px}.load-more .button:not(.loading) .gp-icon{display:none}.load-more .gp-icon svg{animation:spin 2s infinite linear;margin-right:7px}@keyframes spin{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}.generate-columns{box-sizing:border-box}.generate-columns.grid-20,.grid-sizer.grid-20{width:20%}.generate-columns.grid-25,.grid-sizer.grid-25{width:25%}.generate-columns.grid-33,.grid-sizer.grid-33{width:33.3333%}.generate-columns.grid-50,.grid-sizer.grid-50{width:50%}.generate-columns.grid-60,.grid-sizer.grid-60{width:60%}.generate-columns.grid-66,.grid-sizer.grid-66{width:66.66667%}@media (min-width:768px) and (max-width:1024px){.generate-columns.tablet-grid-50,.grid-sizer.tablet-grid-50{width:50%}}@media (max-width:767px){.generate-columns-activated .generate-columns-container{margin-left:0;margin-right:0}.generate-columns-container .generate-columns,.generate-columns-container>*{padding-left:0}.generate-columns-container .page-header{margin-left:0}.generate-columns.mobile-grid-100,.grid-sizer.mobile-grid-100{width:100%}.generate-columns-container>.paging-navigation{margin-left:0}}@media (max-width:768px){.load-more{display:block;text-align:center;margin-bottom:0}} \ No newline at end of file diff --git a/wp-content/plugins/gp-premium/blog/functions/generate-blog.php b/wp-content/plugins/gp-premium/blog/functions/generate-blog.php index fde80ed5..ff830a11 100644 --- a/wp-content/plugins/gp-premium/blog/functions/generate-blog.php +++ b/wp-content/plugins/gp-premium/blog/functions/generate-blog.php @@ -94,7 +94,7 @@ if ( ! function_exists( 'generate_blog_scripts' ) ) { $needs_columns_css = false; $needs_featured_image_css = false; - if ( ( ! is_singular() && $settings['column_layout'] ) || $settings['infinite_scroll'] ) { + if ( generate_blog_get_columns() || $settings['infinite_scroll'] ) { $needs_columns_css = true; } diff --git a/wp-content/plugins/gp-premium/blog/functions/js/scripts.js b/wp-content/plugins/gp-premium/blog/functions/js/scripts.js index adc02104..83370b77 100644 --- a/wp-content/plugins/gp-premium/blog/functions/js/scripts.js +++ b/wp-content/plugins/gp-premium/blog/functions/js/scripts.js @@ -63,6 +63,7 @@ jQuery( document ).ready( function( $ ) { } $button.html( svgIcon + generateBlog.more ).removeClass( 'loading' ); + $( document.body ).trigger( 'post-load' ); } ); $container.on( 'last.infiniteScroll', function() { diff --git a/wp-content/plugins/gp-premium/blog/functions/js/scripts.min.js b/wp-content/plugins/gp-premium/blog/functions/js/scripts.min.js index 2e3ecc13..3afbe784 100644 --- a/wp-content/plugins/gp-premium/blog/functions/js/scripts.min.js +++ b/wp-content/plugins/gp-premium/blog/functions/js/scripts.min.js @@ -1 +1 @@ -jQuery(document).ready(function(t){var i,r,l,s,n,e=t(".masonry-container"),o=!1;e.length&&(o=(i=e.masonry(generateBlog.masonryInit)).data("masonry"),i.imagesLoaded(function(){i.masonry("layout"),i.removeClass("are-images-unloaded"),t(".load-more").removeClass("are-images-unloaded"),t("#nav-below").css("opacity","1"),i.masonry("option",{itemSelector:".masonry-post"});var n=i.find(".masonry-post");i.masonry("appended",n)}),t("#nav-below").insertAfter(".masonry-container"),t(window).on("orientationchange",function(n){i.masonry("layout")})),t(".infinite-scroll").length&&t(".nav-links .next").length&&(r=t("#main article").first().parent(),l=t(".load-more a"),s="",generateBlog.icon&&(s=generateBlog.icon),(n=generateBlog.infiniteScrollInit).outlayer=o,r.infiniteScroll(n),l.on("click",function(n){document.activeElement.blur(),t(this).html(s+generateBlog.loading).addClass("loading")}),r.on("append.infiniteScroll",function(n,e,o,a){t(".generate-columns-container").length||r.append(l.parent()),t(a).find("img").each(function(n,e){var o=e.outerHTML;e.outerHTML=o}),i&&i.imagesLoaded(function(){i.masonry("layout")}),l.html(s+generateBlog.more).removeClass("loading")}),r.on("last.infiniteScroll",function(){t(".load-more").hide()}))}); \ No newline at end of file +jQuery(document).ready(function(t){var i,r,l,s,n,e=t(".masonry-container"),o=!1;e.length&&(o=(i=e.masonry(generateBlog.masonryInit)).data("masonry"),i.imagesLoaded(function(){i.masonry("layout"),i.removeClass("are-images-unloaded"),t(".load-more").removeClass("are-images-unloaded"),t("#nav-below").css("opacity","1"),i.masonry("option",{itemSelector:".masonry-post"});var n=i.find(".masonry-post");i.masonry("appended",n)}),t("#nav-below").insertAfter(".masonry-container"),t(window).on("orientationchange",function(n){i.masonry("layout")})),t(".infinite-scroll").length&&t(".nav-links .next").length&&(r=t("#main article").first().parent(),l=t(".load-more a"),s="",generateBlog.icon&&(s=generateBlog.icon),(n=generateBlog.infiniteScrollInit).outlayer=o,r.infiniteScroll(n),l.on("click",function(n){document.activeElement.blur(),t(this).html(s+generateBlog.loading).addClass("loading")}),r.on("append.infiniteScroll",function(n,e,o,a){t(".generate-columns-container").length||r.append(l.parent()),t(a).find("img").each(function(n,e){var o=e.outerHTML;e.outerHTML=o}),i&&i.imagesLoaded(function(){i.masonry("layout")}),l.html(s+generateBlog.more).removeClass("loading"),t(document.body).trigger("post-load")}),r.on("last.infiniteScroll",function(){t(".load-more").hide()}))}); \ No newline at end of file diff --git a/wp-content/plugins/gp-premium/colors/functions/js/customizer.js b/wp-content/plugins/gp-premium/colors/functions/js/customizer.js index 58e641b6..f3937f6e 100644 --- a/wp-content/plugins/gp-premium/colors/functions/js/customizer.js +++ b/wp-content/plugins/gp-premium/colors/functions/js/customizer.js @@ -260,9 +260,9 @@ generate_colors_live_update( 'navigation_text_color', wp.customize( 'generate_settings[navigation_search_background_color]', function( value ) { value.bind( function( newval ) { if ( jQuery( 'style#navigation_search_background_color' ).length ) { - jQuery( 'style#navigation_search_background_color' ).html( '.navigation-search input[type="search"],.navigation-search input[type="search"]:active, .navigation-search input[type="search"]:focus, .main-navigation .main-nav ul li.search-item.active > a{background-color:' + newval + ';}' ); + jQuery( 'style#navigation_search_background_color' ).html( '.navigation-search input[type="search"],.navigation-search input[type="search"]:active, .navigation-search input[type="search"]:focus, .main-navigation .main-nav ul li.search-item.active > a, .main-navigation .menu-bar-items .search-item.active > a{background-color:' + newval + ';}' ); } else { - jQuery( 'head' ).append( '' ); + jQuery( 'head' ).append( '' ); setTimeout(function() { jQuery( 'style#navigation_search_background_color' ).not( ':last' ).remove(); }, 1000); @@ -286,7 +286,7 @@ wp.customize( 'generate_settings[navigation_search_background_color]', function( } ); } ); -generate_colors_live_update( 'navigation_search_text_color', '.navigation-search input[type="search"],.navigation-search input[type="search"]:active, .navigation-search input[type="search"]:focus, .main-navigation .main-nav ul li.search-item.active > a', 'color', '' ); +generate_colors_live_update( 'navigation_search_text_color', '.navigation-search input[type="search"],.navigation-search input[type="search"]:active, .navigation-search input[type="search"]:focus, .main-navigation .main-nav ul li.search-item.active > a, .main-navigation .menu-bar-items .search-item.active > a', 'color', '' ); /** * Secondary navigation text color hover diff --git a/wp-content/plugins/gp-premium/elements/assets/admin/wp-color-picker-alpha.min.js b/wp-content/plugins/gp-premium/elements/assets/admin/wp-color-picker-alpha.min.js deleted file mode 100644 index db88dc7c..00000000 --- a/wp-content/plugins/gp-premium/elements/assets/admin/wp-color-picker-alpha.min.js +++ /dev/null @@ -1,11 +0,0 @@ -/**! - * wp-color-picker-alpha - * - * Overwrite Automattic Iris for enabled Alpha Channel in wpColorPicker - * Only run in input and is defined data alpha in true - * - * Version: 2.1.4 - * https://github.com/kallookoo/wp-color-picker-alpha - * Licensed under the GPLv2 license or later. - */ -!function(t){if(!t.wp.wpColorPicker.prototype._hasAlpha){var o="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAAHnlligAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAHJJREFUeNpi+P///4EDBxiAGMgCCCAGFB5AADGCRBgYDh48CCRZIJS9vT2QBAggFBkmBiSAogxFBiCAoHogAKIKAlBUYTELAiAmEtABEECk20G6BOmuIl0CIMBQ/IEMkO0myiSSraaaBhZcbkUOs0HuBwDplz5uFJ3Z4gAAAABJRU5ErkJggg==",r='
',e='',a='',i=void 0!==wpColorPickerL10n.current;if(i)var n='';else{n='';var l="",s=''}Color.fn.toString=function(){if(this._alpha<1)return this.toCSS("rgba",this._alpha).replace(/\s+/g,"");var t=parseInt(this._color,10).toString(16);return this.error?"":(t.length<6&&(t=("00000"+t).substr(-6)),"#"+t)},t.widget("wp.wpColorPicker",t.wp.wpColorPicker,{_hasAlpha:!0,_create:function(){if(t.support.iris){var p=this,c=p.element;if(t.extend(p.options,c.data()),"hue"===p.options.type)return p._createHueOnly();p.close=t.proxy(p.close,p),p.initialValue=c.val(),c.addClass("wp-color-picker"),i?(c.hide().wrap(e),p.wrap=c.parent(),p.toggler=t(n).insertBefore(c).css({backgroundColor:p.initialValue}).attr("title",wpColorPickerL10n.pick).attr("data-current",wpColorPickerL10n.current),p.pickerContainer=t(r).insertAfter(c),p.button=t(a).addClass("hidden")):(c.parent("label").length||(c.wrap(l),p.wrappingLabelText=t(s).insertBefore(c).text(wpColorPickerL10n.defaultLabel)),p.wrappingLabel=c.parent(),p.wrappingLabel.wrap(e),p.wrap=p.wrappingLabel.parent(),p.toggler=t(n).insertBefore(p.wrappingLabel).css({backgroundColor:p.initialValue}),p.toggler.find(".wp-color-result-text").text(wpColorPickerL10n.pick),p.pickerContainer=t(r).insertAfter(p.wrappingLabel),p.button=t(a)),p.options.defaultColor?(p.button.addClass("wp-picker-default").val(wpColorPickerL10n.defaultString),i||p.button.attr("aria-label",wpColorPickerL10n.defaultAriaLabel)):(p.button.addClass("wp-picker-clear").val(wpColorPickerL10n.clear),i||p.button.attr("aria-label",wpColorPickerL10n.clearAriaLabel)),i?c.wrap('').after(p.button):(p.wrappingLabel.wrap('').after(p.button),p.inputWrapper=c.closest(".wp-picker-input-wrap")),c.iris({target:p.pickerContainer,hide:p.options.hide,width:p.options.width,mode:p.options.mode,palettes:p.options.palettes,change:function(r,e){p.options.alpha?(p.toggler.css({"background-image":"url("+o+")"}),i?p.toggler.html(''):(p.toggler.css({position:"relative"}),0==p.toggler.find("span.color-alpha").length&&p.toggler.append('')),p.toggler.find("span.color-alpha").css({width:"30px",height:"100%",position:"absolute",top:0,left:0,"border-top-left-radius":"2px","border-bottom-left-radius":"2px",background:e.color.toString()})):p.toggler.css({backgroundColor:e.color.toString()}),t.isFunction(p.options.change)&&p.options.change.call(this,r,e)}}),c.val(p.initialValue),p._addListeners(),p.options.hide||p.toggler.click()}},_addListeners:function(){var o=this;o.wrap.on("click.wpcolorpicker",function(t){t.stopPropagation()}),o.toggler.click(function(){o.toggler.hasClass("wp-picker-open")?o.close():o.open()}),o.element.on("change",function(r){(""===t(this).val()||o.element.hasClass("iris-error"))&&(o.options.alpha?(i&&o.toggler.removeAttr("style"),o.toggler.find("span.color-alpha").css("backgroundColor","")):o.toggler.css("backgroundColor",""),t.isFunction(o.options.clear)&&o.options.clear.call(this,r))}),o.button.on("click",function(r){t(this).hasClass("wp-picker-clear")?(o.element.val(""),o.options.alpha?(i&&o.toggler.removeAttr("style"),o.toggler.find("span.color-alpha").css("backgroundColor","")):o.toggler.css("backgroundColor",""),t.isFunction(o.options.clear)&&o.options.clear.call(this,r),o.element.trigger("change")):t(this).hasClass("wp-picker-default")&&o.element.val(o.options.defaultColor).change()})}}),t.widget("a8c.iris",t.a8c.iris,{_create:function(){if(this._super(),this.options.alpha=this.element.data("alpha")||!1,this.element.is(":input")||(this.options.alpha=!1),void 0!==this.options.alpha&&this.options.alpha){var o=this,r=o.element,e=t(' ').appendTo(o.picker.find(".iris-picker-inner")),a={aContainer:e,aSlider:e.find(".iris-slider-offset-alpha")};void 0!==r.data("custom-width")?o.options.customWidth=parseInt(r.data("custom-width"))||0:o.options.customWidth=100,o.options.defaultWidth=r.width(),(o._color._alpha<1||-1!=o._color.toString().indexOf("rgb"))&&r.width(parseInt(o.options.defaultWidth+o.options.customWidth)),t.each(a,function(t,r){o.controls[t]=r}),o.controls.square.css({"margin-right":"0"});var i=o.picker.width()-o.controls.square.width()-20,n=i/6,l=i/2-n;t.each(["aContainer","strip"],function(t,r){o.controls[r].width(l).css({"margin-left":n+"px"})}),o._initControls(),o._change()}},_initControls:function(){if(this._super(),this.options.alpha){var t=this;t.controls.aSlider.slider({orientation:"vertical",min:0,max:100,step:1,value:parseInt(100*t._color._alpha),slide:function(o,r){t._color._alpha=parseFloat(r.value/100),t._change.apply(t,arguments)}})}},_change:function(){this._super();var t=this,r=t.element;if(this.options.alpha){var e=t.controls,a=parseInt(100*t._color._alpha),i=t._color.toRgb(),n=["rgb("+i.r+","+i.g+","+i.b+") 0%","rgba("+i.r+","+i.g+","+i.b+", 0) 100%"],l=t.options.defaultWidth,s=t.options.customWidth,p=t.picker.closest(".wp-picker-container").find(".wp-color-result");e.aContainer.css({background:"linear-gradient(to bottom, "+n.join(", ")+"), url("+o+")"}),p.hasClass("wp-picker-open")&&(e.aSlider.slider("value",a),t._color._alpha<1?(e.strip.attr("style",e.strip.attr("style").replace(/rgba\(([0-9]+,)(\s+)?([0-9]+,)(\s+)?([0-9]+)(,(\s+)?[0-9\.]+)\)/g,"rgb($1$3$5)")),r.width(parseInt(l+s))):r.width(l))}(r.data("reset-alpha")||!1)&&t.picker.find(".iris-palette-container").on("click.palette",".iris-palette",function(){t._color._alpha=1,t.active="external",t._change()}),r.trigger("change")},_addInputListeners:function(t){var o=this,r=function(r){var e=new Color(t.val()),a=t.val();t.removeClass("iris-error"),e.error?""!==a&&t.addClass("iris-error"):e.toString()!==o._color.toString()&&("keyup"===r.type&&a.match(/^[0-9a-fA-F]{3}$/)||o._setOption("color",e.toString()))};t.on("change",r).on("keyup",o._debounce(r,100)),o.options.hide&&t.on("focus",function(){o.show()})}})}}(jQuery),jQuery(document).ready(function(t){t(".color-picker").wpColorPicker()}); diff --git a/wp-content/plugins/gp-premium/elements/class-block.php b/wp-content/plugins/gp-premium/elements/class-block.php index f73df338..982ee4db 100644 --- a/wp-content/plugins/gp-premium/elements/class-block.php +++ b/wp-content/plugins/gp-premium/elements/class-block.php @@ -80,10 +80,10 @@ class GeneratePress_Block_Element { case 'left-sidebar': $hook = 'generate_before_left_sidebar_content'; break; + } - case 'custom': - $hook = $custom_hook; - break; + if ( 'custom' === $hook && $custom_hook ) { + $hook = $custom_hook; } if ( ! $hook ) { diff --git a/wp-content/plugins/gp-premium/elements/class-hero.php b/wp-content/plugins/gp-premium/elements/class-hero.php index ccfbc221..49b60ea8 100644 --- a/wp-content/plugins/gp-premium/elements/class-hero.php +++ b/wp-content/plugins/gp-premium/elements/class-hero.php @@ -224,6 +224,17 @@ class GeneratePress_Hero { $options['padding_bottom_unit_mobile'] = $options['padding_bottom_unit_mobile'] ? $options['padding_bottom_unit_mobile'] : 'px'; $options['padding_left_unit_mobile'] = $options['padding_left_unit_mobile'] ? $options['padding_left_unit_mobile'] : 'px'; + $padding_inside = false; + $using_flexbox = false; + + if ( function_exists( 'generate_is_using_flexbox' ) && generate_is_using_flexbox() ) { + $using_flexbox = true; + + if ( function_exists( 'generate_get_option' ) && 'text' === generate_get_option( 'container_alignment' ) ) { + $padding_inside = true; + } + } + $css->set_selector( '.page-hero' ); if ( $options['background_color'] ) { @@ -269,7 +280,9 @@ class GeneratePress_Hero { $css->add_property( 'text-align', esc_html( $options['horizontal_alignment'] ) ); } - $css->add_property( 'box-sizing', 'border-box' ); + if ( ! $using_flexbox ) { + $css->add_property( 'box-sizing', 'border-box' ); + } if ( $options['site_header_merge'] && $options['full_screen'] ) { $css->add_property( 'min-height', '100vh' ); @@ -299,6 +312,32 @@ class GeneratePress_Hero { } } + if ( $padding_inside && function_exists( 'generate_get_option' ) ) { + $container_width = generate_get_option( 'container_width' ); + $padding_right = '0px'; + $padding_left = '0px'; + + if ( $options['padding_right'] ) { + $padding_right = absint( $options['padding_right'] ) . $options['padding_right_unit']; + } + + if ( $options['padding_left'] ) { + $padding_left = absint( $options['padding_left'] ) . $options['padding_left_unit']; + } + + $css->set_selector( '.page-hero .inside-page-hero.grid-container' ); + + $css->add_property( + 'max-width', + sprintf( + 'calc(%1$s - %2$s - %3$s)', + $container_width . 'px', + $padding_right, + $padding_left + ) + ); + } + $css->set_selector( '.page-hero h1, .page-hero h2, .page-hero h3, .page-hero h4, .page-hero h5, .page-hero h6' ); if ( $options['text_color'] ) { $css->add_property( 'color', esc_attr( $options['text_color'] ) ); @@ -378,13 +417,23 @@ class GeneratePress_Hero { $navigation_background_hover = $options['navigation_background_color_hover'] ? $options['navigation_background_color_hover'] : 'transparent'; $navigation_background_current = $options['navigation_background_color_current'] ? $options['navigation_background_color_current'] : 'transparent'; - $css->set_selector( '.header-wrap #site-navigation:not(.toggled), .header-wrap #mobile-header:not(.toggled):not(.navigation-stick)' ); + $css->set_selector( '.header-wrap #site-navigation:not(.toggled), .header-wrap #mobile-header:not(.toggled):not(.navigation-stick), .has-inline-mobile-toggle .mobile-menu-control-wrapper' ); $css->add_property( 'background', $navigation_background ); - $css->set_selector( '.header-wrap #site-navigation:not(.toggled) .main-nav > ul > li > a, .header-wrap #mobile-header:not(.toggled):not(.navigation-stick) .main-nav > ul > li > a, .header-wrap .main-navigation:not(.toggled):not(.navigation-stick) .menu-toggle, .header-wrap .main-navigation:not(.toggled):not(.navigation-stick) .menu-toggle:hover, .main-navigation:not(.toggled):not(.navigation-stick) .mobile-bar-items a, .main-navigation:not(.toggled):not(.navigation-stick) .mobile-bar-items a:hover, .main-navigation:not(.toggled):not(.navigation-stick) .mobile-bar-items a:focus' ); + if ( function_exists( 'generate_is_using_flexbox' ) && generate_is_using_flexbox() ) { + $css->set_selector( '.header-wrap #site-navigation:not(.toggled) .main-nav > ul > li > a, .header-wrap #mobile-header:not(.toggled):not(.navigation-stick) .main-nav > ul > li > a, .header-wrap .main-navigation:not(.toggled):not(.navigation-stick) .menu-toggle, .header-wrap .main-navigation:not(.toggled):not(.navigation-stick) .menu-toggle:hover, .main-navigation:not(.toggled):not(.navigation-stick) .menu-bar-item:not(.close-search) > a' ); + } else { + $css->set_selector( '.header-wrap #site-navigation:not(.toggled) .main-nav > ul > li > a, .header-wrap #mobile-header:not(.toggled):not(.navigation-stick) .main-nav > ul > li > a, .header-wrap .main-navigation:not(.toggled):not(.navigation-stick) .menu-toggle, .header-wrap .main-navigation:not(.toggled):not(.navigation-stick) .menu-toggle:hover, .main-navigation:not(.toggled):not(.navigation-stick) .mobile-bar-items a, .main-navigation:not(.toggled):not(.navigation-stick) .mobile-bar-items a:hover, .main-navigation:not(.toggled):not(.navigation-stick) .mobile-bar-items a:focus' ); + } + $css->add_property( 'color', esc_attr( $options['navigation_text_color'] ) ); - $css->set_selector( '.header-wrap #site-navigation:not(.toggled) .main-nav > ul > li:hover > a, .header-wrap #site-navigation:not(.toggled) .main-nav > ul > li:focus > a, .header-wrap #site-navigation:not(.toggled) .main-nav > ul > li.sfHover > a, .header-wrap #mobile-header:not(.toggled) .main-nav > ul > li:hover > a' ); + if ( function_exists( 'generate_is_using_flexbox' ) && generate_is_using_flexbox() ) { + $css->set_selector( '.header-wrap #site-navigation:not(.toggled) .main-nav > ul > li:hover > a, .header-wrap #site-navigation:not(.toggled) .main-nav > ul > li:focus > a, .header-wrap #site-navigation:not(.toggled) .main-nav > ul > li.sfHover > a, .header-wrap #mobile-header:not(.toggled) .main-nav > ul > li:hover > a, .header-wrap #site-navigation:not(.toggled) .menu-bar-item:not(.close-search):hover > a, .header-wrap #mobile-header:not(.toggled) .menu-bar-item:not(.close-search):hover > a, .header-wrap #site-navigation:not(.toggled) .menu-bar-item:not(.close-search).sfHover > a, .header-wrap #mobile-header:not(.toggled) .menu-bar-item:not(.close-search).sfHover > a' ); + } else { + $css->set_selector( '.header-wrap #site-navigation:not(.toggled) .main-nav > ul > li:hover > a, .header-wrap #site-navigation:not(.toggled) .main-nav > ul > li:focus > a, .header-wrap #site-navigation:not(.toggled) .main-nav > ul > li.sfHover > a, .header-wrap #mobile-header:not(.toggled) .main-nav > ul > li:hover > a' ); + } + $css->add_property( 'background', $navigation_background_hover ); if ( '' !== $options['navigation_text_color_hover'] ) { @@ -666,7 +715,7 @@ class GeneratePress_Hero { $attr = apply_filters( 'generate_page_hero_logo_attributes', array( - 'class' => 'header-image', + 'class' => 'header-image is-logo-image', 'alt' => esc_attr( apply_filters( 'generate_logo_title', get_bloginfo( 'name', 'display' ) ) ), 'src' => $logo_url, 'title' => esc_attr( apply_filters( 'generate_logo_title', get_bloginfo( 'name', 'display' ) ) ), @@ -722,7 +771,7 @@ class GeneratePress_Hero { printf( ' ', esc_url( apply_filters( 'generate_logo_href', home_url( '/' ) ) ), @@ -748,7 +797,7 @@ class GeneratePress_Hero { printf( '', esc_url( apply_filters( 'generate_logo_href', home_url( '/' ) ) ), @@ -817,7 +866,10 @@ class GeneratePress_Hero { $options = self::get_options(); if ( strpos( $options['content'], '{{post_title}}' ) !== false ) { - add_filter( 'generate_show_title', '__return_false' ); + if ( is_singular() ) { + add_filter( 'generate_show_title', '__return_false' ); + } + remove_action( 'generate_archive_title', 'generate_archive_title' ); add_filter( 'post_class', array( self::$hero, 'remove_hentry' ) ); } diff --git a/wp-content/plugins/gp-premium/elements/class-metabox.php b/wp-content/plugins/gp-premium/elements/class-metabox.php index eb20dade..cddfc74e 100644 --- a/wp-content/plugins/gp-premium/elements/class-metabox.php +++ b/wp-content/plugins/gp-premium/elements/class-metabox.php @@ -152,19 +152,7 @@ class GeneratePress_Elements_Metabox { wp_enqueue_media(); wp_enqueue_script( 'wp-color-picker' ); wp_enqueue_style( 'wp-color-picker' ); - wp_enqueue_script( 'wp-color-picker-alpha', plugin_dir_url( __FILE__ ) . 'assets/admin/wp-color-picker-alpha.min.js', array( 'wp-color-picker' ), GP_PREMIUM_VERSION, true ); - wp_localize_script( - 'wp-color-picker-alpha', - 'wpColorPickerL10n', - array( - 'defaultLabel' => __( 'Color value', 'gp-premium' ), - 'pick' => __( 'Select Color', 'gp-premium' ), - 'defaultString' => __( 'Default', 'gp-premium' ), - 'defaultAriaLabel' => __( 'Select default color', 'gp-premium' ), - 'clear' => __( 'Clear', 'gp-premium' ), - 'clearAriaLabel' => __( 'Clear color', 'gp-premium' ), - ) - ); + wp_enqueue_script( 'wp-color-picker-alpha', GP_LIBRARY_DIRECTORY_URL . 'alpha-color-picker/wp-color-picker-alpha.min.js', array( 'wp-color-picker' ), '2.1.4', true ); if ( function_exists( 'wp_add_inline_script' ) && function_exists( 'generate_get_default_color_palettes' ) ) { // Grab our palette array and turn it into JS. @@ -1256,7 +1244,7 @@ class GeneratePress_Elements_Metabox { /> -