функция
Устаревший since 1.5.0
get_theme()
Устаревшее.
Помечено устаревшим с версии 3.4.0.
Проверено на WordPress 6.9, обновлено Источник: WordPress Developer Resources.
Сигнатура
get_theme( string $theme ): array|null
Описание
См. alsowp_get_theme()
Оригинал (английский)
Параметры
$theme
string
обязательный
Имя темы.
Возвращаемое значение
array|null
Исходный код
wp-includes/deprecated.php:2944
function get_theme( $theme ) {
_deprecated_function( __FUNCTION__, '3.4.0', 'wp_get_theme( $stylesheet )' );
$themes = get_themes();
if ( is_array( $themes ) && array_key_exists( $theme, $themes ) )
return $themes[ $theme ];
return null;
}
История изменений
| Версия | Описание |
|---|---|
| 3.4.0 | Deprecated. Use wp_get_theme() |
| 1.5.0 | Introduced. |

