is_theme_paused() – Determines whether a theme is technically active but was paused while loading.

You appear to be a bot. Output may be restricted

Description

Determines whether a theme is technically active but was paused while loading.

For more information on this and similar theme functions, check out the {@link https://developer.wordpress.org/themes/basics/conditional-tags/ Conditional Tags} article in the Theme Developer Handbook.

Usage

$bool = is_theme_paused( $theme );

Parameters

$theme
( string ) required – Path to the theme directory relative to the themes directory.

Returns

bool True, if in the list of paused themes. False, not in the list.

Source

File name: wordpress/wp-admin/includes/theme.php
Lines:

1 to 11 of 11
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'] );
}
 

 View on GitHub View on Trac