Ticket #7020: 7020.01.patch
File 7020.01.patch, 2.7 KB (added by , 9 years ago) |
---|
-
src/bp-notifications/bp-notifications-functions.php
271 271 $component_action_items[0]->secondary_item_id, 272 272 $action_item_count, 273 273 $format 274 $component_action_name, // Duplicated so plugins can check the canonical action name. 275 $component_name 274 276 ); 275 277 276 278 // Function should return an object. … … 280 282 * Filters the notifications for a user. 281 283 * 282 284 * @since 1.9.0 285 * @since 2.6.0 Added $component_action_name and $component_name as parameters. 283 286 * 284 * @param array $ref_array Array of properties for the current notification being rendered. 287 * @param string $content Component action. Deprecated. Do not do checks against this! Use 288 * the 6th parameter instead - $component_action_name. 289 * @param int $item_id Notification item ID. 290 * @param int $secondary_item_id Notification secondary item ID. 291 * @param int $action_item_count Number of notifications with the same action. 292 * @param string $format Format of return. Either 'string' or 'object'. 293 * @param string $component_action_name Canonical notification action. 294 * @param string $component_name Notification component. 295 * 296 * @return string|array If $format is 'string', return a string of the notification content. 297 * If $format is 'object', return an array formatted like: 298 * array( 'text' => 'CONTENT', 'link' => 'LINK' ) 285 299 */ 286 300 $content = apply_filters_ref_array( 'bp_notifications_get_notifications_for_user', $ref_array ); 287 301 -
src/bp-notifications/bp-notifications-template.php
465 465 } else { 466 466 467 467 /** This filter is documented in bp-notifications/bp-notifications-functions.php */ 468 $description = apply_filters_ref_array( 'bp_notifications_get_notifications_for_user', array( $notification->component_action, $notification->item_id, $notification->secondary_item_id, 1 ) );468 $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 ) ); 469 469 } 470 470 471 471 /**