Changeset 7711
- Timestamp:
- 12/23/2013 05:45:16 PM (11 years ago)
- Location:
- trunk/bp-notifications
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-notifications/bp-notifications-classes.php
r7709 r7711 554 554 'item_id' => false, 555 555 'secondary_item_id' => false, 556 'component_name' => array_keys( buddypress()->active_components),556 'component_name' => bp_notifications_get_registered_components(), 557 557 'component_action' => false, 558 558 'is_new' => true, … … 613 613 global $wpdb; 614 614 615 // Load BuddyPress616 $bp = buddypress();617 618 615 /** 619 616 * Default component_name to active_components … … 621 618 * @see http://buddypress.trac.wordpress.org/ticket/5300 622 619 */ 623 $args = wp_parse_args( $args, array( 'component_name' => array_keys( $bp->active_components ) ) ); 620 $args = wp_parse_args( $args, array( 621 'component_name' => bp_notifications_get_registered_components() 622 ) ); 623 624 // Load BuddyPress 625 $bp = buddypress(); 624 626 625 627 // Build the query -
trunk/bp-notifications/bp-notifications-functions.php
r7686 r7711 508 508 return apply_filters( 'bp_notifications_get_total_notification_count', $count ); 509 509 } 510 511 /** 512 * Return an array of component names that are currently active and have 513 * registered Notifications callbacks. 514 * 515 * @since BuddyPress (1.9.1) 516 * 517 * @see http://buddypress.trac.wordpress.org/ticket/5300 518 */ 519 function bp_notifications_get_registered_components() { 520 521 // 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 ); 526 527 // Return active components with registered notifications callbacks 528 return apply_filters( 'bp_notifications_get_component_names', $component_names ); 529 }
Note: See TracChangeset
for help on using the changeset viewer.