Skip to content

Commit

Permalink
Admin bar: ensure the Atomic debug bar is the leftmost menu (#39493)
Browse files Browse the repository at this point in the history
  • Loading branch information
fushar authored Sep 24, 2024
1 parent e2c99cc commit 6e432d4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 10 deletions.
4 changes: 4 additions & 0 deletions projects/packages/jetpack-mu-wpcom/changelog/debug-bar-left
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: patch
Type: fixed

Admin bar: ensure the Atomic debug bar is the leftmost menu
Original file line number Diff line number Diff line change
Expand Up @@ -57,26 +57,19 @@ function wpcom_enqueue_admin_bar_assets() {
);

/**
* Hotfix the order of the admin menu items due to WP 6.6
* See https://core.trac.wordpress.org/ticket/61615.
* Force the Atomic debug bar menu to be the first menu at the top-right.
*/
$wp_version = get_bloginfo( 'version' );
if ( version_compare( $wp_version, '6.6', '<=' ) && version_compare( $wp_version, '6.6.RC', '>=' ) ) {
if ( defined( 'AT_PROXIED_REQUEST' ) && AT_PROXIED_REQUEST ) {
wp_add_inline_style(
'wpcom-admin-bar',
<<<CSS
#wpadminbar .quicklinks #wp-admin-bar-top-secondary {
display: flex;
flex-direction: row-reverse;
}
#wpadminbar .quicklinks #wp-admin-bar-top-secondary #wp-admin-bar-search {
#wpadminbar .quicklinks #wp-admin-bar-top-secondary #wp-admin-bar-debug-bar {
order: -1;
}
#wpadminbar .quicklinks #wp-admin-bar-top-secondary #wp-admin-bar-help-center {
order: 1;
}
CSS
);
}
Expand Down

0 comments on commit 6e432d4

Please sign in to comment.