Always localize `mediaelement` when passing settings to the page via JSON. `wp-mediaelement` only gets triggered for audio and video shortcodes, playlists need the path passed to the page as well, as they don't enqueue `wp-mediaelement`.
See #27509. Built from https://develop.svn.wordpress.org/trunk@27734 git-svn-id: http://core.svn.wordpress.org/trunk@27571 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
eddc48def7
commit
b1316b9392
|
@ -326,7 +326,7 @@ function wp_default_scripts( &$scripts ) {
|
|||
|
||||
|
||||
$scripts->add( 'wp-mediaelement', "/wp-includes/js/mediaelement/wp-mediaelement.js", array('mediaelement'), false, 1 );
|
||||
did_action( 'init' ) && $scripts->localize( 'wp-mediaelement', '_wpmejsSettings', array(
|
||||
did_action( 'init' ) && $scripts->localize( 'mediaelement', '_wpmejsSettings', array(
|
||||
'pluginPath' => includes_url( 'js/mediaelement/', 'relative' ),
|
||||
) );
|
||||
|
||||
|
|
Loading…
Reference in New Issue