get_current_theme

The timeline below displays how wordpress function get_current_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 current theme name.
 *
 * @since 1.5.0
 * @deprecated 3.4.0 Use wp_get_theme()
 * @see wp_get_theme()
 *
 * @return string
 */
function get_current_theme()
{
    _deprecated_function(__FUNCTION__, '3.4.0', 'wp_get_theme()');
    if ($theme = get_option('current_theme')) {
        return $theme;
    }
    return wp_get_theme()->get('Name');
}

WordPress Version: 4.4

/**
 * Retrieve current theme name.
 *
 * @since 1.5.0
 * @deprecated 3.4.0 Use wp_get_theme()
 * @see wp_get_theme()
 *
 * @return string
 */
function get_current_theme()
{
    _deprecated_function(__FUNCTION__, '3.4', 'wp_get_theme()');
    if ($theme = get_option('current_theme')) {
        return $theme;
    }
    return wp_get_theme()->get('Name');
}

WordPress Version: 3.7

/**
 * Retrieve current theme name.
 *
 * @since 1.5.0
 * @deprecated 3.4.0
 * @deprecated Use (string) wp_get_theme()
 * @see wp_get_theme()
 *
 * @return string
 */
function get_current_theme()
{
    _deprecated_function(__FUNCTION__, '3.4', 'wp_get_theme()');
    if ($theme = get_option('current_theme')) {
        return $theme;
    }
    return wp_get_theme()->get('Name');
}