Theme_Upgrader::theme_info()
最后更新于:2021-11-26 04:17:15
Theme_Upgrader::theme_info( string$theme=null)Get the GC_Theme object for a theme.
参数
- $theme
-
(string) (Optional) The directory name of the theme. This is optional, and if not supplied, the directory name from the last result will be used.
Default value: null
响应
(GC_Theme|false) The theme’s info object, or false $theme
is not supplied and the last result isn’t set.
源文件
文件: gc-admin/includes/class-theme-upgrader.php
public function theme_info( $theme = null ) {
if ( empty( $theme ) ) {
if ( ! empty( $this->result['destination_name'] ) ) {
$theme = $this->result['destination_name'];
} else {
return false;
}
}
$theme = gc_get_theme( $theme );
$theme->cache_delete();
return $theme;
}