Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
12/29/2016 02:08:09 AM (7 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/classes/class-bp-activity-list-table.php

    r10961 r11351  
    642642        // Get activity content - if not set, use the action.
    643643        if ( ! empty( $item['content'] ) ) {
    644 
    645             /**
    646              * Filters current activity item content.
    647              *
    648              * @since 1.2.0
    649              *
    650              * @param array $item Array index holding current activity item content.
    651              */
    652             $content = apply_filters_ref_array( 'bp_get_activity_content_body', array( $item['content'] ) );
     644            $activity = new BP_Activity_Activity( $item['id'] );
     645
     646            /** This filter is documented in bp-activity/bp-activity-template.php */
     647            $content = apply_filters_ref_array( 'bp_get_activity_content_body', array( $item['content'], &$activity ) );
    653648        } else {
    654649            /**
Note: See TracChangeset for help on using the changeset viewer.