Last active
July 31, 2018 08:26
-
-
Save westonruter/2ed5d98957c5a6e94c580c47abbb476a to your computer and use it in GitHub Desktop.
WP #42574: Fix for ME.js and formal languages. https://core.trac.wordpress.org/ticket/42574
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Plugin name: WP Trac #42574: Fix for formal languages. | |
* Plugin URI: https://core.trac.wordpress.org/ticket/42574 | |
* Author: Weston Ruter, XWP. | |
* Author URI: https://weston.ruter.net | |
*/ | |
function wp_42574_fix_mejs_formal_languages( WP_Scripts $scripts ) { | |
$scripts->add_inline_script( | |
'mediaelement-core', | |
'mejsL10n.language = mejsL10n.language.replace( /^(\w\w+[-_]\w\w).+/, "$1" );', | |
'before' | |
); | |
} | |
add_action( 'wp_default_scripts', 'wp_42574_fix_mejs_formal_languages', 11 ); |
Thank you very much, Weston!
Thank you!
That helped a lot. Much appreciated!
Thanks a lot.. It works perfectly...
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Many thanks for your fix!