mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-04-14 01:24:27 +00:00
Media: Enable selective optout for video and audio shortcodes.
Make the JavaScript selectors for audio and video shortcodes aware of the state of the `wp_video_shortcode_library` and `wp_audio_shortcode_library` filters. Allow extenders to replace the library for either media shortcode. Props westonruter, joedolson, rudlinkon, obayedmamur. Fixes #40144. git-svn-id: https://develop.svn.wordpress.org/trunk@55271 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -1111,6 +1111,10 @@ function wp_default_scripts( $scripts ) {
|
||||
'pluginPath' => includes_url( 'js/mediaelement/', 'relative' ),
|
||||
'classPrefix' => 'mejs-',
|
||||
'stretching' => 'responsive',
|
||||
/** This filter is documented in wp-includes/media.php */
|
||||
'audioShortcodeLibrary' => apply_filters( 'wp_audio_shortcode_library', 'mediaelement' ),
|
||||
/** This filter is documented in wp-includes/media.php */
|
||||
'videoShortcodeLibrary' => apply_filters( 'wp_video_shortcode_library', 'mediaelement' ),
|
||||
);
|
||||
did_action( 'init' ) && $scripts->localize(
|
||||
'mediaelement',
|
||||
|
||||
Reference in New Issue
Block a user