Skip to:
Content

BuddyPress.org

Changeset 12355


Ignore:
Timestamp:
03/08/2019 03:28:53 PM (5 years ago)
Author:
boonebgorges
Message:

Activity: Fix parameters for instance of bp_activity_custom_update filter.

This filter, introduced in [2552], is intended to allow developers to specify a
custom activity ID after posting to the "what's new" box. As originally
written, the filter didn't pass the right parameters to be properly used.
The instances of the filter that appear in bp-templates files were fixed in
[9160]; see #6021. The current changeset fixes the remaining instance.

Fixes #8054.

File:
1 edited

Legend:

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

    r11885 r12355  
    7878         *
    7979         * @since 1.2.0
     80         * @since 5.0.0 Fixed filter signature to match other instances of filter,
     81         *              with $activity_id as the first param.
    8082         *
    81          * @param string $object  Activity item being associated to.
    82          * @param string $item_id Component ID being posted to.
    83          * @param string $content Activity content being posted.
     83         * @param int    $activity_id ID of the activity item.
     84         * @param string $object      Activity item being associated to.
     85         * @param string $item_id     Component ID being posted to.
     86         * @param string $content     Activity content being posted.
    8487         */
    85         $activity_id = apply_filters( 'bp_activity_custom_update', $object, $item_id, $content );
     88        $activity_id = apply_filters( 'bp_activity_custom_update', 0, $object, $item_id, $content );
    8689    }
    8790
Note: See TracChangeset for help on using the changeset viewer.