Changeset 5680 for trunk/bp-members/bp-members-adminbar.php
- Timestamp:
- 02/09/2012 09:06:00 PM (14 years ago)
- File:
-
- 1 edited
-
trunk/bp-members/bp-members-adminbar.php (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-members/bp-members-adminbar.php
r5522 r5680 19 19 */ 20 20 function bp_members_admin_bar_my_account_menu() { 21 global $bp, $wp_admin_bar , $wp_version;21 global $bp, $wp_admin_bar; 22 22 23 23 // Bail if this is an ajax request … … 33 33 // Create the main 'My Account' menu 34 34 $wp_admin_bar->add_menu( array( 35 //'parent' => 'my-account',36 35 'id' => $bp->my_account_menu_id, 37 36 'group' => true, … … 146 145 */ 147 146 function bp_members_admin_bar_notifications_menu() { 148 global $ bp, $wp_admin_bar;147 global $wp_admin_bar; 149 148 150 149 if ( !is_user_logged_in() ) … … 152 151 153 152 $notifications = bp_core_get_notifications_for_user( bp_loggedin_user_id(), 'object' ); 154 $count = !empty( $notifications ) ? count( $notifications ) : '0';153 $count = !empty( $notifications ) ? count( $notifications ) : 0; 155 154 $alert_class = (int) $count > 0 ? 'pending-count alert' : 'count no-alert'; 156 155 $menu_title = '<span id="ab-pending-notifications" class="' . $alert_class . '">' . $count . '</span>'; … … 165 164 166 165 if ( !empty( $notifications ) ) { 167 foreach ( (array) $notifications as $notification ) {166 foreach ( (array) $notifications as $notification ) { 168 167 $wp_admin_bar->add_menu( array( 169 168 'parent' => 'bp-notifications',
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)