From abefb963e7e55e878aefd9e693bd67c2bd84a309 Mon Sep 17 00:00:00 2001 From: Scott Taylor Date: Fri, 18 Sep 2015 20:00:27 +0000 Subject: [PATCH] Media: add a filter, `'mejs_settings'`, to allow devs to pass more config settings to MediaElement. Fixes #33506. Built from https://develop.svn.wordpress.org/trunk@34311 git-svn-id: http://core.svn.wordpress.org/trunk@34275 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/script-loader.php | 14 ++++++++++++-- wp-includes/version.php | 2 +- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/wp-includes/script-loader.php b/wp-includes/script-loader.php index a3a1a5690e..26a3f8cab7 100644 --- a/wp-includes/script-loader.php +++ b/wp-includes/script-loader.php @@ -351,9 +351,19 @@ 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( 'mediaelement', '_wpmejsSettings', array( + $mejs_settings = array( 'pluginPath' => includes_url( 'js/mediaelement/', 'relative' ), - ) ); + ); + did_action( 'init' ) && $scripts->localize( 'mediaelement', '_wpmejsSettings', + /** + * Filter the MediaElement configuration settings. + * + * @since 4.4.0 + * + * @param array $mejs_settings MediaElement settings array. + */ + apply_filters( 'mejs_settings', $mejs_settings ) + ); $scripts->add( 'froogaloop', "/wp-includes/js/mediaelement/froogaloop.min.js", array(), '2.0' ); $scripts->add( 'wp-playlist', "/wp-includes/js/mediaelement/wp-playlist.js", array( 'wp-util', 'backbone', 'mediaelement' ), false, 1 ); diff --git a/wp-includes/version.php b/wp-includes/version.php index aa382c0099..ce4ff21ceb 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.4-alpha-34310'; +$wp_version = '4.4-alpha-34311'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.