Skip to:
Content

BuddyPress.org

Changeset 12308


Ignore:
Timestamp:
12/03/2018 09:15:10 PM (6 years ago)
Author:
boonebgorges
Message:

Don't pass non-existent total_count value to notification export filter.

total_count is available only in other contexts where this filter exists.
Instead, we pass a null value.

Merges [12307] to the 4.0 branch.

Props Venutius.
Fixes #8015.

Location:
branches/4.0
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/4.0

  • branches/4.0/src/bp-notifications/bp-notifications-functions.php

    r12306 r12308  
    842842            $content = call_user_func( buddypress()->{$component_name}->notification_callback, $notification->component_action, $notification->item_id, $notification->secondary_item_id, 1, 'string', $notification->id );
    843843        } else {
    844             // The array to reference with apply_filters_ref_array().
     844            /*
     845             * Compile an array of data to send to filter.
     846             *
     847             * Note that a null value is passed in the slot filled by `total_count` in
     848             * other filter contexts. We don't have enough info here to pass a `total_count`.
     849             */
    845850            $ref_array = array(
    846851                $notification->component_action,
    847852                $notification->item_id,
    848853                $notification->secondary_item_id,
    849                 $notification->total_count,
     854                null,
    850855                'string',
    851856                $notification->component_action,
Note: See TracChangeset for help on using the changeset viewer.