web/wp-admin/admin-header.php
changeset 204 09a1c134465b
parent 194 32102edaa81b
equal deleted inserted replaced
203:f507feede89a 204:09a1c134465b
    48 
    48 
    49 $admin_body_class = preg_replace('/[^a-z0-9_-]+/i', '-', $hook_suffix);
    49 $admin_body_class = preg_replace('/[^a-z0-9_-]+/i', '-', $hook_suffix);
    50 ?>
    50 ?>
    51 <script type="text/javascript">
    51 <script type="text/javascript">
    52 addLoadEvent = function(func){if(typeof jQuery!="undefined")jQuery(document).ready(func);else if(typeof wpOnload!='function'){wpOnload=func;}else{var oldonload=wpOnload;wpOnload=function(){oldonload();func();}}};
    52 addLoadEvent = function(func){if(typeof jQuery!="undefined")jQuery(document).ready(func);else if(typeof wpOnload!='function'){wpOnload=func;}else{var oldonload=wpOnload;wpOnload=function(){oldonload();func();}}};
    53 var userSettings = {
    53 var ajaxurl = '<?php echo admin_url( 'admin-ajax.php', 'relative' ); ?>',
    54 		'url': '<?php echo SITECOOKIEPATH; ?>',
       
    55 		'uid': '<?php if ( ! isset($current_user) ) $current_user = wp_get_current_user(); echo $current_user->ID; ?>',
       
    56 		'time':'<?php echo time() ?>'
       
    57 	},
       
    58 	ajaxurl = '<?php echo admin_url( 'admin-ajax.php', 'relative' ); ?>',
       
    59 	pagenow = '<?php echo $current_screen->id; ?>',
    54 	pagenow = '<?php echo $current_screen->id; ?>',
    60 	typenow = '<?php echo $current_screen->post_type; ?>',
    55 	typenow = '<?php echo $current_screen->post_type; ?>',
    61 	adminpage = '<?php echo $admin_body_class; ?>',
    56 	adminpage = '<?php echo $admin_body_class; ?>',
    62 	thousandsSeparator = '<?php echo addslashes( $wp_locale->number_format['thousands_sep'] ); ?>',
    57 	thousandsSeparator = '<?php echo addslashes( $wp_locale->number_format['thousands_sep'] ); ?>',
    63 	decimalPoint = '<?php echo addslashes( $wp_locale->number_format['decimal_point'] ); ?>',
    58 	decimalPoint = '<?php echo addslashes( $wp_locale->number_format['decimal_point'] ); ?>',
    74 do_action('admin_head');
    69 do_action('admin_head');
    75 
    70 
    76 if ( get_user_setting('mfold') == 'f' )
    71 if ( get_user_setting('mfold') == 'f' )
    77 	$admin_body_class .= ' folded';
    72 	$admin_body_class .= ' folded';
    78 
    73 
       
    74 if ( !get_user_setting('unfold') )
       
    75 	$admin_body_class .= ' auto-fold';
       
    76 
    79 if ( is_admin_bar_showing() )
    77 if ( is_admin_bar_showing() )
    80 	$admin_body_class .= ' admin-bar';
    78 	$admin_body_class .= ' admin-bar';
    81 
    79 
    82 if ( is_rtl() )
    80 if ( is_rtl() )
    83 	$admin_body_class .= ' rtl';
    81 	$admin_body_class .= ' rtl';
    92 
    90 
    93 $admin_body_class .= ' no-customize-support';
    91 $admin_body_class .= ' no-customize-support';
    94 
    92 
    95 ?>
    93 ?>
    96 </head>
    94 </head>
    97 <body class="wp-admin no-js <?php echo apply_filters( 'admin_body_class', '' ) . " $admin_body_class"; ?>">
    95 <body class="wp-admin wp-core-ui no-js <?php echo apply_filters( 'admin_body_class', '' ) . " $admin_body_class"; ?>">
    98 <script type="text/javascript">
    96 <script type="text/javascript">
    99 	document.body.className = document.body.className.replace('no-js','js');
    97 	document.body.className = document.body.className.replace('no-js','js');
   100 </script>
    98 </script>
   101 
    99 
   102 <?php
   100 <?php
   105 if ( wp_script_is( 'customize-loader', 'queue' ) && current_user_can( 'edit_theme_options' ) )
   103 if ( wp_script_is( 'customize-loader', 'queue' ) && current_user_can( 'edit_theme_options' ) )
   106 	wp_customize_support_script();
   104 	wp_customize_support_script();
   107 ?>
   105 ?>
   108 
   106 
   109 <div id="wpwrap">
   107 <div id="wpwrap">
       
   108 <a tabindex="1" href="#wpbody-content" class="screen-reader-shortcut"><?php _e('Skip to main content'); ?></a>
   110 <?php require(ABSPATH . 'wp-admin/menu-header.php'); ?>
   109 <?php require(ABSPATH . 'wp-admin/menu-header.php'); ?>
   111 <div id="wpcontent">
   110 <div id="wpcontent">
   112 
   111 
   113 <?php
   112 <?php
   114 do_action('in_admin_header');
   113 do_action('in_admin_header');
   120 
   119 
   121 $current_screen->set_parentage( $parent_file );
   120 $current_screen->set_parentage( $parent_file );
   122 
   121 
   123 ?>
   122 ?>
   124 
   123 
   125 <div id="wpbody-content">
   124 <div id="wpbody-content" aria-label="<?php esc_attr_e('Main content'); ?>" tabindex="0">
   126 <?php
   125 <?php
   127 
   126 
   128 $current_screen->render_screen_meta();
   127 $current_screen->render_screen_meta();
   129 
   128 
   130 if ( is_network_admin() )
   129 if ( is_network_admin() )