[ Index ] |
PHP Cross Reference of BuddyPress |
[Summary view] [Print] [Text view]
1 <?php 2 /** 3 * Groups: RSS feed action 4 * 5 * @package BuddyPress 6 * @subpackage GroupActions 7 * @since 3.0.0 8 */ 9 10 /** 11 * Load the activity feed for the current group. 12 * 13 * @since 1.2.0 14 * 15 * @return false|null False on failure. 16 */ 17 function groups_action_group_feed() { 18 19 // Get current group. 20 $group = groups_get_current_group(); 21 22 if ( ! bp_is_active( 'activity' ) || ! bp_is_groups_component() || ! $group || ! bp_is_current_action( 'feed' ) ) 23 return false; 24 25 // If group isn't public or if logged-in user is not a member of the group, do 26 // not output the group activity feed. 27 if ( ! bp_group_is_visible( $group ) ) { 28 return false; 29 } 30 31 // Set up the feed. 32 buddypress()->activity->feed = new BP_Activity_Feed( array( 33 'id' => 'group', 34 35 /* translators: 1: Site Name. 2:Group Name. */ 36 'title' => sprintf( _x( '%1$s | %2$s | Activity', 'Group activity RSS title', 'buddypress' ), bp_get_site_name(), bp_get_current_group_name() ), 37 38 'link' => bp_get_group_permalink( $group ), 39 40 /* translators: %s: Group Name. */ 41 'description' => sprintf( __( "Activity feed for the group, %s.", 'buddypress' ), bp_get_current_group_name() ), 42 43 'activity_args' => array( 44 'object' => buddypress()->groups->id, 45 'primary_id' => bp_get_current_group_id(), 46 'display_comments' => 'threaded' 47 ) 48 ) ); 49 } 50 add_action( 'bp_actions', 'groups_action_group_feed' );
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Sun Dec 22 01:00:54 2024 | Cross-referenced by PHPXref 0.7.1 |