Skip to:
Content

BuddyPress.org

Changeset 14163


Ignore:
Timestamp:
12/22/2025 06:27:55 PM (7 months ago)
Author:
espellcaste
Message:

Fix a typo in the friends_activity_friendship_accepted_action hook and deprecate it.

Fix a typo in the filter hook name: friends_activity_friendsip_accepted_action which should be friends_activity_friendship_accepted_action.

The hook was also properly deprecated and will be removed in a future release.

Originally at [8125].

Props khushipatel15.

Fixes #9280.

File:
1 edited

Legend:

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

    r14077 r14163  
    154154        if ( has_filter( 'friends_activity_friendship_accepted_action' ) ) {
    155155                $friendship = new BP_Friends_Friendship( $activity->item_id );
    156                 $action     = apply_filters( 'friends_activity_friendsip_accepted_action', $action, $friendship );
     156
     157                /**
     158                 * Filters the 'friendship_accepted' activity action format.
     159                 *
     160                 * @since 2.0.0
     161                 * @deprecated 15.0.0
     162                 *
     163                 * @param string                $action     String text for the 'friendship_accepted' action.
     164                 * @param BP_Friends_Friendship $friendship Friendship object.
     165                 */
     166                $action = apply_filters_deprecated(
     167                        'friends_activity_friendship_accepted_action',
     168                        array( $action, $friendship ),
     169                        '15.0.0',
     170                        'bp_friends_format_activity_action_friendship_accepted'
     171                );
    157172        }
    158173
     
    189204        if ( has_filter( 'friends_activity_friendship_accepted_action' ) ) {
    190205                $friendship = new BP_Friends_Friendship( $activity->item_id );
    191                 $action     = apply_filters( 'friends_activity_friendsip_accepted_action', $action, $friendship );
     206
     207                /**
     208                 * Filters the 'friendship_created' activity action format.
     209                 *
     210                 * @since 2.0.0
     211                 * @deprecated 15.0.0
     212                 *
     213                 * @param string                $action     String text for the 'friendship_created' action.
     214                 * @param BP_Friends_Friendship $friendship Friendship object.
     215                 */
     216                $action = apply_filters_deprecated(
     217                        'friends_activity_friendship_accepted_action',
     218                        array( $action, $friendship ),
     219                        '15.0.0',
     220                        'bp_friends_format_activity_action_friendship_created'
     221                );
    192222        }
    193223
Note: See TracChangeset for help on using the changeset viewer.