Skip to:
Content

BuddyPress.org

Changes between Initial Version and Version 1 of Ticket #6515, comment 1


Ignore:
Timestamp:
06/18/2015 08:08:00 PM (11 years ago)
Author:
dcavins
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #6515, comment 1

    initial v1  
    1313As `groups_format_notifications()` is currently written, any unrecognized action will not match any of the cases in the long switch and then fire off the `do_action( 'groups_format_notifications' )` before returning false.
    1414
    15 If it makes any sense for plugins to use the ` 'groups'` as a `'component_name` then my second patch adds a default case to the long switch so that unmatched actions will do an `apply_filters( 'bp_groups_' . $action . '_notification', null, $item_id, $secondary_item_id, $total_items, $format )`, which, if a notification results, will be returned.
     15If it makes any sense for plugins to use an existing component like  ` 'groups'` as a `component_name` then my second patch adds a default case to the long switch so that unmatched actions will do an `apply_filters( 'bp_groups_' . $action . '_notification', null, $item_id, $secondary_item_id, $total_items, $format )`, which, if a notification results, will be returned.
    1616
    1717I'm not sure if we really want plugins that create notifications to declare a unique `component_name` when adding notifications (even though they aren't really a full-blown component), or if it makes sense to piggyback on existing components.