wpseek.com
Eine auf WordPress spezialiserte Suchmaschine für Entwickler und Theme-Autoren



is_theme_paused › WordPress Function

Seit5.2.0
Veraltetn/v
is_theme_paused ( $theme )
Parameter:
  • (string) $theme Path to the theme directory relative to the themes directory.
    Erforderlich: Ja
Gibt zurück:
  • (bool) True, if in the list of paused themes. False, not in the list.
Definiert in:
Codex:

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 Conditional Tags} article in the Theme Developer Handbook.


Quellcode

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'] );
}