wp_mediaelement_fallback
Filters the MediaElement fallback output for no-JS.
Usage
add_filter( 'wp_mediaelement_fallback', 'wp_kama_mediaelement_fallback_filter', 10, 2 ); /** * Function for `wp_mediaelement_fallback` filter-hook. * * @param string $output Fallback output for no-JS. * @param string $url Media file URL. * * @return string */ function wp_kama_mediaelement_fallback_filter( $output, $url ){ // filter... return $output; }
- $output(string)
- Fallback output for no-JS.
- $url(string)
- Media file URL.
Changelog
Since 3.6.0 | Introduced. |
Where the hook is called
wp_mediaelement_fallback
wp-includes/media.php 3163
return apply_filters( 'wp_mediaelement_fallback', sprintf( '<a href="%1$s">%1$s</a>', esc_url( $url ) ), $url );