From fc71dae8db2c057eab88f026b7b394ab0990ba9e Mon Sep 17 00:00:00 2001 From: Tonya Mork Date: Thu, 18 Jul 2024 16:43:15 +0000 Subject: [PATCH] Toolbar: Move user and recovery menus to a higher priority. 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 --- src/wp-includes/class-wp-admin-bar.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/wp-includes/class-wp-admin-bar.php b/src/wp-includes/class-wp-admin-bar.php index ee3d6d1baad31..dfebbb20e4c86 100644 --- a/src/wp-includes/class-wp-admin-bar.php +++ b/src/wp-includes/class-wp-admin-bar.php @@ -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.