From 272b7c77862b99d4f15a6927a15758c355ae574a Mon Sep 17 00:00:00 2001 From: Alex S <17275120+AlexGStapleton@users.noreply.github.com> Date: Wed, 7 Aug 2024 13:20:16 +1200 Subject: [PATCH 01/10] Add `siteorigin_north_sticky_topbar` --- functions.php | 2 ++ js/north.js | 58 +++++++++++++++++++++++++++++++++++++++------------ 2 files changed, 47 insertions(+), 13 deletions(-) diff --git a/functions.php b/functions.php index 8918b22..71be7a5 100644 --- a/functions.php +++ b/functions.php @@ -312,6 +312,7 @@ function siteorigin_north_scripts() { // Add settings variables used by main theme JS. $logo_sticky_scale = apply_filters( 'siteorigin_north_logo_sticky_scale', 0.755 ); + $sticky_topbar = apply_filters( 'siteorigin_north_sticky_topbar', false ); wp_localize_script( 'siteorigin-north-script', 'siteoriginNorth', @@ -320,6 +321,7 @@ function siteorigin_north_scripts() { 'logoScale' => is_numeric( $logo_sticky_scale ) ? $logo_sticky_scale : 0.755, 'collapse' => siteorigin_setting( 'responsive_menu_breakpoint' ), 'fitvids' => siteorigin_setting( 'responsive_fitvids' ), + 'stickyTopbar' => $sticky_topbar, ) ); diff --git a/js/north.js b/js/north.js index cfc14f4..b67a248 100644 --- a/js/north.js +++ b/js/north.js @@ -124,7 +124,7 @@ $( this ).on( 'click touchend', function( e ) { var link = $( this ); e.stopPropagation(); - + if ( e.type == 'click' ) { return; } @@ -402,14 +402,22 @@ $tb = $( '#topbar' ), $wpab = $( '#wpadminbar' ); - // Sticky header shadow. - var smShadow = function() { - if ( $( window ).scrollTop() > 0 ) { - $( $mh ).addClass( 'floating' ); - } else { - $( $mh ).removeClass( 'floating' ); - } - }; + const whenToStickyMh = function() { + const wpabMobile = $( window ).width() <= 600; + const wpabHeight = $wpab.length && ! wpabMobile ? $wpab.outerHeight() : 0; + const tbHeight = $tb.length && siteoriginNorth.stickyTopbar ? $tb.outerHeight() : 0; + + return wpabHeight + tbHeight; + }; + + // Sticky header shadow. + var smShadow = function() { + if ( $( window ).scrollTop() > whenToStickyMh ) { + $( $mh ).addClass( 'floating' ); + } else { + $( $mh ).removeClass( 'floating' ); + } + }; smShadow(); $( window ).on( 'scroll', smShadow ); @@ -430,7 +438,13 @@ $( 'body' ).removeClass( 'topbar-out' ); } - if ( $( 'body' ).hasClass( 'no-topbar' ) || ( ! $( 'body' ).hasClass( 'no-topbar' ) && $( 'body' ).hasClass( 'topbar-out' ) ) ) { + if ( + $( 'body' ).hasClass( 'no-topbar' ) || + ( + ! $( 'body' ).hasClass( 'no-topbar' ) && + $( 'body' ).hasClass( 'topbar-out' ) + ) + ) { $mh.css( 'position', 'fixed' ); } else if ( ! $( 'body' ).hasClass( 'no-topbar' ) && ! $( 'body' ).hasClass( 'topbar-out' ) ) { $mh.css( 'position', 'absolute' ); @@ -455,9 +469,27 @@ $mh.removeClass( 'mobile-sticky-menu' ); } } - - smSetup(); - $( window ).on( 'resize scroll', smSetup ); + + if ( whenToStickyMh() === 0 ) { + smSetup(); + $( window ).on( 'resize scroll', smSetup ); + } else { + const tbMhStickyPosition = function() { + const wpabMobile = $( window ).width() <= 600; + $tb.css( { + 'position': 'sticky', + 'top': $wpab.length && ! wpabMobile ? $wpab.outerHeight() : 0, + } ); + + $mh.css( { + 'position': 'sticky', + 'top': whenToStickyMh(), + } ); + }; + + tbMhStickyPosition(); + $( window ).on( 'resize', tbMhStickyPosition ); + } } // Adjust for sticky header when linking from external anchors. From f924c9c8d49de47df2c416c96ca45e1e810541a0 Mon Sep 17 00:00:00 2001 From: Alex S <17275120+AlexGStapleton@users.noreply.github.com> Date: Thu, 8 Aug 2024 12:03:22 +1200 Subject: [PATCH 02/10] Swap out const with var to resolve build issue Not too sure why the theme build doesn't allow for it. --- js/north.js | 33 +++++++++++++++++---------------- 1 file changed, 17 insertions(+), 16 deletions(-) diff --git a/js/north.js b/js/north.js index b67a248..f9b3c18 100644 --- a/js/north.js +++ b/js/north.js @@ -402,22 +402,23 @@ $tb = $( '#topbar' ), $wpab = $( '#wpadminbar' ); - const whenToStickyMh = function() { - const wpabMobile = $( window ).width() <= 600; - const wpabHeight = $wpab.length && ! wpabMobile ? $wpab.outerHeight() : 0; - const tbHeight = $tb.length && siteoriginNorth.stickyTopbar ? $tb.outerHeight() : 0; + var whenToStickyMh = function() { + var wpabMobile = $( window ).width() <= 600; + var wpabHeight = $wpab.length && ! wpabMobile ? $wpab.outerHeight() : 0; + var tbHeight = $tb.length && siteoriginNorth.stickyTopbar ? $tb.outerHeight() : 0; - return wpabHeight + tbHeight; - }; + return wpabHeight + tbHeight; + }; + + // Sticky header shadow. + var smShadow = function() { + if ( $( window ).scrollTop() > whenToStickyMh ) { + $( $mh ).addClass( 'floating' ); + } else { + $( $mh ).removeClass( 'floating' ); + } + }; - // Sticky header shadow. - var smShadow = function() { - if ( $( window ).scrollTop() > whenToStickyMh ) { - $( $mh ).addClass( 'floating' ); - } else { - $( $mh ).removeClass( 'floating' ); - } - }; smShadow(); $( window ).on( 'scroll', smShadow ); @@ -474,8 +475,8 @@ smSetup(); $( window ).on( 'resize scroll', smSetup ); } else { - const tbMhStickyPosition = function() { - const wpabMobile = $( window ).width() <= 600; + var tbMhStickyPosition = function() { + var wpabMobile = $( window ).width() <= 600; $tb.css( { 'position': 'sticky', 'top': $wpab.length && ! wpabMobile ? $wpab.outerHeight() : 0, From b2e19192edc60773600a41de427832e365cfc3ed Mon Sep 17 00:00:00 2001 From: Andrew Misplon Date: Tue, 13 Aug 2024 17:40:59 +0200 Subject: [PATCH 03/10] Updated Tested up to tags --- readme.txt | 2 +- sass/style.scss | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/readme.txt b/readme.txt index f9f6d0a..13c09b3 100644 --- a/readme.txt +++ b/readme.txt @@ -4,7 +4,7 @@ Contributors: siteorigin Tags: one-column, two-columns, left-sidebar, right-sidebar, custom-background, custom-colors, custom-menu, custom-logo, featured-images, footer-widgets, full-width-template, post-formats, rtl-language-support, sticky-post, theme-options, threaded-comments, translation-ready, blog, e-commerce -Tested up to: 6.5 +Tested up to: 6.6 Requires at least: 4.7 Requires PHP: 7.0.0 License: GPLv2 or later diff --git a/sass/style.scss b/sass/style.scss index b2585b1..693df21 100644 --- a/sass/style.scss +++ b/sass/style.scss @@ -5,7 +5,7 @@ Author URI: https://siteorigin.com/ Theme URI: https://siteorigin.com/theme/north/ Description: Inspired by the elegant majesty and purity of the Swiss Alps and built with business owners in mind, North is the star in the SiteOrigin sky. With easy-to-use options, classic lines and a minimal feel, North feels visually limitless and technically effortless. It's fully responsive and retina ready. Some key features are its responsive menu, gorgeous animations and tight integration with all the major plugins you've come to rely on. You can use it to create a business website using SiteOrigin Page Builder and our Widgets Bundle. You can also build a full ecommerce store though North's WooCommerce integration. We offer free and premium support on our support forums (http://siteorigin.com/thread/). Version: dev -Tested up to: 6.5 +Tested up to: 6.6 Requires at least: 4.7 Requires PHP: 7.0.0 License: GNU General Public License v2 or later From 103d121702bb44a852da570ea4b2a6f4fa7a6997 Mon Sep 17 00:00:00 2001 From: Andrew Misplon Date: Tue, 13 Aug 2024 17:41:39 +0200 Subject: [PATCH 04/10] Updated changelog --- readme.txt | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/readme.txt b/readme.txt index 13c09b3..15af47a 100644 --- a/readme.txt +++ b/readme.txt @@ -104,6 +104,39 @@ Original design files are available on [Google Drive](https://drive.google.com/f == Changelog == += 1.20.3 - 26 June 2024 = +* Updated Tested up to and required PHP tags. +* WooCommerce: Replaced Add to Cart template with filter. +* Updated SiteOrigin Settings. + += 1.20.2 - 11 February 2024 = +* FlexSlider: Removed unused font inclusion. +* Updated Tested up to tag. +* Updated SiteOrigin Settings submodule. + += 1.20.1 - 15 October 2023 = +* Updated SiteOrigin Settings. + += 1.20.0 - July 25 2023 = +* Removed the "cart.php" file in favor of using hooks for the WooCommerce cart page. +* Adjusted the action buttons in the WC Cart for better structuring and mobile responsiveness. +* Added new styles for the `.wc-buttons` class in the WC Cart. +* Updated the styling of the cart buttons in WooCommerce to accommodate a sidebar and to be full-width when the sidebar is not present. +* Added new functions `siteorigin_north_wc_cart_contents_after` and `siteorigin_north_wc_cart_contents` to modify the structure of the cart contents table in WooCommerce. + += 1.19.18 - 08 July 2023 = +* WooCommerce: Updated cart.php for WC `7.8.0`. +* Updated SiteOrigin Settings. + += 1.19.17 - 18 May 2023 = +* Breadcrumbs: Improved long breadcrumb display. +* Changed custom logo wrapper from `div` to `span` tag. +* Updated SiteOrigin Settings. + += 1.19.16 - 26 April 2023 = +* Resolved Settings missing text domain. +* WooCommerce: Correctly output Apply Coupon text. + = 1.19.15 - 09 April 2023 = * Moved breadcrumb functionality to SiteOrigin Settings framework. From 1c4706174b2b96bbf0d5a6c225c07108ce1622f7 Mon Sep 17 00:00:00 2001 From: Alex S <17275120+AlexGStapleton@users.noreply.github.com> Date: Fri, 16 Aug 2024 11:13:04 +1200 Subject: [PATCH 05/10] Fix Top Bar Being Sticky When It Shouldn't Be --- js/north.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/north.js b/js/north.js index f9b3c18..ea0949a 100644 --- a/js/north.js +++ b/js/north.js @@ -471,7 +471,7 @@ } } - if ( whenToStickyMh() === 0 ) { + if ( whenToStickyMh() === 0 || ! siteoriginNorth.stickyTopbar ) { smSetup(); $( window ).on( 'resize scroll', smSetup ); } else { From e2c25afc3909a9079d989a5f7dbc68b7a50b6596 Mon Sep 17 00:00:00 2001 From: Alex S <17275120+AlexGStapleton@users.noreply.github.com> Date: Sat, 24 Aug 2024 23:47:41 +1200 Subject: [PATCH 06/10] Update Settings --- inc/settings | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inc/settings b/inc/settings index 18403e8..8b28d13 160000 --- a/inc/settings +++ b/inc/settings @@ -1 +1 @@ -Subproject commit 18403e8b19bcadff4a32c485597f580bb539612e +Subproject commit 8b28d1359ad491e7aaf7e9e9e48a7951beef39f7 From 694df14908fa229e09e18aa904b5b2092bc772e7 Mon Sep 17 00:00:00 2001 From: Alex S <17275120+AlexGStapleton@users.noreply.github.com> Date: Tue, 17 Sep 2024 23:45:30 +1200 Subject: [PATCH 07/10] WC: Update Pagintation Version No Changed Required outside of the version bump --- woocommerce/loop/pagination.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/woocommerce/loop/pagination.php b/woocommerce/loop/pagination.php index 40f7d5b..a3c403a 100644 --- a/woocommerce/loop/pagination.php +++ b/woocommerce/loop/pagination.php @@ -4,7 +4,7 @@ * * @see https://docs.woocommerce.com/document/template-structure/ * - * @version 3.3.1 + * @version 9.3.0 */ if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly From 8afbdf75a414a98cf5a883b4866a0314d123051c Mon Sep 17 00:00:00 2001 From: Andrew Misplon Date: Tue, 17 Sep 2024 22:59:16 +0100 Subject: [PATCH 08/10] Updated Panels Lite --- inc/panels-lite | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inc/panels-lite b/inc/panels-lite index 092df37..6488fe5 160000 --- a/inc/panels-lite +++ b/inc/panels-lite @@ -1 +1 @@ -Subproject commit 092df37f0df77fb2ee7bc19ab7e9de2301ab2843 +Subproject commit 6488fe5cdfd428fab8a0157614be6a4490aee2b8 From 8ea9519a7744aef0cc5cd5835ac30c1e12ac5f22 Mon Sep 17 00:00:00 2001 From: Andrew Misplon Date: Tue, 17 Sep 2024 22:59:29 +0100 Subject: [PATCH 09/10] Update Build submodule --- build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build b/build index 348c40d..67edf55 160000 --- a/build +++ b/build @@ -1 +1 @@ -Subproject commit 348c40d1d8d15ddb108bde22effe29bcd100422a +Subproject commit 67edf5543f99ad617fe6e7e100b77a743aede236 From 4076b595de0e9d8be02227f7e9af2175dfd8bc62 Mon Sep 17 00:00:00 2001 From: Andrew Misplon Date: Wed, 18 Sep 2024 21:48:29 +0100 Subject: [PATCH 10/10] Changelog update --- readme.txt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/readme.txt b/readme.txt index 15af47a..5d44aa7 100644 --- a/readme.txt +++ b/readme.txt @@ -104,6 +104,11 @@ Original design files are available on [Google Drive](https://drive.google.com/f == Changelog == += 1.20.4 - 18 September 2024 = +* WooCommerce: Updated pagination template version number. +* Updated SiteOrigin Settings. +* Developer: Added `siteorigin_north_sticky_topbar`. + = 1.20.3 - 26 June 2024 = * Updated Tested up to and required PHP tags. * WooCommerce: Replaced Add to Cart template with filter.