Changeset 8126
- Timestamp:
- 03/13/2014 07:05:27 PM (11 years ago)
- Location:
- trunk
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-activity/bp-activity-functions.php
r8125 r8126 913 913 } 914 914 915 return call_user_func( buddypress()->activity->actions->{$activity->component}->{$activity->type}['format_callback'], $activity ); 915 // We apply the format_callback as a filter 916 add_filter( 'bp_activity_generate_action_string', buddypress()->activity->actions->{$activity->component}->{$activity->type}['format_callback'], 10, 2 ); 917 918 // Generate the action string (run through the filter defined above) 919 $action = apply_filters( 'bp_activity_generate_action_string', $activity->action, $activity ); 920 921 // Remove the filter for future activity items 922 remove_filter( 'bp_activity_generate_action_string', buddypress()->activity->actions->{$activity->component}->{$activity->type}['format_callback'], 10, 2 ); 923 924 return $action; 916 925 } 917 926 … … 921 930 * @since BuddyPress (2.0.0) 922 931 * 932 * @param string $action Static activity action. 923 933 * @param object $activity Activity data object. 924 934 * @return string 925 935 */ 926 function bp_activity_format_activity_action_activity_update( $acti vity ) {936 function bp_activity_format_activity_action_activity_update( $action, $activity ) { 927 937 $action = sprintf( __( '%s posted an update', 'buddypress' ), bp_core_get_userlink( $activity->user_id ) ); 928 938 return apply_filters( 'bp_activity_new_update_action', $action, $activity ); … … 934 944 * @since BuddyPress (2.0.0) 935 945 * 946 * @param string $action Static activity action. 936 947 * @param object $activity Activity data object. 937 948 * @return string 938 949 */ 939 function bp_activity_format_activity_action_activity_comment( $acti vity ) {950 function bp_activity_format_activity_action_activity_comment( $action, $activity ) { 940 951 $action = sprintf( __( '%s posted a new activity comment', 'buddypress' ), bp_core_get_userlink( $activity->user_id ) ); 941 952 return apply_filters( 'bp_activity_comment_action', $action, $activity ); -
trunk/bp-blogs/bp-blogs-activity.php
r8125 r8126 60 60 * @since BuddyPress (2.0.0) 61 61 * 62 * @param string $action Static activity action. 62 63 * @param obj $activity Activity data object. 63 64 */ 64 function bp_blogs_format_activity_action_new_blog( $acti vity ) {65 function bp_blogs_format_activity_action_new_blog( $action, $activity ) { 65 66 $blog_url = bp_blogs_get_blogmeta( $activity->item_id, 'url' ); 66 67 $blog_name = bp_blogs_get_blogmeta( $activity->item_id, 'name' ); … … 88 89 * @since BuddyPress (2.0.0) 89 90 * 91 * @param string $action Static activity action. 90 92 * @param obj $activity Activity data object. 91 93 */ 92 function bp_blogs_format_activity_action_new_blog_post( $acti vity ) {94 function bp_blogs_format_activity_action_new_blog_post( $action, $activity ) { 93 95 $blog_url = bp_blogs_get_blogmeta( $activity->item_id, 'url' ); 94 96 $blog_name = bp_blogs_get_blogmeta( $activity->item_id, 'name' ); … … 148 150 * @since BuddyPress (2.0.0) 149 151 * 152 * @param string $action Static activity action. 150 153 * @param obj $activity Activity data object. 151 154 */ 152 function bp_blogs_format_activity_action_new_blog_comment( $acti vity ) {155 function bp_blogs_format_activity_action_new_blog_comment( $action, $activity ) { 153 156 $blog_url = bp_blogs_get_blogmeta( $activity->item_id, 'url' ); 154 157 $blog_name = bp_blogs_get_blogmeta( $activity->item_id, 'name' ); -
trunk/bp-friends/bp-friends-activity.php
r8125 r8126 122 122 * @return string $action Formatted activity action. 123 123 */ 124 function bp_friends_format_activity_action_friendship_accepted( $acti vity ) {124 function bp_friends_format_activity_action_friendship_accepted( $action, $activity ) { 125 125 $initiator_link = bp_core_get_userlink( $activity->user_id ); 126 126 $friend_link = bp_core_get_userlink( $activity->secondary_item_id ); … … 144 144 * @since BuddyPress (2.0.0) 145 145 * 146 * @param string $action Static activity action. 146 147 * @param object $activity Activity data. 147 148 * @return string $action Formatted activity action. 148 149 */ 149 function bp_friends_format_activity_action_friendship_created( $acti vity ) {150 function bp_friends_format_activity_action_friendship_created( $action, $activity ) { 150 151 $initiator_link = bp_core_get_userlink( $activity->user_id ); 151 152 $friend_link = bp_core_get_userlink( $activity->secondary_item_id ); -
trunk/bp-groups/bp-groups-activity.php
r8125 r8126 55 55 * @since BuddyPress (2.0.0) 56 56 * 57 * @param string $action Static activity action. 57 58 * @param object $activity Activity data object. 58 59 * @return string 59 60 */ 60 function bp_groups_format_activity_action_created_group( $acti vity ) {61 function bp_groups_format_activity_action_created_group( $action, $activity ) { 61 62 $user_link = bp_core_get_userlink( $activity->user_id ); 62 63 … … 77 78 * @since BuddyPress (2.0.0) 78 79 * 80 * @param string $action Static activity action. 79 81 * @param object $activity Activity data object. 80 82 * @return string 81 83 */ 82 function bp_groups_format_activity_action_joined_group( $acti vity ) {84 function bp_groups_format_activity_action_joined_group( $action, $activity ) { 83 85 $user_link = bp_core_get_userlink( $activity->user_id ); 84 86 -
trunk/bp-xprofile/bp-xprofile-activity.php
r8125 r8126 48 48 * @since BuddyPress (2.0.0) 49 49 * 50 * @param string $action Static activity action. 50 51 * @param object $activity Activity object. 51 52 * @return string 52 53 */ 53 function bp_xprofile_format_activity_action_new_avatar( $acti vity ) {54 function bp_xprofile_format_activity_action_new_avatar( $action, $activity ) { 54 55 $userlink = bp_core_get_userlink( $activity->user_id ); 55 56 $action = sprintf( __( '%s changed their profile picture', 'buddypress' ), $userlink ); … … 68 69 * @since BuddyPress (2.0.0) 69 70 * 71 * @param string $action Static activity action. 70 72 * @param object $activity Activity object. 71 73 * @return string 72 74 */ 73 function bp_xprofile_format_activity_action_new_member( $acti vity ) {75 function bp_xprofile_format_activity_action_new_member( $action, $activity ) { 74 76 $userlink = bp_core_get_userlink( $activity->user_id ); 75 77 $action = sprintf( __( '%s became a registered member', 'buddypress' ), $userlink ); … … 88 90 * @since BuddyPress (2.0.0) 89 91 * 92 * @param string $action Static activity action. 90 93 * @param object $activity Activity object. 91 94 * @return string 92 95 */ 93 function bp_xprofile_format_activity_action_updated_profile( $acti vity ) {96 function bp_xprofile_format_activity_action_updated_profile( $action, $activity ) { 94 97 // Note for translators: The natural phrasing in English, "Joe updated 95 98 // his profile", requires that we know Joe's gender, which we don't. If
Note: See TracChangeset
for help on using the changeset viewer.