wp_using_themes
Filters whether the current request should use themes.
Использование
add_filter( 'wp_using_themes', 'wp_kama_using_themes_filter' );
/**
* Function for `wp_using_themes` filter-hook.
*
* @param bool $wp_using_themes Whether the current request should use themes.
*
* @return bool
*/
function wp_kama_using_themes_filter( $wp_using_themes ){
// filter...
return $wp_using_themes;
}
- $wp_using_themes(true|false)
- Whether the current request should use themes.
Список изменений
| С версии 5.1.0 | Введена. |
Где вызывается хук
wp_using_themes
wp-includes/load.php 1767
return apply_filters( 'wp_using_themes', defined( 'WP_USE_THEMES' ) && WP_USE_THEMES );
Где используется хук в WordPress
wp-includes/load.php 1116
add_filter( 'wp_using_themes', '__return_false' );