From 2df4305a694dcb02a253744a7e154cf104e99472 Mon Sep 17 00:00:00 2001 From: Rachel Vasquez Date: Fri, 20 Mar 2026 13:11:00 -0400 Subject: [PATCH 01/20] back to top button --- functions.php | 29 +++++++++++++++++++++++++++++ js/memberlite.js | 1 + 2 files changed, 30 insertions(+) diff --git a/functions.php b/functions.php index d4497d6a..e64c055b 100644 --- a/functions.php +++ b/functions.php @@ -77,6 +77,35 @@ function memberlite_admin_enqueue_scripts() { } add_action( 'admin_enqueue_scripts', 'memberlite_admin_enqueue_scripts' ); +/** + * Output the floating back-to-top button in wp_footer. + * Visibility is controlled by JS (scroll position + IntersectionObserver on the footer). + */ +function memberlite_floating_back_to_top() { + global $memberlite_defaults; + + if ( empty( get_theme_mod( 'memberlite_back_to_top', $memberlite_defaults['memberlite_back_to_top'] ) ) ) { + return; + } + + $label = apply_filters( + 'memberlite_back_to_top', + '' . esc_html__( 'Back to Top', 'memberlite' ) . '' + ); + + if ( empty( $label ) ) { + return; + } + + $allowed_html = array( + 'i' => array( 'class' => array(), 'aria-hidden' => array() ), + 'span' => array( 'class' => array() ), + ); + + echo '' . wp_kses( $label, $allowed_html ) . ''; +} +add_action( 'wp_footer', 'memberlite_floating_back_to_top' ); + /** * Get the selected font slug for a given font type. * diff --git a/js/memberlite.js b/js/memberlite.js index 09b3752d..4fe355c8 100644 --- a/js/memberlite.js +++ b/js/memberlite.js @@ -306,6 +306,7 @@ function updateStickyState(stickyNav, stickyTop, adminBarHeight) { function initBackToTop() { const btn = document.querySelector('.memberlite-back-to-top.floating'); + if (!btn) return; const SCROLL_THRESHOLD = 300; From fd6e0c08ed9e54dc61b6714ea35bcdcc1d905840 Mon Sep 17 00:00:00 2001 From: Rachel Vasquez Date: Wed, 25 Mar 2026 09:01:41 -0400 Subject: [PATCH 02/20] move the back to top function to the customizer.php file --- functions.php | 29 ----------------------------- 1 file changed, 29 deletions(-) diff --git a/functions.php b/functions.php index e64c055b..d4497d6a 100644 --- a/functions.php +++ b/functions.php @@ -77,35 +77,6 @@ function memberlite_admin_enqueue_scripts() { } add_action( 'admin_enqueue_scripts', 'memberlite_admin_enqueue_scripts' ); -/** - * Output the floating back-to-top button in wp_footer. - * Visibility is controlled by JS (scroll position + IntersectionObserver on the footer). - */ -function memberlite_floating_back_to_top() { - global $memberlite_defaults; - - if ( empty( get_theme_mod( 'memberlite_back_to_top', $memberlite_defaults['memberlite_back_to_top'] ) ) ) { - return; - } - - $label = apply_filters( - 'memberlite_back_to_top', - '' . esc_html__( 'Back to Top', 'memberlite' ) . '' - ); - - if ( empty( $label ) ) { - return; - } - - $allowed_html = array( - 'i' => array( 'class' => array(), 'aria-hidden' => array() ), - 'span' => array( 'class' => array() ), - ); - - echo '' . wp_kses( $label, $allowed_html ) . ''; -} -add_action( 'wp_footer', 'memberlite_floating_back_to_top' ); - /** * Get the selected font slug for a given font type. * From 5076d24ca8918ad8f0761ac40bcb705bc8145544 Mon Sep 17 00:00:00 2001 From: Rachel Vasquez Date: Thu, 26 Mar 2026 14:40:44 -0400 Subject: [PATCH 03/20] in the process of bringing over pieces from the original footer-customizer-updates branch, except we want to support both the legacy/PHP footer and our patterned version --- footer.php | 8 +++++ inc/customizer.php | 40 ++++++++++++++++++++++- inc/variations.php | 79 ++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 126 insertions(+), 1 deletion(-) diff --git a/footer.php b/footer.php index 2baaef17..99d92f49 100644 --- a/footer.php +++ b/footer.php @@ -16,8 +16,16 @@