# get_theme_data()

URL: https://chugunov.pro/api-wordpress/functions/get_theme_data/
Проверено на WordPress 6.9, обновлено 06.08.2026.
Источник: независимый русскоязычный справочник chugunov.pro. Не является официальной документацией WordPress.

Тип: функция.
Появился в версии: 1.5.0.

> Устаревший элемент. Помечен устаревшим с версии 3.4.0.

## Сигнатура

```php
get_theme_data( string $theme_file ): array
```

## Описание

См. alsowp_get_theme()

## Параметры

- `$theme_file` `string` — обязательный. Путь к файлу темы.

## Возвращаемое значение

`array`

## Исходный код

Файл: `wp-includes/deprecated.php:3082`

```php
function get_theme_data( $theme_file ) {
	_deprecated_function( __FUNCTION__, '3.4.0', 'wp_get_theme()' );
	$theme = new WP_Theme( wp_basename( dirname( $theme_file ) ), dirname( dirname( $theme_file ) ) );

	$theme_data = array(
		'Name' => $theme->get('Name'),
		'URI' => $theme->display('ThemeURI', true, false),
		'Description' => $theme->display('Description', true, false),
		'Author' => $theme->display('Author', true, false),
		'AuthorURI' => $theme->display('AuthorURI', true, false),
		'Version' => $theme->get('Version'),
		'Template' => $theme->get('Template'),
		'Status' => $theme->get('Status'),
		'Tags' => $theme->get('Tags'),
		'Title' => $theme->get('Name'),
		'AuthorName' => $theme->get('Author'),
	);

	foreach ( apply_filters( 'extra_theme_headers', array() ) as $extra_header ) {
		if ( ! isset( $theme_data[ $extra_header ] ) )
			$theme_data[ $extra_header ] = $theme->get( $extra_header );
	}

	return $theme_data;
}
```

## История изменений

- 3.4.0 — Deprecated. Use wp_get_theme()
- 1.5.0 — Introduced.

## Связанные

Использует: `WP_Theme::__construct`, `WP_Theme`, [`wp_basename`](https://chugunov.pro/api-wordpress/functions/wp_basename/), [`_deprecated_function`](https://chugunov.pro/api-wordpress/functions/_deprecated_function/), [`apply_filters`](https://chugunov.pro/api-wordpress/functions/apply_filters/).

Оригинал в официальной документации: https://developer.wordpress.org/reference/functions/get_theme_data/
