- Timestamp:
- 06/18/2023 04:11:04 AM (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-notifications/bp-notifications-adminbar.php
r13499 r13503 30 30 31 31 $notifications = bp_notifications_get_notifications_for_user( bp_loggedin_user_id(), 'object' ); 32 $count = ! empty( $notifications ) ? count( $notifications ) : 0; 33 $alert_class = (int) $count > 0 ? 'pending-count alert' : 'count no-alert'; 34 $menu_title = '<span id="ab-pending-notifications" class="' . $alert_class . '">' . number_format_i18n( $count ) . '</span>'; 35 $notifications_slug = bp_get_notifications_slug(); 36 $custom_notifications_slug = bp_rewrites_get_slug( 'members', 'member_' . $notifications_slug, $notifications_slug ); 37 $menu_link = bp_loggedin_user_url( 38 array( 39 'single_item_component' => $custom_notifications_slug, 40 ) 41 ); 32 $count = ! empty( $notifications ) ? count( $notifications ) : 0; 33 $alert_class = (int) $count > 0 ? 'pending-count alert' : 'count no-alert'; 34 $menu_title = '<span id="ab-pending-notifications" class="' . $alert_class . '">' . number_format_i18n( $count ) . '</span>'; 35 $menu_link = bp_loggedin_user_url( bp_members_get_path_chunks( array( bp_get_notifications_slug() ) ) ); 42 36 43 37 // Add the top-level Notifications button.
Note: See TracChangeset
for help on using the changeset viewer.