About Page: Use get_user_language()
for the video subtitles.
Rename `$locale` to `$lang_code` to avoid stomping of the global `$locale`. See #38485. git-svn-id: https://develop.svn.wordpress.org/trunk@38952 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
a9516abb54
commit
36e260f1b5
@ -34,10 +34,10 @@ function _wp_override_admin_video_width_limit( $output ) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
$video_url = 'https://videopress.com/embed/GbdhpGF3?hd=true';
|
$video_url = 'https://videopress.com/embed/GbdhpGF3?hd=true';
|
||||||
$locale = str_replace( '_', '-', get_locale() );
|
$lang_code = str_replace( '_', '-', get_user_locale() );
|
||||||
list( $locale ) = explode( '-', $locale );
|
list( $lang_code ) = explode( '-', $lang_code );
|
||||||
if ( 'en' !== $locale ) {
|
if ( 'en' !== $lang_code ) {
|
||||||
$video_url = add_query_arg( 'defaultLangCode', $locale, $video_url );
|
$video_url = add_query_arg( 'defaultLangCode', $lang_code, $video_url );
|
||||||
}
|
}
|
||||||
|
|
||||||
$title = __( 'About' );
|
$title = __( 'About' );
|
||||||
|
Loading…
Reference in New Issue
Block a user