Skip to:
Content

BuddyPress.org


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

    r13446 r13762  
    1212 *
    1313 * @since 1.0.0
     14 *
     15 * @return void
    1416 */
    1517function groups_screen_group_admin_edit_details() {
    1618
    17     if ( 'edit-details' != bp_get_group_current_admin_tab() )
    18         return false;
     19    if ( 'edit-details' !== bp_get_group_current_admin_tab() ) {
     20        return;
     21    }
    1922
    2023    if ( bp_is_item_admin() ) {
     
    2528        if ( isset( $_POST['save'] ) ) {
    2629            // Check the nonce.
    27             if ( !check_admin_referer( 'groups_edit_group_details' ) )
    28                 return false;
     30            if ( ! check_admin_referer( 'groups_edit_group_details' ) ) {
     31                return;
     32            }
    2933
    3034            $group_notify_members = isset( $_POST['group-notify-members'] ) ? (int) $_POST['group-notify-members'] : 0;
     
    7175        do_action( 'groups_screen_group_admin_edit_details', $bp->groups->current_group->id );
    7276
    73         /**
    74          * Filters the template to load for a group's admin/edit-details page.
    75          *
    76          * @since 1.0.0
    77          *
    78          * @param string $value Path to a group's admin/edit-details template.
    79          */
    80         bp_core_load_template( apply_filters( 'groups_template_group_admin', 'groups/single/home' ) );
     77        $templates = array(
     78            /**
     79             * Filters the template to load for a group's admin/edit-details page.
     80             *
     81             * @since 1.0.0
     82             *
     83             * @param string $value Path to a group's admin/edit-details template.
     84             */
     85            apply_filters( 'groups_template_group_admin', 'groups/single/home' ),
     86            'groups/single/index',
     87        );
     88
     89        bp_core_load_template( $templates );
    8190    }
    8291}
Note: See TracChangeset for help on using the changeset viewer.