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.



git-svn-id: https://develop.svn.wordpress.org/trunk@27734 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Scott Taylor 2014-03-26 12:14:18 +00:00
parent 323f9c0eb9
commit 5745c4ab5b
1 changed files with 1 additions and 1 deletions

View File

@ -326,7 +326,7 @@ function wp_default_scripts( &$scripts ) {
$scripts->add( 'wp-mediaelement', "/wp-includes/js/mediaelement/wp-mediaelement.js", array('mediaelement'), false, 1 ); $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' ), 'pluginPath' => includes_url( 'js/mediaelement/', 'relative' ),
) ); ) );