Make WordPress Core


Ignore:
Timestamp:
02/07/2023 03:57:24 PM (2 years ago)
Author:
joedolson
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/script-loader.php

    r55269 r55271  
    11121112        'classPrefix' => 'mejs-',
    11131113        'stretching'  => 'responsive',
     1114        /** This filter is documented in wp-includes/media.php */
     1115        'audioShortcodeLibrary' => apply_filters( 'wp_audio_shortcode_library', 'mediaelement' ),
     1116        /** This filter is documented in wp-includes/media.php */
     1117        'videoShortcodeLibrary' => apply_filters( 'wp_video_shortcode_library', 'mediaelement' ),
    11141118    );
    11151119    did_action( 'init' ) && $scripts->localize(
Note: See TracChangeset for help on using the changeset viewer.