Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Admin bar: ensure the Atomic debug bar is the leftmost menu #39493

Merged
merged 2 commits into from
Sep 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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