load_default_embeds
Filters whether to load the default embed handlers.
Returning a falsey value will prevent loading the default embed handlers.
Usage
add_filter( 'load_default_embeds', 'wp_kama_load_default_embeds_filter' ); /** * Function for `load_default_embeds` filter-hook. * * @param bool $maybe_load_embeds Whether to load the embeds library. * * @return bool */ function wp_kama_load_default_embeds_filter( $maybe_load_embeds ){ // filter... return $maybe_load_embeds; }
- $maybe_load_embeds(true|false)
- Whether to load the embeds library.
Default: true
Changelog
Since 2.9.0 | Introduced. |
Where the hook is called
wp-includes/embed.php 201
if ( ! apply_filters( 'load_default_embeds', true ) ) {