wp_mediaelement_fallback
Filters the MediaElement fallback output for no-JS.
Использование
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(строка)
- Fallback output for no-JS.
- $url(строка)
- Media file URL.
Список изменений
| С версии 3.6.0 | Введена. |
Где вызывается хук
wp_mediaelement_fallback
wp-includes/media.php 3316
return apply_filters( 'wp_mediaelement_fallback', sprintf( '<a href="%1$s">%1$s</a>', esc_url( $url ) ), $url );