Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
12/17/2013 05:37:08 PM (11 years ago)
Author:
johnjamesjacoby
Message:

Notifications:

Make buddypress()->active_components the default value for the component_name argument.

This is necessary because notifications are persistent in the database, and active components register callbacks for generating output based on the queried results. If notifications exist for components that are inactive, no callback will be registered, and the output will be empty. By only querying for active components, we can be sure no empty notifications will be displayed to the user.

Reverts r7677. See #5290. Fixes #5300. (trunk)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-notifications/bp-notifications-classes.php

    r7550 r7686  
    554554            'item_id'           => false,
    555555            'secondary_item_id' => false,
    556             'component_name'    => false,
     556            'component_name'    => array_keys( buddypress()->active_components ),
    557557            'component_action'  => false,
    558558            'is_new'            => true,
Note: See TracChangeset for help on using the changeset viewer.