On this page
get_current_theme(): string
This function has been deprecated. Use wp_get_theme() instead.
Retrieve current theme name.
Description
See also
Return
string
Source
File: wp-includes/deprecated.php. View all references
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');
}
Related
Uses
| Uses | Description |
|---|---|
| WP_Theme::get() wp-includes/class-wp-theme.php | Gets a raw, unformatted theme header. |
| wp_get_theme() wp-includes/theme.php | Gets a WP_Theme object for a theme. |
| _deprecated_function() wp-includes/functions.php | Marks a function as deprecated and inform when it has been used. |
| get_option() wp-includes/option.php | Retrieves an option value based on an option name. |
Changelog
| Version | Description |
|---|---|
| 3.4.0 | Use wp_get_theme() |
| 1.5.0 | Introduced. |
© 2003–2022 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/functions/get_current_theme