Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
12/29/2016 02:08:09 AM (8 years ago)
Author:
boonebgorges
Message:

bp_get_activity_content_body filter should receive same params in all contexts.

This changeset makes all instances of bp_get_activity_content_body
consistent by ensuring that they all receive the activity object
as a second parameter. This requires switching to apply_filters_ref_array(),
so that the second param can always be passed by reference.

Props sanket.parmar.
Fixes #6971.

File:
1 edited

Legend:

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

    r11311 r11351  
    34423442
    34433443    /** This filter is documented in bp-activity/bp-activity-template.php */
    3444     $content = apply_filters( 'bp_get_activity_content_body', $activity->content );
     3444    $content = apply_filters_ref_array( 'bp_get_activity_content_body', array( $activity->content, &$activity ) );
    34453445
    34463446    add_filter( 'bp_get_activity_content_body', 'convert_smilies' );
     
    35103510
    35113511    /** This filter is documented in bp-activity/bp-activity-template.php */
    3512     $content = apply_filters( 'bp_get_activity_content_body', $params['content'] );
     3512    $content = apply_filters_ref_array( 'bp_get_activity_content_body', array( $params['content'], &$original_activity ) );
    35133513
    35143514    add_filter( 'bp_get_activity_content_body', 'convert_smilies' );
Note: See TracChangeset for help on using the changeset viewer.