Skip to:
Content

BuddyPress.org

Changeset 13925


Ignore:
Timestamp:
06/13/2024 05:40:43 PM (9 months ago)
Author:
imath
Message:

Keep the Notifications Admin Bar menu before the "My Account" one

This commit’s goal is to make sure people testing WordPress >= 6.6-beta2 during BP 14.0.0 beta testing period won’t believe this is a bug we missed. We’ll need to perform another commit once stable WP 6.6 will be released for 12.0 branch.

See #9182
Closes https://github.com/buddypress/buddypress/pull/313

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-members/bp-members-adminbar.php

    r13629 r13925  
    268268    }
    269269}
    270 add_action( 'admin_bar_menu', 'bp_members_admin_bar_notifications_menu', 90 );
     270
     271/**
     272 * Keep the Notification toolbar menu at the left of the "My Account" one.
     273 *
     274 * @since 12.6.0
     275 */
     276function bp_members_admin_bar_notifications_menu_priority() {
     277    /*
     278     * WordPress 6.6 edited the WP Admin style & removed the right float.
     279     * See: https://core.trac.wordpress.org/changeset/58215/
     280     */
     281    if ( bp_is_running_wp( '6.6-beta2', '>=' ) ) {
     282        bp_members_admin_bar_notifications_menu();
     283    } else {
     284        add_action( 'admin_bar_menu', 'bp_members_admin_bar_notifications_menu', 90 );
     285    }
     286}
     287add_action( 'admin_bar_menu', 'bp_members_admin_bar_notifications_menu_priority', 6 );
    271288
    272289/**
Note: See TracChangeset for help on using the changeset viewer.