is_child_theme(): bool
Whether a child theme is in use.
Return
bool True if a child theme is in use, false otherwise.
Source
File: wp-includes/theme.php
.
View all references
function is_child_theme() {
return get_template_directory() !== get_stylesheet_directory();
}
Changelog
Version | Description |
---|---|
3.0.0 | Introduced. |
User Contributed Notes
You must log in before being able to contribute a note or feedback.
WARNING: This function uses the
TEMPLATEPATH
andSTYLESHEETPATH
constants internally. If calling from a plugin, such as during plugin activation, there’s a chance these will be undefined. It is better to use: