diff --git a/build b/build index 595dce0b..c605d3bf 160000 --- a/build +++ b/build @@ -1 +1 @@ -Subproject commit 595dce0b49bc743af2d5a730b2ca431e423fc572 +Subproject commit c605d3bf8c85d0f934da0b635465c47dea58d275 diff --git a/inc/jetpack.php b/inc/jetpack.php index 4b53c6a0..913495fe 100644 --- a/inc/jetpack.php +++ b/inc/jetpack.php @@ -27,31 +27,6 @@ function siteorigin_north_jetpack_setup() { endif; add_action( 'after_setup_theme', 'siteorigin_north_jetpack_setup' ); -if ( Jetpack::is_module_active( 'lazy-images' ) ) : - if ( ! function_exists( 'siteorigin_north_jetpack_logo_not_lazy' ) ) { - - function siteorigin_north_jetpack_logo_not_lazy( $blacklisted_classes ) { - $blacklisted_classes[] = 'custom-logo'; - - return $blacklisted_classes; - } - add_filter( 'jetpack_lazy_images_blacklisted_classes', 'siteorigin_north_jetpack_logo_not_lazy' ); - } - - if ( ! function_exists( 'siteorigin_north_jetpack_logo_not_lazy_class' ) ) { - - function siteorigin_north_jetpack_logo_not_lazy_class( $attrs ) { - if ( ! empty( $attrs['class'] ) ) { - $attrs['class'] .= ' skip-lazy'; - } else { - $attrs['class'] = 'skip-lazy'; - } - - return $attrs; - } - add_filter( 'siteorigin_north_logo_attributes', 'siteorigin_north_jetpack_logo_not_lazy_class' ); - } -endif; if ( ! function_exists( 'siteorigin_north_infinite_scroll_render' ) ) : /** diff --git a/inc/settings b/inc/settings index 36a7dee4..cd2b1c16 160000 --- a/inc/settings +++ b/inc/settings @@ -1 +1 @@ -Subproject commit 36a7dee49e16c8ad7f296e3c9d880fbe2c17a10c +Subproject commit cd2b1c16ad9f499def844c42da76b1b84ea736dd diff --git a/inc/template-tags.php b/inc/template-tags.php index 977e10f9..43290475 100644 --- a/inc/template-tags.php +++ b/inc/template-tags.php @@ -78,39 +78,35 @@ function siteorigin_north_display_retina_logo( $attr ) { endif; add_filter( 'wp_get_attachment_image_attributes', 'siteorigin_north_display_retina_logo' ); -if ( - class_exists( 'Smush\Core\Modules\Lazy' ) || - class_exists( 'LiteSpeed_Cache' ) || - class_exists( 'Jetpack_Lazy_Images' ) -) : - if ( ! function_exists( 'siteorigin_north_lazy_load_exclude' ) ) : - /** - * Exclude Logo from Lazy Load plugins. - */ - function siteorigin_north_lazy_load_exclude( $attr, $attachment ) { - $custom_logo_id = siteorigin_setting( 'branding_logo' ); - if ( empty( $custom_logo_id ) ) { - $custom_logo_id = get_theme_mod( 'custom_logo' ); +if ( ! function_exists( 'siteorigin_north_lazy_load_exclude' ) ) : + /** + * Exclude Logo from Lazy Load plugins. + */ + function siteorigin_north_lazy_load_exclude( $attr, $attachment ) { + $custom_logo_id = siteorigin_setting( 'branding_logo' ); + if ( empty( $custom_logo_id ) ) { + $custom_logo_id = get_theme_mod( 'custom_logo' ); + } + if ( ! empty( $custom_logo_id ) && $attachment->ID == $custom_logo_id ) { + // Jetpack Lazy Load + if ( class_exists( 'Jetpack_Lazy_Images' ) ) { + $attr['class'] .= ' skip-lazy'; } - if ( ! empty( $custom_logo_id ) && $attachment->ID == $custom_logo_id ) { - // Jetpack Lazy Load - if ( class_exists( 'Jetpack_Lazy_Images' ) ) { - $attr['class'] .= ' skip-lazy'; - } - // Smush Lazy Load - if ( class_exists( 'Smush\Core\Modules\Lazy' ) ) { - $attr['class'] .= ' no-lazyload'; - } - // LiteSpeed Cache Lazy Load - if ( class_exists( 'LiteSpeed_Cache' ) ) { - $attr['data-no-lazy'] = 1; - } + // Smush Lazy Load + if ( class_exists( 'Smush\Core\Modules\Lazy' ) ) { + $attr['class'] .= ' no-lazyload'; } - return $attr; + // LiteSpeed Cache Lazy Load + if ( class_exists( 'LiteSpeed_Cache' ) || class_exists( 'LiteSpeed\Media' ) ) { + $attr['data-no-lazy'] = 1; + } + // WP 5.5 + $attr['loading'] = false; } - endif; - add_filter( 'wp_get_attachment_image_attributes', 'siteorigin_north_lazy_load_exclude', 10, 2 ); + return $attr; + } endif; +add_filter( 'wp_get_attachment_image_attributes', 'siteorigin_north_lazy_load_exclude', 10, 2 ); if ( ! function_exists( 'siteorigin_north_the_post_navigation' ) ) : /** diff --git a/readme.txt b/readme.txt index 85466cf8..9f9c636a 100644 --- a/readme.txt +++ b/readme.txt @@ -103,6 +103,12 @@ Original design files are available on [Google Drive](https://drive.google.com/f == Changelog == += 1.7.14 - 07 September 2020 = +* Updated lazy load exclusion functionality for the logo. +* Fixed the Page Template Settings Page Title setting for WooCommerce archive pages. +* Removed `$cat_count` from the WooCommerce meta underline template. +* Updated SiteOrigin Settings. + = 1.7.13 - 01 August 2020 = * Updated Panels Lite. * Minor PHP formatting enhancements. diff --git a/searchform.php b/searchform.php index b90267cf..85cbac04 100644 --- a/searchform.php +++ b/searchform.php @@ -1,5 +1,5 @@
- + diff --git a/woocommerce/functions.php b/woocommerce/functions.php index 0390496e..6dc6597c 100644 --- a/woocommerce/functions.php +++ b/woocommerce/functions.php @@ -113,7 +113,7 @@ function siteorigin_north_woocommerce_enqueue_scripts( ){ if( is_woocommerce() ) { wp_enqueue_script( 'siteorigin-north-woocommerce', get_template_directory_uri() . '/js/woocommerce.js', array( 'jquery' ), SITEORIGIN_THEME_VERSION ); - wp_localize_script( 'siteorigin-north-woocommerce', 'so_ajax', array ( 'ajaxurl' => admin_url( 'admin-ajax.php' ) ) ); + wp_localize_script( 'siteorigin-north-woocommerce', 'so_ajax', array ( 'ajaxurl' => admin_url( 'admin-ajax.php' ) ) ); } } endif; @@ -123,12 +123,20 @@ function siteorigin_north_woocommerce_enqueue_scripts( ){ /** * Define the number of columns in the loop. */ -function siteorigin_north_woocommerce_loop_shop_columns(){ +function siteorigin_north_woocommerce_loop_shop_columns() { return 3; } endif; add_filter('loop_shop_columns', 'siteorigin_north_woocommerce_loop_shop_columns'); +/** + * Filter the archive page title. + */ +function siteorigin_north_woocommerce_archive_title() { + if ( siteorigin_page_setting( 'page_title' ) ) return true; +} +add_filter( 'woocommerce_show_page_title', 'siteorigin_north_woocommerce_archive_title' ); + if ( ! function_exists( 'siteorigin_north_woocommerce_related_product_args' ) ) : /** * Define the number of columns/posts_per_page for related products. @@ -258,7 +266,7 @@ function so_product_quick_view_ajax() { * Return a standardised PayPal PNG icon. */ function siteorigin_north_paypal_icon() { - return get_template_directory_uri() . '/woocommerce/images/paypal-icon.png'; + return get_template_directory_uri() . '/woocommerce/images/paypal-icon.png'; } add_filter( 'woocommerce_paypal_icon', 'siteorigin_north_paypal_icon' ); endif; diff --git a/woocommerce/single-product/meta-undertitle.php b/woocommerce/single-product/meta-undertitle.php index cff9a676..3916ef73 100644 --- a/woocommerce/single-product/meta-undertitle.php +++ b/woocommerce/single-product/meta-undertitle.php @@ -12,7 +12,6 @@ } global $post, $product; -$cat_count = sizeof( get_the_terms( $post->ID, 'product_cat' ) ); ?>