Changeset 4273
- Timestamp:
- 04/24/2011 03:21:18 AM (13 years ago)
- Location:
- trunk/bp-xprofile
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-xprofile/bp-xprofile-activity.php
r4249 r4273 103 103 return apply_filters( 'xprofile_register_activity_action', bp_activity_set_action( $bp->profile->id, $key, $value ), $key, $value ); 104 104 } 105 106 /** 107 * Adds an activity stream item when a user has uploaded a new avatar. 108 * 109 * @package BuddyPress XProfile 110 * @global $bp The global BuddyPress settings variable created in bp_core_setup_globals() 111 * @uses bp_activity_add() Adds an entry to the activity component tables for a specific activity 112 */ 113 function bp_xprofile_new_avatar_activity() { 114 global $bp; 115 116 if ( !bp_is_active( 'activity' ) ) 117 return false; 118 119 $user_id = apply_filters( 'bp_xprofile_new_avatar_user_id', $bp->displayed_user->id ); 120 121 $userlink = bp_core_get_userlink( $user_id ); 122 123 bp_activity_add( array( 124 'user_id' => $user_id, 125 'action' => apply_filters( 'bp_xprofile_new_avatar_action', sprintf( __( '%s uploaded a new profile picture', 'buddypress' ), $userlink ), $user_id ), 126 'component' => 'profile', 127 'type' => 'new_avatar' 128 ) ); 129 } 130 add_action( 'xprofile_avatar_uploaded', 'bp_xprofile_new_avatar_activity' ); 105 131 ?> -
trunk/bp-xprofile/bp-xprofile-loader.php
r4211 r4273 38 38 'cache', 39 39 'actions', 40 'activity', 40 41 'screens', 41 42 'classes',
Note: See TracChangeset
for help on using the changeset viewer.