wp_audio_shortcode_library
Filters the media library used for the audio shortcode.
Description
Parameters (1)
- 0. $mediaelement (string) =>
'mediaelement'
- The mediaelement.
Usage
- To run the hook, copy the example below.
- $mediaelement = apply_filters( 'wp_audio_shortcode_library', $mediaelement );
- if ( !empty( $mediaelement ) ) {
- // everything has led up to this point...
- }
- The following example is for adding a hook callback.
- // define the wp_audio_shortcode_library callback
- function filter_wp_audio_shortcode_library( $mediaelement ) {
- // make filter magic happen here...
- return $mediaelement;
- };
- // add the filter
- add_filter( 'wp_audio_shortcode_library', 'filter_wp_audio_shortcode_library', 10, 1 );
- To remove a hook callback, use the example below.
- // remove the filter
- remove_filter( 'wp_audio_shortcode_library', 'filter_wp_audio_shortcode_library', 10, 1 );
Defined (1)
The filter is defined in the following location(s).
- /modules/infinite-scroll.php
- if ( 'mediaelement' === apply_filters( 'wp_audio_shortcode_library', 'mediaelement' ) ) {