Uses
Uses | Description |
---|---|
wp-includes/theme.php: wp_get_theme() | Gets a WP_Theme object for a theme. |
Get the WP_Theme object for a 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
(WP_Theme|false) The theme's info object, or false $theme
is not supplied and the last result isn't set.
File: wp-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 = wp_get_theme( $theme ); $theme->cache_delete(); return $theme; }
Version | Description |
---|---|
3.0.0 | The $theme argument was added. |
2.8.0 | Introduced. |
© 2003–2019 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/classes/theme_upgrader/theme_info