Changeset 8126 for trunk/bp-activity/bp-activity-functions.php
- Timestamp:
- 03/13/2014 07:05:27 PM (10 years ago)
- File:
-
- 1 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 );
Note: See TracChangeset
for help on using the changeset viewer.