Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
03/09/2024 10:55:43 AM (20 months ago)
Author:
imath
Message:

BP Standalone Block Themes: adapt Groups 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.
  • Adds a groups/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.

See #9118
See 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-groups/actions/leave-group.php

    r13503 r13762  
    1919 * @since 1.2.4
    2020 *
    21  * @return bool
     21 * @return void
    2222 */
    2323function groups_action_leave_group() {
    2424    if ( ! bp_is_single_item() || ! bp_is_groups_component() || ! bp_is_current_action( 'leave-group' ) ) {
    25         return false;
     25        return;
    2626    }
    2727
    2828    // Nonce check.
    2929    if ( ! check_admin_referer( 'groups_leave_group' ) ) {
    30         return false;
     30        return;
    3131    }
    3232
     
    5656    }
    5757
    58     /** This filter is documented in bp-groups/bp-groups-actions.php */
    59     bp_core_load_template( apply_filters( 'groups_template_group_home', 'groups/single/home' ) );
     58    $templates = array(
     59        /** This filter is documented in bp-groups/actions/join.php */
     60        apply_filters( 'groups_template_group_home', 'groups/single/home' ),
     61        'groups/single/index',
     62    );
     63
     64    bp_core_load_template( $templates );
    6065}
    6166add_action( 'bp_actions', 'groups_action_leave_group' );
Note: See TracChangeset for help on using the changeset viewer.