Skip to:
Content

BuddyPress.org

Ticket #5124: 5124.01.patch

File 5124.01.patch, 1.5 KB (added by r-a-y, 8 years ago)
  • bp-activity/bp-activity-actions.php

    add_action( 'bp_actions', 'bp_activity_action_my_groups_feed' ); 
    561561 * @return bool False on failure
    562562 */
    563563function bp_activity_action_mentions_feed() {
    564         global $wp_query;
    565 
    566564        if ( ! bp_activity_do_mentions() ) {
    567565                return false;
    568566        }
    569567
    570         if ( !bp_is_user_activity() || !bp_is_current_action( 'mentions' ) || !bp_is_action_variable( 'feed', 0 ) )
     568        if ( !bp_is_user_activity() || ! bp_is_current_action( 'mentions' ) || ! bp_is_action_variable( 'feed', 0 ) ) {
    571569                return false;
     570        }
     571
     572        // setup the feed
     573        buddypress()->activity->feed = new BP_Activity_Feed( array(
     574                'id'            => 'mentions',
    572575
    573         $wp_query->is_404 = false;
    574         status_header( 200 );
     576                /* translators: User mentions activity RSS title - "[Site Name] | [User Display Name] | Mentions" */
     577                'title'         => sprintf( __( '%1$s | %2$s | Mentions', 'buddypress' ), bp_get_site_name(), bp_get_displayed_user_fullname() ),
    575578
    576         include_once( 'feeds/bp-activity-mentions-feed.php' );
    577         die;
     579                'link'          => bp_displayed_user_domain() . bp_get_activity_slug() . '/mentions/',
     580                'description'   => sprintf( __( "Activity feed mentioning %s.", 'buddypress' ), bp_get_displayed_user_fullname() ),
     581                'activity_args' => array(
     582                        'search_terms' => '@' . bp_core_get_username( bp_displayed_user_id() )
     583                )
     584        ) );
    578585}
    579586add_action( 'bp_actions', 'bp_activity_action_mentions_feed' );
    580587