Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
WP #42574: Fix for ME.js and formal languages.
* Plugin name: WP Trac #42574: Fix for formal languages.
* Plugin URI:
* Author: Weston Ruter, XWP.
* Author URI:
function wp_42574_fix_mejs_formal_languages( WP_Scripts $scripts ) {
'mejsL10n.language = mejsL10n.language.replace( /^(\w\w+[-_]\w\w).+/, "$1" );',
add_action( 'wp_default_scripts', 'wp_42574_fix_mejs_formal_languages', 11 );

Many thanks for your fix!

Thank you very much, Weston!

Thank you!

That helped a lot. Much appreciated!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment