get_theme

The timeline below displays how wordpress function get_theme has changed across different WordPress versions. If a version is not listed, refer to the next available version below.

WordPress Version: 4.6

/**
 * Retrieve theme data.
 *
 * @since 1.5.0
 * @deprecated 3.4.0 Use wp_get_theme()
 * @see wp_get_theme()
 *
 * @param string $theme Theme name.
 * @return array|null Null, if theme name does not exist. Theme data, if exists.
 */
function get_theme($theme)
{
    _deprecated_function(__FUNCTION__, '3.4.0', 'wp_get_theme( $stylesheet )');
    $themes = get_themes();
    if (is_array($themes) && array_key_exists($theme, $themes)) {
        return $themes[$theme];
    }
    return null;
}

WordPress Version: 4.4

/**
 * Retrieve theme data.
 *
 * @since 1.5.0
 * @deprecated 3.4.0 Use wp_get_theme()
 * @see wp_get_theme()
 *
 * @param string $theme Theme name.
 * @return array|null Null, if theme name does not exist. Theme data, if exists.
 */
function get_theme($theme)
{
    _deprecated_function(__FUNCTION__, '3.4', 'wp_get_theme( $stylesheet )');
    $themes = get_themes();
    if (is_array($themes) && array_key_exists($theme, $themes)) {
        return $themes[$theme];
    }
    return null;
}

WordPress Version: 3.7

/**
 * Retrieve theme data.
 *
 * @since 1.5.0
 * @deprecated 3.4.0
 * @deprecated Use wp_get_theme()
 * @see wp_get_theme()
 *
 * @param string $theme Theme name.
 * @return array|null Null, if theme name does not exist. Theme data, if exists.
 */
function get_theme($theme)
{
    _deprecated_function(__FUNCTION__, '3.4', 'wp_get_theme( $stylesheet )');
    $themes = get_themes();
    if (is_array($themes) && array_key_exists($theme, $themes)) {
        return $themes[$theme];
    }
    return null;
}