Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
11/27/2023 10:55:27 PM (16 months ago)
Author:
imath
Message:

Introduce a new Theme Compat feature firstly designed for Block Themes

NB : this feature is also only available in the BP Nouveau template pack.

The Priority Navigations theme compat feature is used to make sure BP Single items primary and secondary navigations are displayed on a single row/line no matter how many items these navigations are containing.
When there's not enough space to display all the items on this row/line, an ellipsis is inserted and hovering on it shows the remaining nav items into a dropdown menu.

This commit also make sure the BP Customizer sections are neutralized so that the Customizer is not loaded on front-end when a Block Theme is active to start complying with the fact these kind of themes are not using the Customizer.

See #9030
See https://github.com/buddypress/buddypress/pull/197

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-templates/bp-nouveau/includes/members/loader.php

    r13461 r13652  
    44 *
    55 * @since 3.0.0
    6  * @version 6.0.0
     6 * @version 12.0.0
    77 */
    88
     
    8181        add_action( 'dynamic_sidebar_before', array( $this, 'user_home_sidebar_set' ), 10, 1 );
    8282        add_action( 'dynamic_sidebar_after', array( $this, 'user_home_sidebar_unset' ), 10, 1 );
     83
     84        // Priority navs for Block Themes.
     85        add_action( 'bp_member_primary_nav', 'bp_nouveau_hidden_primary_nav' );
     86        add_action( 'bp_member_secondary_nav', 'bp_nouveau_hidden_secondary_nav' );
    8387    }
    8488
Note: See TracChangeset for help on using the changeset viewer.