load_default_embeds
Filters whether to load the default embed handlers.
Returning a falsey value will prevent loading the default embed handlers.
Использование
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.
По умолчанию: true
Список изменений
С версии 2.9.0 | Введена. |
Где вызывается хук
wp-includes/embed.php 201
if ( ! apply_filters( 'load_default_embeds', true ) ) {