[buddypress-trac] [BuddyPress Trac] #6669: Blank notifications when using the bp_notifications_get_notifications_for_user filter hook
buddypress-trac
noreply at wordpress.org
Sat Oct 17 21:58:45 UTC 2015
#6669: Blank notifications when using the
bp_notifications_get_notifications_for_user filter hook
---------------------------------------+------------------------------
Reporter: henry.wright | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Component - Notifications | Version: 2.3.3
Severity: normal | Resolution:
Keywords: reporter-feedback |
---------------------------------------+------------------------------
Changes (by r-a-y):
* keywords: => reporter-feedback
Comment:
Make sure you return a value in your `step_2a()` and `step2b()` functions:
{{{
function step_2a( $component_action, $item_id, $secondary_item_id,
$item_count, $format = 'string' ) {
if ( $component_action === 'my_first_component' ) {
// Do something making sure to return the appropriate type (array
in this case).
}
return $component_action;
}
add_filter( 'bp_notifications_get_notifications_for_user', 'step_2a', 10,
5 );
function step_2b( $component_action, $item_id, $secondary_item_id,
$item_count, $format = 'string' ) {
if ( $component_action === 'my_second_component' ) {
// Do something making sure to return the appropriate type (array
in this case).
}
return $component_action;
}
add_filter( 'bp_notifications_get_notifications_for_user', 'step_2b', 10,
5 );
}}}
Does that fix your issue?
--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/6669#comment:1>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac
More information about the buddypress-trac
mailing list