Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
03/09/2024 10:55:43 AM (2 years 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/screens/single/admin/group-settings.php

    r13446 r13762  
    1212 *
    1313 * @since 1.0.0
     14 *
     15 * @return void
    1416 */
    1517function groups_screen_group_admin_settings() {
    1618
    17     if ( 'group-settings' != bp_get_group_current_admin_tab() )
    18         return false;
     19    if ( 'group-settings' !== bp_get_group_current_admin_tab() ) {
     20        return;
     21    }
    1922
    20     if ( ! bp_is_item_admin() )
    21         return false;
     23    if ( ! bp_is_item_admin() ) {
     24        return;
     25    }
    2226
    2327    $bp = buddypress();
     
    3842
    3943        // Check the nonce.
    40         if ( !check_admin_referer( 'groups_edit_group_settings' ) )
    41             return false;
     44        if ( ! check_admin_referer( 'groups_edit_group_settings' ) ) {
     45            return;
     46        }
    4247
    4348        $group_id = bp_get_current_group_id();
     
    101106    do_action( 'groups_screen_group_admin_settings', $bp->groups->current_group->id );
    102107
    103     /**
    104      * Filters the template to load for a group's admin/group-settings page.
    105      *
    106      * @since 1.0.0
    107      *
    108      * @param string $value Path to a group's admin/group-settings template.
    109      */
    110     bp_core_load_template( apply_filters( 'groups_template_group_admin_settings', 'groups/single/home' ) );
     108    $templates = array(
     109        /**
     110         * Filters the template to load for a group's admin/group-settings page.
     111         *
     112         * @since 1.0.0
     113         *
     114         * @param string $value Path to a group's admin/group-settings template.
     115         */
     116        apply_filters( 'groups_template_group_admin_settings', 'groups/single/home' ),
     117        'groups/single/index',
     118    );
     119
     120    bp_core_load_template( $templates );
    111121}
    112122add_action( 'bp_screens', 'groups_screen_group_admin_settings' );
Note: See TracChangeset for help on using the changeset viewer.