is_theme_paused()
最后更新于:2021-11-27 11:52:19
is_theme_paused( string$theme)Determines whether a theme is technically active but was paused while loading.
参数
- $theme
-
(string) (Required) Path to the theme directory relative to the themes directory.
响应
(bool) True, if in the list of paused themes. False, not in the list.
源文件
文件: gc-admin/includes/theme.php
function is_theme_paused( $theme ) {
if ( ! isset( $GLOBALS['_paused_themes'] ) ) {
return false;
}
if ( get_stylesheet() !== $theme && get_template() !== $theme ) {
return false;
}
return array_key_exists( $theme, $GLOBALS['_paused_themes'] );
}