Gets the WP_Theme object for a theme.
Parameters
$theme
stringoptional- The directory name of the theme. This is optional, and if not supplied, the directory name from the last result will be used.
Default:
null
Source
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;
}
User Contributed Notes
You must log in before being able to contribute a note or feedback.