Whether a child theme is in use.
Source
function is_child_theme() {
global $wp_stylesheet_path, $wp_template_path;
return $wp_stylesheet_path !== $wp_template_path;
}
| CARVIEW |
Whether a child theme is in use.
function is_child_theme() {
global $wp_stylesheet_path, $wp_template_path;
return $wp_stylesheet_path !== $wp_template_path;
}
| Used by | Description |
|---|---|
get_block_asset_url()wp-includes/blocks.php | Gets the URL to a block asset. |
WP_Site_Health::get_test_theme_version()wp-admin/includes/class-wp-site-health.php | Tests if themes are outdated, or unnecessary. |
wp_get_active_and_valid_themes()wp-includes/load.php | Retrieves an array of active and valid themes. |
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. |
locate_template()wp-includes/template.php | Retrieves the name of the highest priority template file that exists. |
get_body_class()wp-includes/post-template.php | Retrieves an array of the class names for the body element. |
You must log in before being able to contribute a note or feedback.
WARNING: This function uses the
TEMPLATEPATHandSTYLESHEETPATHconstants internally. If calling from a plugin, such as during plugin activation, there’s a chance these will be undefined. It is better to use: