diff --git a/wp-admin/admin-header.php b/wp-admin/admin-header.php index 54bcc11ca5..ea0245fdb1 100644 --- a/wp-admin/admin-header.php +++ b/wp-admin/admin-header.php @@ -214,6 +214,11 @@ if ( $current_screen->is_block_editor() ) { $admin_body_class .= ' block-editor-page wp-embed-responsive'; } +$admin_body_class .= ' wp-theme-' . sanitize_html_class( get_template() ); +if ( is_child_theme() ) { + $admin_body_class .= ' wp-child-theme-' . sanitize_html_class( get_stylesheet() ); +} + $error_get_last = error_get_last(); // Print a CSS class to make PHP errors visible. diff --git a/wp-includes/post-template.php b/wp-includes/post-template.php index 8b84b86702..ffcca1647d 100644 --- a/wp-includes/post-template.php +++ b/wp-includes/post-template.php @@ -838,6 +838,11 @@ function get_body_class( $css_class = '' ) { } } + $classes[] = 'wp-theme-' . sanitize_html_class( get_template() ); + if ( is_child_theme() ) { + $classes[] = 'wp-child-theme-' . sanitize_html_class( get_stylesheet() ); + } + if ( ! empty( $css_class ) ) { if ( ! is_array( $css_class ) ) { $css_class = preg_split( '#\s+#', $css_class ); diff --git a/wp-includes/version.php b/wp-includes/version.php index 8b9641deda..290c4cabdd 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.8-alpha-59697'; +$wp_version = '6.8-alpha-59698'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.