WordPress.org

Make WordPress Core

Ticket #42574: 42574.5.diff

File 42574.5.diff, 1014 bytes (added by SergeyBiryukov, 3 months ago)
  • src/wp-includes/script-loader.php

     
    357357        $scripts->add( 'mediaelement-migrate', "/wp-includes/js/mediaelement/mediaelement-migrate$suffix.js", array(), false, 1); 
    358358 
    359359        did_action( 'init' ) && $scripts->add_inline_script( 'mediaelement-core', sprintf( 'var mejsL10n = %s;', wp_json_encode( array( 
    360                 'language' => strtolower( str_replace( '_', '-', is_admin() ? get_user_locale() : get_locale() ) ), 
     360                'language' => strtolower( strtok( is_admin() ? get_user_locale() : get_locale(), '_-' ) ), 
    361361                'strings'  => array( 
    362362                        '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/' ), 
    363363                        'mejs.fullscreen-off'      => __( 'Turn off Fullscreen' ),