Skip to:
Content

BuddyPress.org

Changeset 11837


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

Location:
trunk/src/bp-activity
Files:
2 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.
  • trunk/src/bp-activity/bp-activity-template.php

    r11764 r11837  
    21372137                 *
    21382138                 * @since 1.2.0
     2139                 * @since 3.0.0 Added $context parameter to disambiguate from bp_get_activity_comment_content().
    21392140                 *
    21402141                 * @param string $content The content of the current activity comment.
    2141                  */
    2142                 return apply_filters( 'bp_activity_comment_content', $content );
     2142                 * @param string $context This filter's context ("get").
     2143                 */
     2144                return apply_filters( 'bp_activity_comment_content', $content, 'get' );
    21432145        }
    21442146
Note: See TracChangeset for help on using the changeset viewer.