Skip to content

Commit

Permalink
Toolbar: Move user and recovery menus to a higher priority.
Browse files Browse the repository at this point in the history
Following [58215], admin bar items in the top-secondary group have a changed visual order. Increase the priority of the user and recovery menu items so nodes added with higher priorities will still be shown visually before the user and recovery menu items, as they were prior to 58215.

The items will appear in the reverse of the previous order, but the new order now matches their priority order, rather than being the opposite.

Reviewed by hellofromTonya.
Merges [58748] to the 6.6 branch.

Props sabernhardt, joemcgill, pbiron, joedolson.
Fixes #61615.

git-svn-id: https://develop.svn.wordpress.org/branches/6.6@58759 602fd350-edb4-49c9-b593-d223f7449a82
  • Loading branch information
hellofromtonya committed Jul 18, 2024
1 parent 2a0d775 commit fc71dae
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/wp-includes/class-wp-admin-bar.php
Original file line number Diff line number Diff line change
Expand Up @@ -648,8 +648,8 @@ public function recursive_render( $id, $node ) {
public function add_menus() {
// User-related, aligned right.
add_action( 'admin_bar_menu', 'wp_admin_bar_my_account_menu', 0 );
add_action( 'admin_bar_menu', 'wp_admin_bar_my_account_item', 7 );
add_action( 'admin_bar_menu', 'wp_admin_bar_recovery_mode_menu', 8 );
add_action( 'admin_bar_menu', 'wp_admin_bar_my_account_item', 9991 );
add_action( 'admin_bar_menu', 'wp_admin_bar_recovery_mode_menu', 9992 );
add_action( 'admin_bar_menu', 'wp_admin_bar_search_menu', 9999 );

// Site-related.
Expand Down

1 comment on commit fc71dae

@joemaller
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Most of the common "de-Howdy" plugins will need to bump their add_filter priority to 9992. The my-account node won't exist on $wp_admin_bar before then.

Please sign in to comment.