Changeset 7713
- Timestamp:
- 12/23/2013 06:28:04 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/1.9/bp-notifications/bp-notifications-functions.php
r7712 r7713 519 519 function bp_notifications_get_registered_components() { 520 520 521 // Load BuddyPress 522 $bp = buddypress(); 523 524 // Setup return value 525 $component_names = array(); 526 521 527 // Get the active components 522 $active_components = buddypress()->active_components; 523 524 // Get the component ID's from the active_components array 525 $component_names = array_keys( $active_components ); 528 $active_components = array_keys( $bp->active_components ); 529 530 // Loop through components, look for callbacks, add to return value 531 foreach ( $active_components as $component ) { 532 if ( !empty( $bp->$component->notification_callback ) ) { 533 $component_names[] = $component; 534 } 535 } 526 536 527 537 // Return active components with registered notifications callbacks 528 return apply_filters( 'bp_notifications_get_component_names', $component_names );529 } 538 return apply_filters( 'bp_notifications_get_component_names', $component_names, $active_components ); 539 }
Note: See TracChangeset
for help on using the changeset viewer.