Changeset 10725
- Timestamp:
- 04/27/2016 07:18:01 PM (9 years ago)
- Location:
- trunk/src/bp-notifications
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-notifications/bp-notifications-functions.php
r10437 r10725 271 271 $component_action_items[0]->secondary_item_id, 272 272 $action_item_count, 273 $format 273 $format, 274 $component_action_name, // Duplicated so plugins can check the canonical action name. 275 $component_name 274 276 ); 275 277 … … 278 280 279 281 /** 280 * Filters the notifications for a user. 282 * Filters the notification content for notifications created by plugins. 283 * 284 * If your plugin extends the {@link BP_Component} class, you should use the 285 * 'notification_callback' parameter in your extended 286 * {@link BP_Component::setup_globals()} method instead. 281 287 * 282 288 * @since 1.9.0 289 * @since 2.6.0 Added $component_action_name and $component_name as parameters. 283 290 * 284 * @param array $ref_array Array of properties for the current notification being rendered. 291 * @param string $content Component action. Deprecated. Do not do checks against this! Use 292 * the 6th parameter instead - $component_action_name. 293 * @param int $item_id Notification item ID. 294 * @param int $secondary_item_id Notification secondary item ID. 295 * @param int $action_item_count Number of notifications with the same action. 296 * @param string $format Format of return. Either 'string' or 'object'. 297 * @param string $component_action_name Canonical notification action. 298 * @param string $component_name Notification component ID. 299 * 300 * @return string|array If $format is 'string', return a string of the notification content. 301 * If $format is 'object', return an array formatted like: 302 * array( 'text' => 'CONTENT', 'link' => 'LINK' ) 285 303 */ 286 304 $content = apply_filters_ref_array( 'bp_notifications_get_notifications_for_user', $ref_array ); -
trunk/src/bp-notifications/bp-notifications-template.php
r10715 r10725 480 480 481 481 /** This filter is documented in bp-notifications/bp-notifications-functions.php */ 482 $description = apply_filters_ref_array( 'bp_notifications_get_notifications_for_user', array( $notification->component_action, $notification->item_id, $notification->secondary_item_id, 1 ) );482 $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 ) ); 483 483 } 484 484
Note: See TracChangeset
for help on using the changeset viewer.