Theme_Upgrader::theme_info() – Get the WP_Theme object for a theme.

You appear to be a bot. Output may be restricted

Description

Get the WP_Theme object for a theme.

Usage

$WP_Theme|false = Theme_Upgrader::theme_info( $theme );

Parameters

$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.

Returns

WP_Theme|false The theme's info object, or false $theme is not supplied and the last result isn't set.

Source

File name: wordpress/wp-admin/includes/class-theme-upgrader.php
Lines:

1 to 14 of 14
  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;
  }
 

 View on GitHub View on Trac