wp/wp-admin/admin-header.php
changeset 22 8c2e4d02f4ef
parent 21 48c4eec2b7e6
equal deleted inserted replaced
21:48c4eec2b7e6 22:8c2e4d02f4ef
     3  * WordPress Administration Template Header
     3  * WordPress Administration Template Header
     4  *
     4  *
     5  * @package WordPress
     5  * @package WordPress
     6  * @subpackage Administration
     6  * @subpackage Administration
     7  */
     7  */
       
     8 
       
     9 // Don't load directly.
       
    10 if ( ! defined( 'ABSPATH' ) ) {
       
    11 	die( '-1' );
       
    12 }
     8 
    13 
     9 header( 'Content-Type: ' . get_option( 'html_type' ) . '; charset=' . get_option( 'blog_charset' ) );
    14 header( 'Content-Type: ' . get_option( 'html_type' ) . '; charset=' . get_option( 'blog_charset' ) );
    10 if ( ! defined( 'WP_ADMIN' ) ) {
    15 if ( ! defined( 'WP_ADMIN' ) ) {
    11 	require_once __DIR__ . '/admin.php';
    16 	require_once __DIR__ . '/admin.php';
    12 }
    17 }
   201 
   206 
   202 if ( is_network_admin() ) {
   207 if ( is_network_admin() ) {
   203 	$admin_body_class .= ' network-admin';
   208 	$admin_body_class .= ' network-admin';
   204 }
   209 }
   205 
   210 
   206 $admin_body_class .= ' no-customize-support no-svg';
   211 $admin_body_class .= ' no-customize-support svg';
   207 
   212 
   208 if ( $current_screen->is_block_editor() ) {
   213 if ( $current_screen->is_block_editor() ) {
   209 	$admin_body_class .= ' block-editor-page wp-embed-responsive';
   214 	$admin_body_class .= ' block-editor-page wp-embed-responsive';
       
   215 }
       
   216 
       
   217 $admin_body_class .= ' wp-theme-' . sanitize_html_class( get_template() );
       
   218 if ( is_child_theme() ) {
       
   219 	$admin_body_class .= ' wp-child-theme-' . sanitize_html_class( get_stylesheet() );
   210 }
   220 }
   211 
   221 
   212 $error_get_last = error_get_last();
   222 $error_get_last = error_get_last();
   213 
   223 
   214 // Print a CSS class to make PHP errors visible.
   224 // Print a CSS class to make PHP errors visible.