WP_Theme::__toString()publicWP 3.4.0

When converting the object to a string, the theme name is returned.

Method of the class: WP_Theme{}

No Hooks.

Return

String. Theme name, ready for display (translated)

Usage

$WP_Theme = new WP_Theme();
$WP_Theme->__toString();

Changelog

Since 3.4.0 Introduced.

WP_Theme::__toString() code WP 6.5.2

public function __toString() {
	return (string) $this->display( 'Name' );
}