Changeset 8190 for trunk/bp-activity/bp-activity-template.php
- Timestamp:
- 03/28/2014 10:52:14 PM (12 years ago)
- File:
-
- 1 edited
-
trunk/bp-activity/bp-activity-template.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-activity/bp-activity-template.php
r8142 r8190 2773 2773 } 2774 2774 2775 /** 2776 * Recurse through all activity comments and return the activity comment IDs. 2777 * 2778 * @since BuddyPress (2.0.0) 2779 * 2780 * @param array $activity Array of activities generated from {@link bp_activity_get()}. 2781 * @param array $activity_ids Used for recursion purposes in this function. 2782 * @return array 2783 */ 2784 function bp_activity_recurse_comments_activity_ids( $activity = array(), $activity_ids = array() ) { 2785 if ( is_array( $activity ) && ! empty( $activity['activities'] ) ) { 2786 $activity = $activity['activities'][0]; 2787 } 2788 2789 if ( ! empty( $activity->children ) ) { 2790 foreach ($activity->children as $child ) { 2791 $activity_ids[] = $child->id; 2792 2793 if( ! empty( $child->children ) ) { 2794 $activity_ids = bp_activity_recurse_comments_activity_ids( $child, $activity_ids ); 2795 } 2796 } 2797 } 2798 2799 return $activity_ids; 2800 } 2775 2801 2776 2802 /**
Note: See TracChangeset
for help on using the changeset viewer.