Skip to content

Commit

Permalink
Restore Color Scheme on interface change
Browse files Browse the repository at this point in the history
  • Loading branch information
lupus2k committed Feb 1, 2024
1 parent d5e7151 commit 3c5f34e
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,6 @@ public function __construct() {
// request. Although `get_connected_user_data` tries to save the data for
// future uses on a transient, the data is not guaranteed to be cached.
update_user_option( $this->user_id, 'jetpack_wpcom_is_rtl', $this->is_rtl ? '1' : '0' );
update_user_option( $this->user_id, 'admin_color', get_user_meta( $this->user_id, 'admin_color', true ) );
if ( isset( $this->user_data['use_wp_admin_links'] ) ) {
update_user_option( $this->user_id, 'jetpack_admin_menu_link_destination', $this->user_data['use_wp_admin_links'] ? '1' : '0' );
}
Expand All @@ -142,8 +141,11 @@ public function __construct() {
$this->user_locale = $this->get_jetpack_locale( $this->user_locale );
$this->install_locale( $this->user_locale );
update_user_option( $this->user_id, 'locale', $this->user_locale, true );
update_user_option( $this->user_id, 'admin_color', $this->user_data['color_scheme'] );
}
if ( 'wp-admin' === get_option( 'wpcom_admin_interface' ) ) {
update_user_option( $this->user_id, 'admin_color', get_user_meta( $this->user_id, 'admin_color', true ) );
}

add_action( 'admin_bar_init', array( $this, 'init' ) );

if ( ! empty( $this->user_data['ID'] ) ) {
Expand Down

0 comments on commit 3c5f34e

Please sign in to comment.