Changeset 4553
- Timestamp:
- 06/22/2011 11:40:13 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-activity/bp-activity-functions.php
r4378 r4553 68 68 if ( !$new_mentions = get_user_meta( $user_id, bp_get_user_meta_key( 'bp_new_mentions' ), true ) ) 69 69 $new_mentions = array(); 70 70 71 71 switch ( $action ) { 72 72 case 'delete' : … … 76 76 } 77 77 break; 78 78 79 79 case 'add' : 80 80 default : … … 84 84 break; 85 85 } 86 87 // Get an updated mention count 86 87 // Get an updated mention count 88 88 $new_mention_count = count( $new_mentions ); 89 89 90 90 // Resave the user_meta 91 91 update_user_meta( $user_id, bp_get_user_meta_key( 'bp_new_mention_count' ), $new_mention_count ); … … 876 876 } 877 877 878 /** 879 * Get the permalink for a single activity item 880 * 881 * When only the $activity_id param is passed, BP has to instantiate a new BP_Activity_Activity 882 * object. To save yourself some processing overhead, be sure to pass the full $activity_obj param 883 * as well, if you already have it available. 884 * 885 * @package BuddyPress 886 * 887 * @uses apply_filters_ref_array() Filter 'bp_activity_get_permalink' to modify the function output 888 * @param int $activity_id The unique id of the activity object 889 * @param obj $activity_obj (optional) The activity object 890 * @return str $link Permalink for the activity item 891 */ 878 892 function bp_activity_get_permalink( $activity_id, $activity_obj = false ) { 879 893 global $bp; … … 891 905 } 892 906 893 return apply_filters ( 'bp_activity_get_permalink', $link);907 return apply_filters_ref_array( 'bp_activity_get_permalink', array( $link, &$activity_obj ) ); 894 908 } 895 909
Note: See TracChangeset
for help on using the changeset viewer.