Skip to:
Content

BuddyPress.org

Changeset 7335


Ignore:
Timestamp:
08/05/2013 02:12:44 PM (11 years ago)
Author:
boonebgorges
Message:

Implement BP_Activity_Feed for activity mentions feed

This particular feed was missed during the original implementation of
BP_Activity_Feed. See #5020, r7207. As a result, the mentions feed was
attempting to load from a separate feed template file that no longer
exists. This broke the feed and filled the error logs with warnings.

Fixes #5124

Props r-a-y

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/1.8/bp-activity/bp-activity-actions.php

    r7217 r7335  
    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 ) )
    571         return false;
    572 
    573     $wp_query->is_404 = false;
    574     status_header( 200 );
    575 
    576     include_once( 'feeds/bp-activity-mentions-feed.php' );
    577     die;
     568    if ( !bp_is_user_activity() || ! bp_is_current_action( 'mentions' ) || ! bp_is_action_variable( 'feed', 0 ) ) {
     569        return false;
     570    }
     571
     572    // setup the feed
     573    buddypress()->activity->feed = new BP_Activity_Feed( array(
     574        'id'            => 'mentions',
     575
     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() ),
     578
     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' );
Note: See TracChangeset for help on using the changeset viewer.