bp_activity_action_favorites_feed

Load a user's favorites feed.

Description

bp_activity_action_favorites_feed(); 

Usage

  1. if ( !function_exists( 'bp_activity_action_favorites_feed' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'buddypress/bp-activity/bp-activity-actions.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = bp_activity_action_favorites_feed(); 
  7.  

Defined (1)

The function is defined in the following location(s).

/bp-activity/bp-activity-actions.php  
  1. function bp_activity_action_favorites_feed() { 
  2. if ( ! bp_is_user_activity() || ! bp_is_current_action( 'favorites' ) || ! bp_is_action_variable( 'feed', 0 ) ) { 
  3. return false; 
  4.  
  5. // Get displayed user's favorite activity IDs. 
  6. $fav_ids = implode( ', ', (array) $favs ); 
  7.  
  8. // Setup the feed. 
  9. buddypress)->activity->feed = new BP_Activity_Feed( array( 
  10. 'id' => 'favorites',  
  11.  
  12. /** translators: User activity favorites RSS title - "[Site Name] | [User Display Name] | Favorites" */ 
  13. 'title' => sprintf( __( '%1$s | %2$s | Favorites', buddypress ), bp_get_site_name(), bp_get_displayed_user_fullname() ),  
  14.  
  15. 'link' => bp_displayed_user_domain() . bp_get_activity_slug() . '/favorites/',  
  16. 'description' => sprintf( __( "Activity feed of %s's favorites.", buddypress ), bp_get_displayed_user_fullname() ),  
  17. 'activity_args' => 'include=' . $fav_ids 
  18. ) );