WordPress как на ладони
Недорогой хостинг для сайтов на WordPress: wordpress.jino.ru
функция не описана

WP_Theme::get() WP 3.4.0

Get a raw, unformatted theme header.

The header is sanitized, but is not translated, and is not marked up for display. To get a theme header for display, use the display() method.

Use the get_template() method, not the 'Template' header, for finding the template. The 'Template' header is only good for what was written in the style.css, while get_template() takes into account where WordPress actually located the theme and whether it is actually valid.

Это метод класса: WP_Theme

Хуков нет.

Возвращает

Строку/false. String on success, false on failure.

Использование

$WP_Theme = new WP_Theme();
$var = $WP_Theme->get( $header );
$header(строка) (обязательный)
Theme header. Name, Description, Author, Version, ThemeURI, AuthorURI, Status, Tags.

Код WP Theme::get: wp-includes/class-wp-theme.php WP 5.2.1

<?php
public function get( $header ) {
	if ( ! isset( $this->headers[ $header ] ) ) {
		return false;
	}

	if ( ! isset( $this->headers_sanitized ) ) {
		$this->headers_sanitized = $this->cache_get( 'headers' );
		if ( ! is_array( $this->headers_sanitized ) ) {
			$this->headers_sanitized = array();
		}
	}

	if ( isset( $this->headers_sanitized[ $header ] ) ) {
		return $this->headers_sanitized[ $header ];
	}

	// If themes are a persistent group, sanitize everything and cache it. One cache add is better than many cache sets.
	if ( self::$persistently_cache ) {
		foreach ( array_keys( $this->headers ) as $_header ) {
			$this->headers_sanitized[ $_header ] = $this->sanitize_header( $_header, $this->headers[ $_header ] );
		}
		$this->cache_add( 'headers', $this->headers_sanitized );
	} else {
		$this->headers_sanitized[ $header ] = $this->sanitize_header( $header, $this->headers[ $header ] );
	}

	return $this->headers_sanitized[ $header ];
}