Skip to content

Commit

Permalink
Admin Bar: Fix the order of the top-right items on Atomic sites (#38533)
Browse files Browse the repository at this point in the history
* Admin Bar: Fix the order of the top-right items on Atomic sites

* Update versions
  • Loading branch information
fushar authored Jul 29, 2024
1 parent c4d288d commit 4a18455
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 9 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: patch
Type: fixed

Admin Bar: Fix the order of the top-right items on Atomic sites
2 changes: 1 addition & 1 deletion projects/packages/jetpack-mu-wpcom/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"private": true,
"name": "@automattic/jetpack-mu-wpcom",
"version": "5.50.0",
"version": "5.50.1-alpha",
"description": "Enhances your site with features powered by WordPress.com",
"homepage": "https://github.com/Automattic/jetpack/tree/HEAD/projects/packages/jetpack-mu-wpcom/#readme",
"bugs": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* Jetpack_Mu_Wpcom main class.
*/
class Jetpack_Mu_Wpcom {
const PACKAGE_VERSION = '5.50.0';
const PACKAGE_VERSION = '5.50.1-alpha';
const PKG_DIR = __DIR__ . '/../';
const BASE_DIR = __DIR__ . '/';
const BASE_FILE = __FILE__;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,12 +83,9 @@ public function enqueue_script( $variant, $dependencies, $version ) {
$script_dependencies = $dependencies ?? array();

if ( $variant === 'wp-admin' || $variant === 'wp-admin-disconnected' ) {
// Crazy high number to prevent Jetpack removing it
// https://github.com/Automattic/jetpack/blob/30213ee594cd06ca27199f73b2658236fda24622/projects/plugins/jetpack/modules/masterbar/masterbar/class-masterbar.php#L196.
add_action(
'wp_before_admin_bar_render',
function () {
global $wp_admin_bar;
'admin_bar_menu',
function ( $wp_admin_bar ) {
$wp_admin_bar->add_menu(
array(
'id' => 'help-center',
Expand All @@ -102,8 +99,7 @@ function () {
),
)
);
},
100000
}
);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,10 @@ function wpcom_enqueue_admin_bar_assets() {
#wpadminbar .quicklinks #wp-admin-bar-top-secondary #wp-admin-bar-search {
order: -1;
}
#wpadminbar .quicklinks #wp-admin-bar-top-secondary #wp-admin-bar-help-center {
order: 1;
}
CSS
);
}
Expand Down

0 comments on commit 4a18455

Please sign in to comment.