wp_get_theme_error

Advertisement

Summery Summery

Gets the error that was recorded for a paused theme.

Syntax Syntax

wp_get_theme_error( string $theme )

Parameters Parameters

$theme

(string) (Required) Path to the theme directory relative to the themes directory.

Return Return

(array|false) Array of error information as it was returned by error_get_last(), or false if none was recorded.

Source Source

File: wp-admin/includes/theme.php

function wp_get_theme_error( $theme ) {
	if ( ! isset( $GLOBALS['_paused_themes'] ) ) {
		return false;
	}

	if ( ! array_key_exists( $theme, $GLOBALS['_paused_themes'] ) ) {
		return false;
	}

	return $GLOBALS['_paused_themes'][ $theme ];
}

Advertisement

Changelog Changelog

Changelog
Version Description
5.2.0 Introduced.

Advertisement

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.