Changeset 4624 for trunk/bp-members/bp-members-notifications.php
- Timestamp:
- 07/07/2011 11:27:26 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-members/bp-members-notifications.php
r4621 r4624 57 57 if ( empty( $grouped_notifications ) ) 58 58 return false; 59 59 60 $renderable = array(); 61 60 62 // Calculate a renderable output for each notification type 61 63 foreach ( (array)$grouped_notifications as $component_name => $action_arrays ) { … … 76 78 $content = call_user_func( $bp->{$component_name}->notification_callback, $component_action_name, $component_action_items[0]->item_id, $component_action_items[0]->secondary_item_id, $action_item_count, 'array' ); 77 79 80 $notification_object = new stdClass; 81 78 82 // Minimal backpat with non-compatible notification 79 83 // callback functions 80 84 if ( is_string( $content ) ) { 81 $notification ->content = $content;82 $notification ->href = bp_loggedin_user_domain();85 $notification_object->content = $content; 86 $notification_object->href = bp_loggedin_user_domain(); 83 87 } else { 84 $notification ->content = $content['text'];85 $notification ->href = $content['link'];88 $notification_object->content = $content['text']; 89 $notification_object->href = $content['link']; 86 90 } 87 91 88 $renderable[] = $notification; 92 $notification_object->id = $component_action_items[0]->id; 93 94 $renderable[] = $notification_object; 89 95 } else { 90 96 $content = call_user_func( $bp->{$component_name}->notification_callback, $component_action_name, $component_action_items[0]->item_id, $component_action_items[0]->secondary_item_id, $action_item_count );
Note: See TracChangeset
for help on using the changeset viewer.