Changeset 10134 for branches/2.3/src/bp-xprofile/bp-xprofile-activity.php
- Timestamp:
- 09/24/2015 10:28:21 AM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.3/src/bp-xprofile/bp-xprofile-activity.php
r9819 r10134 203 203 * Adds an activity stream item when a user has uploaded a new avatar. 204 204 * 205 * @since BuddyPress (1.0.0) 205 * @since 1.0.0 206 * @since 2.3.4 Add new parameter to get the user id the avatar was set for 206 207 * 207 208 * @package BuddyPress XProfile 208 209 * @uses bp_activity_add() Adds an entry to the activity component tables for a 209 210 * specific activity 210 */ 211 function bp_xprofile_new_avatar_activity() { 212 213 // Bail if activity component is not active 214 if ( ! bp_is_active( 'activity' ) ) { 215 return false; 211 * 212 * @param int $user_id The user id the avatar was set for 213 */ 214 function bp_xprofile_new_avatar_activity( $user_id = 0 ) { 215 216 // Bail if activity component is not active 217 if ( ! bp_is_active( 'activity' ) ) { 218 return false; 219 } 220 221 if ( empty( $user_id ) ) { 222 $user_id = bp_displayed_user_id(); 216 223 } 217 224 … … 219 226 * Filters the user ID when a user has uploaded a new avatar. 220 227 * 221 * @since BuddyPress (1.5.0)222 * 223 * @param int $ value ID of the displayed user.224 */ 225 $user_id = apply_filters( 'bp_xprofile_new_avatar_user_id', bp_displayed_user_id());228 * @since 1.5.0 229 * 230 * @param int $user_id ID of the user the avatar was set for. 231 */ 232 $user_id = apply_filters( 'bp_xprofile_new_avatar_user_id', $user_id ); 226 233 227 234 // Add the activity
Note: See TracChangeset
for help on using the changeset viewer.