On this page
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 ( TEMPLATEPATH !== STYLESHEETPATH );
}
Related
Used By
| Used By | Description |
|---|---|
| WP_Site_Health::get_test_theme_version() wp-admin/includes/class-wp-site-health.php | Tests if themes are outdated, or unnecessary. |
| WP_Customize_Manager::prepare_starter_content_attachments() wp-includes/class-wp-customize-manager.php | Prepares starter content attachments. |
| get_editor_stylesheets() wp-includes/theme.php | Retrieves any registered editor stylesheet URLs. |
| validate_current_theme() wp-includes/theme.php | Checks that the active theme has the required files. |
Changelog
| Version | Description |
|---|---|
| 3.0.0 | Introduced. |
© 2003–2022 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/functions/is_child_theme