Theme_Upgrader::theme_info()
Gets the WP_Theme object for a theme.
Метод класса: Theme_Upgrader{}
Хуков нет.
Возвращает
WP_Theme|false
. The theme's info object, or false $theme is not supplied and the last result isn't set.
Использование
$Theme_Upgrader = new Theme_Upgrader(); $Theme_Upgrader->theme_info( $theme );
- $theme(строка)
- The directory name of the theme. This is optional, and if not supplied, the directory name from the last result will be used.
По умолчанию: null
Список изменений
С версии 2.8.0 | Введена. |
С версии 3.0.0 | The $theme argument was added. |
Код Theme_Upgrader::theme_info() Theme Upgrader::theme info WP 6.7.2
public function theme_info( $theme = null ) { if ( empty( $theme ) ) { if ( ! empty( $this->result['destination_name'] ) ) { $theme = $this->result['destination_name']; } else { return false; } } $theme = wp_get_theme( $theme ); $theme->cache_delete(); return $theme; }