Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
03/09/2024 11:07:30 AM (13 months ago)
Author:
imath
Message:

BP Standalone Block Themes: adapt xProfiles template hierarchy

  • Adds a members/single/index.html root template to the BP Standalone Theme hierarchy to be used by BP Standalone Block Themes in respect of WP Block Themes templating logic.

Fixes #9118
Closes https://github.com/buddypress/buddypress/pull/249
See https://github.com/buddypress/buddyvibes/pull/7

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-core/bp-core-catchuri.php

    r13752 r13767  
    219219 */
    220220function bp_core_catch_profile_uri() {
    221     if ( !bp_is_active( 'xprofile' ) ) {
    222 
    223         /**
    224          * Filters the path to redirect users to if XProfile is not enabled.
    225          *
    226          * @since 1.0.0
    227          *
    228          * @param string $value Path to redirect users to.
    229          */
    230         bp_core_load_template( apply_filters( 'bp_core_template_display_profile', 'members/single/home' ) );
     221    if ( ! bp_is_active( 'xprofile' ) ) {
     222
     223        $templates = array(
     224            /**
     225             * Filters the path to redirect users to if XProfile is not enabled.
     226             *
     227             * @since 1.0.0
     228             *
     229             * @param string $value Path to redirect users to.
     230             */
     231            apply_filters( 'bp_core_template_display_profile', 'members/single/home' ),
     232            'members/single/index',
     233        );
     234
     235        bp_core_load_template( $templates );
    231236    }
    232237}
Note: See TracChangeset for help on using the changeset viewer.