diff --git a/src/wp-includes/script-loader.php b/src/wp-includes/script-loader.php index cc401f6925..0202474f84 100644 --- a/src/wp-includes/script-loader.php +++ b/src/wp-includes/script-loader.php @@ -357,7 +357,7 @@ function wp_default_scripts( &$scripts ) { $scripts->add( 'mediaelement-migrate', "/wp-includes/js/mediaelement/mediaelement-migrate$suffix.js", array(), false, 1); did_action( 'init' ) && $scripts->add_inline_script( 'mediaelement-core', sprintf( 'var mejsL10n = %s;', wp_json_encode( array( - 'language' => strtolower( str_replace( '_', '-', is_admin() ? get_user_locale() : get_locale() ) ), + 'language' => strtolower( strtok( is_admin() ? get_user_locale() : get_locale(), '_-' ) ), 'strings' => array( 'mejs.install-flash' => __( 'You are using a browser that does not have Flash player enabled or installed. Please turn on your Flash player plugin or download the latest version from https://get.adobe.com/flashplayer/' ), 'mejs.fullscreen-off' => __( 'Turn off Fullscreen' ),