Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
02/15/2024 03:53:11 AM (2 years ago)
Author:
imath
Message:

BP Nouveau: repair the customizer panel to sort Members nav items

Changes introduced by the BP Rewrites API about how the Members nav items are registered and then set up generated a regression about this customizer panel.

In short, the bp_parse_query action is not fired while building the customizer's panels.

To bring back the possibility to sort the Members nav items from the BP Nouveau > Members Navigation panel, we now need to force the generation of the primary nav using the bp_get_component_navigations() function.

NB: this commit also prevents a notice error when sanitizing the navigation setting to sort items.

Props nitinp544, vapvarun

See #9095 (trunk)
Closes https://github.com/buddypress/buddypress/pull/230

File:
1 edited

Legend:

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

    r13718 r13726  
    44 *
    55 * @since 3.0.0
    6  * @version 12.0.0
     6 * @version 12.3.0
    77 */
    88
     
    753753 */
    754754function bp_nouveau_sanitize_nav_order( $option = '' ) {
    755     $option = explode( ',', $option );
     755    if ( ! is_array( $option ) ) {
     756        $option = explode( ',', $option );
     757    }
     758
    756759    return array_map( 'sanitize_key', $option );
    757760}
Note: See TracChangeset for help on using the changeset viewer.