Skip to:
Content

BuddyPress.org

Changeset 13760


Ignore:
Timestamp:
03/09/2024 10:49:34 AM (2 years ago)
Author:
imath
Message:

BP Standalone Block Themes: adapt Blogs 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.

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

Location:
trunk/src/bp-blogs/screens
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-blogs/screens/create.php

    r12514 r13760  
    1212 *
    1313 * @since 1.0.0
     14 *
     15 * @return void
    1416 */
    1517function bp_blogs_screen_create_a_blog() {
    1618
    1719        if ( ! is_multisite() || ! bp_is_blogs_component() || ! bp_is_current_action( 'create' ) || ! is_user_logged_in() || ! bp_blog_signup_enabled() ) {
    18                 return false;
     20                return;
    1921        }
    2022
  • trunk/src/bp-blogs/screens/directory.php

    r11934 r13760  
    1111 * Load the top-level Blogs directory.
    1212 *
    13  * @since 1.5-beta-1
     13 * @since 1.0.0
    1414 */
    1515function bp_blogs_screen_index() {
  • trunk/src/bp-blogs/screens/my-blogs.php

    r11934 r13760  
    1212 *
    1313 * @since 1.0.0
     14 *
     15 * @return void
    1416 */
    1517function bp_blogs_screen_my_blogs() {
    16         if ( !is_multisite() )
    17                 return false;
     18        if ( ! is_multisite() ) {
     19                return;
     20        }
    1821
    1922        /**
     
    2427        do_action( 'bp_blogs_screen_my_blogs' );
    2528
    26         bp_core_load_template( apply_filters( 'bp_blogs_template_my_blogs', 'members/single/home' ) );
     29        $templates = array(
     30                /**
     31                 * Filters the template to load for the "My blogs" screen.
     32                 *
     33                 * @since 1.0.0
     34                 *
     35                 * @param string $template Path to the activity template to load.
     36                 */
     37                apply_filters( 'bp_blogs_template_my_blogs', 'members/single/home' ),
     38                'members/single/index',
     39        );
     40
     41        bp_core_load_template( $templates );
    2742}
Note: See TracChangeset for help on using the changeset viewer.