Skip to:
Content

BuddyPress.org


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

BP Standalone Block Themes: adapt Activity 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 an activity/single 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-activity/screens/mentions.php

    r11885 r13759  
    2323        do_action( 'bp_activity_screen_mentions' );
    2424
    25         /**
    26          * Filters the template to load for the "Mentions" screen.
    27          *
    28          * @since 1.2.0
    29          *
    30          * @param string $template Path to the activity template to load.
    31          */
    32         bp_core_load_template( apply_filters( 'bp_activity_template_mention_activity', 'members/single/home' ) );
     25        $templates = array(
     26                /**
     27                 * Filters the template to load for the "Mentions" screen.
     28                 *
     29                 * @since 1.2.0
     30                 *
     31                 * @param string $template Path to the activity template to load.
     32                 */
     33                apply_filters( 'bp_activity_template_mention_activity', 'members/single/home' ),
     34                'members/single/index',
     35        );
     36
     37        bp_core_load_template( $templates );
    3338}
    3439
     
    3843 * @since 1.5.0
    3944 *
     45 * @return void
    4046 */
    4147function bp_activity_reset_my_new_mentions() {
    42         if ( bp_is_my_profile() )
    43                 bp_activity_clear_new_mentions( bp_loggedin_user_id() );
     48        if ( ! bp_is_my_profile() ) {
     49                return;
     50        }
     51
     52        bp_activity_clear_new_mentions( bp_loggedin_user_id() );
    4453}
    4554add_action( 'bp_activity_screen_mentions', 'bp_activity_reset_my_new_mentions' );
Note: See TracChangeset for help on using the changeset viewer.