Skip to content
This repository was archived by the owner on Feb 29, 2024. It is now read-only.

Commit 1aa44ca

Browse files
committed
fix redirect to browser language
1 parent 3787c16 commit 1aa44ca

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

core/class-wpm-setup.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ public function set_user_language() {
244244
}
245245

246246
$url = str_replace( $base_url, $b_home_url, wpm_get_current_url() );
247-
wp_redirect( $url, 301 );
247+
wp_redirect( $url );
248248
exit;
249249
}
250250
}
@@ -294,7 +294,7 @@ public function set_locale() {
294294
if ( ( $value == $user_language ) ) {
295295
switch_to_locale( $key );
296296
if ( $key == $default_locale && ! is_admin() && ! isset( $_GET['lang'] ) ) {
297-
wp_redirect( home_url( str_replace( '/' . $user_language . '/', '/', $_SERVER['REQUEST_URI'] ) ), 301 );
297+
wp_redirect( home_url( str_replace( '/' . $user_language . '/', '/', $_SERVER['REQUEST_URI'] ) ) );
298298
exit;
299299
}
300300
break;

readme.txt

+1
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,7 @@ Compatible with multisite not tested.
135135

136136
= 1.3.3 =
137137
* fix setting for default site language
138+
* fix redirect to browser language
138139

139140
= 1.3.2 =
140141
* add setting for default site language

0 commit comments

Comments
 (0)