Skip to content

Commit

Permalink
Remove second language selector & use site locale
Browse files Browse the repository at this point in the history
  • Loading branch information
lupus2k committed Feb 1, 2024
1 parent 2a9e3c9 commit 14eddb2
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ public function __construct() {
update_user_option( $this->user_id, 'jetpack_admin_menu_link_destination', $this->user_data['use_wp_admin_links'] ? '1' : '0' );
}
// If Atomic, store and install user locale.
if ( $this->site_woa ) {
if ( $this->site_woa && 'wp-admin' !== get_option( 'wpcom_admin_interface' ) ) {
$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 );
Expand Down Expand Up @@ -214,6 +214,7 @@ class_exists( 'Jetpack_AMP_Support' )

// Hides and replaces the language dropdown for the current user, on WoA.
if ( $this->site_woa &&
'wp-admin' !== get_option( 'wpcom_admin_interface' ) &&
defined( 'IS_PROFILE_PAGE' ) && IS_PROFILE_PAGE ) {
add_action( 'user_edit_form_tag', array( $this, 'hide_language_dropdown' ) );
add_action( 'personal_options', array( $this, 'replace_language_dropdown' ), 9 );
Expand Down

0 comments on commit 14eddb2

Please sign in to comment.