Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
03/13/2014 07:05:27 PM (13 years ago)
Author:
boonebgorges
Message:

Use WP Plugin API rather than call_user_func() to apply format_callback to activity actions

This allows plugin authors to modify or override default formatting callbacks
using the standard remove_filter() and add_filter() API functions.

Hat-tip to nacin for the idea

See #3856

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-friends/bp-friends-activity.php

    r8125 r8126  
    122122 * @return string $action Formatted activity action.
    123123 */
    124 function bp_friends_format_activity_action_friendship_accepted( $activity ) {
     124function bp_friends_format_activity_action_friendship_accepted( $action, $activity ) {
    125125        $initiator_link = bp_core_get_userlink( $activity->user_id );
    126126        $friend_link    = bp_core_get_userlink( $activity->secondary_item_id );
    … …  
    144144 * @since BuddyPress (2.0.0)
    145145 *
     146 * @param string $action Static activity action.
    146147 * @param object $activity Activity data.
    147148 * @return string $action Formatted activity action.
    148149 */
    149 function bp_friends_format_activity_action_friendship_created( $activity ) {
     150function bp_friends_format_activity_action_friendship_created( $action, $activity ) {
    150151        $initiator_link = bp_core_get_userlink( $activity->user_id );
    151152        $friend_link    = bp_core_get_userlink( $activity->secondary_item_id );
Note: See TracChangeset for help on using the changeset viewer.