- Timestamp:
- 01/13/2015 01:35:21 AM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-notifications/bp-notifications-functions.php
r9351 r9352 152 152 } 153 153 154 // Filter and return 154 /** 155 * Filters all notifications for a user. 156 * 157 * @since BuddyPress (2.1.0) 158 * 159 * @param array $notifications Array of notifications for user. 160 * @param int $user_id ID of the user being fetched. 161 */ 155 162 return apply_filters( 'bp_notifications_get_all_notifications_for_user', $notifications, $user_id ); 156 163 } … … 262 269 if ( 'object' === $format ) { 263 270 264 // Retrieve the content of the notification using the callback 271 /** 272 * Filters the notifications for a user. 273 * 274 * @since BuddyPress (1.9.0) 275 * 276 * @param array $ref_array Array of properties for the current notification being rendered. 277 */ 265 278 $content = apply_filters_ref_array( 'bp_notifications_get_notifications_for_user', $ref_array ); 266 279 … … 282 295 // Return an array of content strings 283 296 } else { 297 298 /** This filters is documented in bp-notifications/bp-notifications-functions.php */ 284 299 $renderable[] = apply_filters_ref_array( 'bp_notifications_get_notifications_for_user', $ref_array ); 285 300 } … … 293 308 } 294 309 295 // Filter and return 310 /** 311 * Filters the final array of notifications to be displayed for a user. 312 * 313 * @since BuddyPress (1.6.0) 314 * 315 * @param Array|Bool $renderable Array of notifications to render or false if no notifications. 316 * @param int $user_id ID of the user whose notifications are being displayed. 317 * @param string $format Display format requested for the notifications. 318 */ 296 319 return apply_filters( 'bp_core_get_notifications_for_user', $renderable, $user_id, $format ); 297 320 } … … 541 564 $count = ! empty( $notifications ) ? count( $notifications ) : 0; 542 565 566 /** 567 * Filters the count of unread notification items for a user. 568 * 569 * @since BuddyPress (1.9.0) 570 * 571 * @param int $count Count of unread notification items for a user. 572 */ 543 573 return apply_filters( 'bp_notifications_get_total_notification_count', (int) $count ); 544 574 } … … 572 602 } 573 603 574 // Return active components with registered notifications callbacks 604 /** 605 * Filters active components with registered notifications callbacks. 606 * 607 * @since BuddyPress (1.9.1) 608 * 609 * @param array $component_names Array of registered component names. 610 * @param array $active_components Array of active components. 611 */ 575 612 return apply_filters( 'bp_notifications_get_registered_components', $component_names, $active_components ); 576 613 }
Note: See TracChangeset
for help on using the changeset viewer.