WordPress at a glance
function is not described

WP_Theme::__toString() public WP 3.4.0

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

It's a 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.

Code of WP_Theme::__toString() WP 5.5.1

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