Changeset 10790
- Timestamp:
- 05/19/2016 05:58:25 PM (9 years ago)
- Location:
- trunk/src/bp-notifications
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-notifications/bp-notifications-functions.php
r10788 r10790 234 234 $component_action_items[0]->secondary_item_id, 235 235 $action_item_count, 236 'array' 236 'array', 237 $component_action_items[0]->id 237 238 ); 238 239 … … 254 255 // Return an array of content strings. 255 256 } else { 256 $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 );257 $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, $component_action_items[0]->id ); 257 258 $renderable[] = $content; 258 259 } … … 273 274 $format, 274 275 $component_action_name, // Duplicated so plugins can check the canonical action name. 275 $component_name 276 $component_name, 277 $component_action_items[0]->id 276 278 ); 277 279 … … 287 289 * 288 290 * @since 1.9.0 289 * @since 2.6.0 Added $component_action_name and $component_nameas parameters.291 * @since 2.6.0 Added $component_action_name, $component_name, $id as parameters. 290 292 * 291 293 * @param string $content Component action. Deprecated. Do not do checks against this! Use … … 297 299 * @param string $component_action_name Canonical notification action. 298 300 * @param string $component_name Notification component ID. 301 * @param int $id Notification ID. 299 302 * 300 303 * @return string|array If $format is 'string', return a string of the notification content. -
trunk/src/bp-notifications/bp-notifications-template.php
r10785 r10790 472 472 // Callback function exists. 473 473 if ( isset( $bp->{ $notification->component_name }->notification_callback ) && is_callable( $bp->{ $notification->component_name }->notification_callback ) ) { 474 $description = call_user_func( $bp->{ $notification->component_name }->notification_callback, $notification->component_action, $notification->item_id, $notification->secondary_item_id, 1 );474 $description = call_user_func( $bp->{ $notification->component_name }->notification_callback, $notification->component_action, $notification->item_id, $notification->secondary_item_id, 1, 'string', $notification->id ); 475 475 476 476 // @deprecated format_notification_function - 1.5 … … 482 482 483 483 /** This filter is documented in bp-notifications/bp-notifications-functions.php */ 484 $description = apply_filters_ref_array( 'bp_notifications_get_notifications_for_user', array( $notification->component_action, $notification->item_id, $notification->secondary_item_id, 1, 'string', $notification->component_action, $notification->component_name ) );484 $description = apply_filters_ref_array( 'bp_notifications_get_notifications_for_user', array( $notification->component_action, $notification->item_id, $notification->secondary_item_id, 1, 'string', $notification->component_action, $notification->component_name, $notification->id ) ); 485 485 } 486 486
Note: See TracChangeset
for help on using the changeset viewer.