WP_Theme::exists

Advertisement

Summery Summery

Whether the theme exists.

Syntax Syntax

WP_Theme::exists()

Description Description

A theme with errors exists. A theme with the error of ‘theme_not_found’, meaning that the theme’s directory was not found, does not exist.

Return Return

(bool) Whether the theme exists.

Source Source

File: wp-includes/class-wp-theme.php

		return ! ( $this->errors() && in_array( 'theme_not_found', $this->errors()->get_error_codes(), true ) );
	}

Advertisement

Changelog Changelog

Changelog
Version Description
3.4.0 Introduced.

Advertisement

Leave a Reply