Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
01/31/2018 02:37:23 PM (9 years ago)
Author:
djpaul
Message:

Activity: add new argument to duplicated bp_activity_comment_content filter.

This filter is unfortunately used in two places (bp_activity_new_comment() and bp_get_activity_comment_content()).
The new parameter should help 3rd party developers where the filter is called from.

Fixes #5079

Props tw2113

File:
1 edited

Legend:

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

    r11806 r11837  
    26212621         *
    26222622         * @since 1.2.0
    2623          *
    2624          * @param string $r Content for the newly posted comment.
    2625          */
    2626         $comment_content = apply_filters( 'bp_activity_comment_content', $r['content'] );
     2623         * @since 3.0.0 Added $context parameter to disambiguate from bp_get_activity_comment_content().
     2624         *
     2625         * @param string $r       Content for the newly posted comment.
     2626         * @param string $context This filter's context ("new").
     2627         */
     2628        $comment_content = apply_filters( 'bp_activity_comment_content', $r['content'], 'new' );
    26272629
    26282630        // Insert the activity comment.
Note: See TracChangeset for help on using the changeset viewer.