About Page: Use `get_user_language()` for the video subtitles.

Rename `$locale` to `$lang_code` to avoid stomping of the global `$locale`.

See #38485.
Built from https://develop.svn.wordpress.org/trunk@38952


git-svn-id: http://core.svn.wordpress.org/trunk@38895 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Dominik Schilling 2016-10-26 12:11:43 +00:00
parent 81a26f6900
commit 946da2d398
2 changed files with 5 additions and 5 deletions

View File

@ -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' );

View File

@ -4,7 +4,7 @@
* *
* @global string $wp_version * @global string $wp_version
*/ */
$wp_version = '4.7-alpha-38951'; $wp_version = '4.7-alpha-38952';
/** /**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema. * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.