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: Make it consistent between Calypso and WP Admin regardless of the value of Admin Interface Style #38362

Merged
merged 4 commits into from
Jul 17, 2024
Merged
Show file tree
Hide file tree
Changes from 2 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
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: minor
Type: changed

Admin Bar: Make it consistent between Calypso and WP Admin regardless of the value of Admin Interface Style
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,7 @@

use Automattic\Jetpack\Jetpack_Mu_Wpcom;

if ( get_option( 'wpcom_admin_interface' ) !== 'wp-admin' ) {
return;
}
define( 'WPCOM_ADMIN_BAR_UNIFICATION', true );

/**
* Enqueue assets needed by the WordPress.com admin bar.
Expand Down
4 changes: 4 additions & 0 deletions projects/packages/masterbar/changelog/feat-unify-masterbar
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: minor
Type: changed

Admin Bar: Make it consistent between Calypso and WP Admin regardless of the value of Admin Interface Style
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public function __construct() {
add_action( 'rest_api_init', array( $this, 'register_admin_color_meta' ) );
}

if ( get_option( 'wpcom_admin_interface' ) === 'wp-admin' ) { // Classic sites.
if ( ( defined( 'WPCOM_ADMIN_BAR_UNIFICATION' ) && WPCOM_ADMIN_BAR_UNIFICATION ) || get_option( 'wpcom_admin_interface' ) === 'wp-admin' ) { // Classic sites.
add_filter( 'css_do_concat', array( $this, 'disable_css_concat_for_color_schemes' ), 10, 2 );
add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_color_scheme_for_sidebar_notice' ) );
} else { // Default and self-hosted sites.
Expand Down
2 changes: 1 addition & 1 deletion projects/packages/masterbar/src/class-main.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
*/
class Main {

const PACKAGE_VERSION = '0.3.1';

Check failure on line 17 in projects/packages/masterbar/src/class-main.php

View workflow job for this annotation

GitHub Actions / Changelogger validity

Version mismatch, expected 0.4.0-alpha but found 0.3.1! You might use `tools/project-version.sh -f -u 0.4.0-alpha packages/masterbar` or `tools/fixup-project-versions.sh` to fix this.

/**
* Initializer.
Expand All @@ -29,7 +29,7 @@

new Admin_Color_Schemes();

if ( get_option( 'wpcom_admin_interface' ) === 'wp-admin' ) {
if ( ( defined( 'WPCOM_ADMIN_BAR_UNIFICATION' ) && WPCOM_ADMIN_BAR_UNIFICATION ) || get_option( 'wpcom_admin_interface' ) === 'wp-admin' ) {
return;
}

Expand Down
Loading