2006-02-16 20:29:33 -05:00
|
|
|
<?php
|
2008-08-11 16:26:31 -04:00
|
|
|
/**
|
|
|
|
* WordPress Administration Template Header
|
|
|
|
*
|
|
|
|
* @package WordPress
|
|
|
|
* @subpackage Administration
|
|
|
|
*/
|
|
|
|
|
2007-06-02 01:21:18 -04:00
|
|
|
@header('Content-Type: ' . get_option('html_type') . '; charset=' . get_option('blog_charset'));
|
2010-05-02 14:39:31 -04:00
|
|
|
if ( ! defined( 'WP_ADMIN' ) )
|
2013-09-24 20:18:11 -04:00
|
|
|
require_once( dirname( __FILE__ ) . '/admin.php' );
|
2006-05-22 13:16:05 -04:00
|
|
|
|
2011-08-10 15:54:59 -04:00
|
|
|
// In case admin-header.php is included in a function.
|
2012-04-09 21:19:30 -04:00
|
|
|
global $title, $hook_suffix, $current_screen, $wp_locale, $pagenow, $wp_version,
|
2013-11-16 08:46:10 -05:00
|
|
|
$update_title, $total_update_count, $parent_file;
|
2011-08-10 15:54:59 -04:00
|
|
|
|
2011-11-30 22:37:22 -05:00
|
|
|
// Catch plugins that include admin-header.php before admin.php completes.
|
|
|
|
if ( empty( $current_screen ) )
|
|
|
|
set_current_screen();
|
|
|
|
|
2006-05-22 13:16:05 -04:00
|
|
|
get_admin_page_title();
|
2009-05-18 11:11:07 -04:00
|
|
|
$title = esc_html( strip_tags( $title ) );
|
2010-07-30 16:34:54 -04:00
|
|
|
|
2010-11-18 18:02:52 -05:00
|
|
|
if ( is_network_admin() )
|
2013-11-16 08:46:10 -05:00
|
|
|
$admin_title = sprintf( __( 'Network Admin: %s' ), esc_html( get_current_site()->site_name ) );
|
2010-11-18 18:02:52 -05:00
|
|
|
elseif ( is_user_admin() )
|
2013-11-16 08:46:10 -05:00
|
|
|
$admin_title = sprintf( __( 'Global Dashboard: %s' ), esc_html( get_current_site()->site_name ) );
|
2010-11-18 18:02:52 -05:00
|
|
|
else
|
|
|
|
$admin_title = get_bloginfo( 'name' );
|
|
|
|
|
|
|
|
if ( $admin_title == $title )
|
|
|
|
$admin_title = sprintf( __( '%1$s — WordPress' ), $title );
|
|
|
|
else
|
|
|
|
$admin_title = sprintf( __( '%1$s ‹ %2$s — WordPress' ), $title, $admin_title );
|
|
|
|
|
2013-09-19 12:33:08 -04:00
|
|
|
/**
|
|
|
|
* Filter the <title> content for an admin page.
|
|
|
|
*
|
|
|
|
* @since 3.1.0
|
|
|
|
*
|
|
|
|
* @param string $admin_title The page title, with extra context added.
|
|
|
|
* @param string $title The original page title.
|
|
|
|
*/
|
2010-11-09 13:03:06 -05:00
|
|
|
$admin_title = apply_filters( 'admin_title', $admin_title, $title );
|
|
|
|
|
2008-12-05 00:33:36 -05:00
|
|
|
wp_user_settings();
|
2010-07-30 16:34:54 -04:00
|
|
|
|
2011-10-17 16:57:32 -04:00
|
|
|
_wp_admin_html_begin();
|
2006-01-10 00:16:17 -05:00
|
|
|
?>
|
2010-11-09 13:03:06 -05:00
|
|
|
<title><?php echo $admin_title; ?></title>
|
2008-03-02 15:17:30 -05:00
|
|
|
<?php
|
2008-05-21 19:24:23 -04:00
|
|
|
|
2011-08-20 23:46:43 -04:00
|
|
|
wp_enqueue_style( 'colors' );
|
|
|
|
wp_enqueue_style( 'ie' );
|
2009-01-12 08:43:17 -05:00
|
|
|
wp_enqueue_script('utils');
|
Say hello to a fresh new look for the WordPress admin.
Still to come: more color schemes, a responsive component, and more.
see #25858.
props iammattthomas, tillkruess, EmpireOfLight, melchoyce, ryelle, joen, mitchoyoshitaka, sirbrillig, andypeatling, isaackeyet, Otto42, dd32, matt, helen.
Built from https://develop.svn.wordpress.org/trunk@26072
git-svn-id: http://core.svn.wordpress.org/trunk@25992 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-11-09 19:27:10 -05:00
|
|
|
wp_enqueue_script( 'svg-painter' );
|
2008-05-21 19:24:23 -04:00
|
|
|
|
2009-06-03 03:06:45 -04:00
|
|
|
$admin_body_class = preg_replace('/[^a-z0-9_-]+/i', '-', $hook_suffix);
|
2008-02-10 03:10:11 -05:00
|
|
|
?>
|
2004-08-01 04:04:39 -04:00
|
|
|
<script type="text/javascript">
|
2020-10-29 15:15:11 -04:00
|
|
|
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();}}};
|
|
|
|
var ajaxurl = '<?php echo esc_js( admin_url( 'admin-ajax.php', 'relative' ) ); ?>',
|
|
|
|
pagenow = '<?php echo esc_js( $current_screen->id ); ?>',
|
|
|
|
typenow = '<?php echo esc_js( $current_screen->post_type ); ?>',
|
|
|
|
adminpage = '<?php echo esc_js( $admin_body_class ); ?>',
|
|
|
|
thousandsSeparator = '<?php echo esc_js( $wp_locale->number_format['thousands_sep'] ); ?>',
|
|
|
|
decimalPoint = '<?php echo esc_js( $wp_locale->number_format['decimal_point'] ); ?>',
|
2010-05-27 14:57:07 -04:00
|
|
|
isRtl = <?php echo (int) is_rtl(); ?>;
|
2003-05-22 08:12:53 -04:00
|
|
|
</script>
|
2013-11-13 13:00:10 -05:00
|
|
|
<meta name="viewport" content="width=device-width,initial-scale=1.0">
|
2008-10-02 07:04:09 -04:00
|
|
|
<?php
|
2006-08-28 19:08:48 -04:00
|
|
|
|
2013-09-19 12:33:08 -04:00
|
|
|
/**
|
|
|
|
* Enqueue scripts for all admin pages.
|
|
|
|
*
|
|
|
|
* @since 2.8.0
|
|
|
|
*
|
|
|
|
* @param string $hook_suffix The current admin page.
|
|
|
|
*/
|
|
|
|
do_action( 'admin_enqueue_scripts', $hook_suffix );
|
|
|
|
|
|
|
|
/**
|
2014-03-25 04:05:15 -04:00
|
|
|
* Fires when styles are printed for a specific admin page based on $hook_suffix.
|
2013-09-19 12:33:08 -04:00
|
|
|
*
|
|
|
|
* @since 2.6.0
|
|
|
|
*/
|
|
|
|
do_action( "admin_print_styles-$hook_suffix" );
|
|
|
|
|
|
|
|
/**
|
2014-03-25 04:05:15 -04:00
|
|
|
* Fires when styles are printed for all admin pages.
|
2013-09-19 12:33:08 -04:00
|
|
|
*
|
|
|
|
* @since 2.6.0
|
|
|
|
*/
|
|
|
|
do_action( 'admin_print_styles' );
|
|
|
|
|
|
|
|
/**
|
2014-03-25 04:05:15 -04:00
|
|
|
* Fires when scripts are printed for a specific admin page based on $hook_suffix.
|
2013-09-19 12:33:08 -04:00
|
|
|
*
|
|
|
|
* @since 2.1.0
|
|
|
|
*/
|
|
|
|
do_action( "admin_print_scripts-$hook_suffix" );
|
|
|
|
|
|
|
|
/**
|
2014-03-25 04:05:15 -04:00
|
|
|
* Fires when scripts are printed for all admin pages.
|
2013-09-19 12:33:08 -04:00
|
|
|
*
|
|
|
|
* @since 2.1.0
|
|
|
|
*/
|
|
|
|
do_action( 'admin_print_scripts' );
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Fires in <head> for a specific admin page based on $hook_suffix.
|
|
|
|
*
|
|
|
|
* @since 2.1.0
|
|
|
|
*/
|
|
|
|
do_action( "admin_head-$hook_suffix" );
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Fires in <head> for all admin pages.
|
|
|
|
*
|
|
|
|
* @since 2.1.0
|
|
|
|
*/
|
|
|
|
do_action( 'admin_head' );
|
2009-04-04 09:40:21 -04:00
|
|
|
|
2010-01-26 13:16:53 -05:00
|
|
|
if ( get_user_setting('mfold') == 'f' )
|
2009-04-29 01:43:03 -04:00
|
|
|
$admin_body_class .= ' folded';
|
2010-12-13 16:21:50 -05:00
|
|
|
|
2012-08-21 18:46:30 -04:00
|
|
|
if ( !get_user_setting('unfold') )
|
|
|
|
$admin_body_class .= ' auto-fold';
|
|
|
|
|
2010-11-26 17:05:54 -05:00
|
|
|
if ( is_admin_bar_showing() )
|
2010-12-13 16:21:50 -05:00
|
|
|
$admin_body_class .= ' admin-bar';
|
2009-02-04 10:05:57 -05:00
|
|
|
|
2011-06-02 18:19:58 -04:00
|
|
|
if ( is_rtl() )
|
|
|
|
$admin_body_class .= ' rtl';
|
|
|
|
|
2013-08-26 14:18:09 -04:00
|
|
|
if ( $current_screen->post_type )
|
|
|
|
$admin_body_class .= ' post-type-' . $current_screen->post_type;
|
|
|
|
|
|
|
|
if ( $current_screen->taxonomy )
|
|
|
|
$admin_body_class .= ' taxonomy-' . $current_screen->taxonomy;
|
|
|
|
|
2011-08-26 15:00:07 -04:00
|
|
|
$admin_body_class .= ' branch-' . str_replace( array( '.', ',' ), '-', floatval( $wp_version ) );
|
2011-05-18 14:11:48 -04:00
|
|
|
$admin_body_class .= ' version-' . str_replace( '.', '-', preg_replace( '/^([.0-9]+).*/', '$1', $wp_version ) );
|
|
|
|
$admin_body_class .= ' admin-color-' . sanitize_html_class( get_user_option( 'admin_color' ), 'fresh' );
|
2012-02-03 19:54:42 -05:00
|
|
|
$admin_body_class .= ' locale-' . sanitize_html_class( strtolower( str_replace( '_', '-', get_locale() ) ) );
|
2011-05-18 14:11:48 -04:00
|
|
|
|
2012-04-09 21:19:30 -04:00
|
|
|
if ( wp_is_mobile() )
|
|
|
|
$admin_body_class .= ' mobile';
|
|
|
|
|
Say hello to a fresh new look for the WordPress admin.
Still to come: more color schemes, a responsive component, and more.
see #25858.
props iammattthomas, tillkruess, EmpireOfLight, melchoyce, ryelle, joen, mitchoyoshitaka, sirbrillig, andypeatling, isaackeyet, Otto42, dd32, matt, helen.
Built from https://develop.svn.wordpress.org/trunk@26072
git-svn-id: http://core.svn.wordpress.org/trunk@25992 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-11-09 19:27:10 -05:00
|
|
|
if ( is_multisite() )
|
|
|
|
$admin_body_class .= ' multisite';
|
|
|
|
|
|
|
|
if ( is_network_admin() )
|
|
|
|
$admin_body_class .= ' network-admin';
|
|
|
|
|
|
|
|
$admin_body_class .= ' no-customize-support no-svg';
|
2012-05-09 17:47:15 -04:00
|
|
|
|
2012-04-09 21:19:30 -04:00
|
|
|
?>
|
2009-04-04 13:07:31 -04:00
|
|
|
</head>
|
2013-09-19 12:33:08 -04:00
|
|
|
<?php
|
|
|
|
/**
|
|
|
|
* Filter the admin <body> CSS classes.
|
|
|
|
*
|
|
|
|
* This filter differs from the post_class or body_class filters in two important ways:
|
|
|
|
* 1. $classes is a space-separated string of class names instead of an array.
|
|
|
|
* 2. Not all core admin classes are filterable, notably: wp-admin, wp-core-ui, and no-js cannot be removed.
|
|
|
|
*
|
|
|
|
* @since 2.3.0
|
|
|
|
*
|
|
|
|
* @param string $classes Space-separated string of CSS classes.
|
|
|
|
*/
|
|
|
|
?>
|
2012-11-30 08:40:59 -05:00
|
|
|
<body class="wp-admin wp-core-ui no-js <?php echo apply_filters( 'admin_body_class', '' ) . " $admin_body_class"; ?>">
|
2012-04-16 10:59:09 -04:00
|
|
|
<script type="text/javascript">
|
|
|
|
document.body.className = document.body.className.replace('no-js','js');
|
|
|
|
</script>
|
2008-12-27 07:18:38 -05:00
|
|
|
|
2012-05-25 18:26:00 -04:00
|
|
|
<?php
|
2013-05-09 18:45:14 -04:00
|
|
|
// Make sure the customize body classes are correct as early as possible.
|
2013-03-29 19:25:06 -04:00
|
|
|
if ( current_user_can( 'edit_theme_options' ) )
|
2012-05-25 18:26:00 -04:00
|
|
|
wp_customize_support_script();
|
|
|
|
?>
|
2012-05-24 20:15:12 -04:00
|
|
|
|
2008-01-13 22:16:56 -05:00
|
|
|
<div id="wpwrap">
|
2012-11-20 16:14:49 -05:00
|
|
|
<a tabindex="1" href="#wpbody-content" class="screen-reader-shortcut"><?php _e('Skip to main content'); ?></a>
|
2011-05-04 16:15:05 -04:00
|
|
|
<?php require(ABSPATH . 'wp-admin/menu-header.php'); ?>
|
2008-01-13 22:16:56 -05:00
|
|
|
<div id="wpcontent">
|
2008-05-19 11:41:31 -04:00
|
|
|
|
2011-05-06 19:06:24 -04:00
|
|
|
<?php
|
2013-09-19 12:33:08 -04:00
|
|
|
/**
|
|
|
|
* Fires at the beginning of the content section in an admin page.
|
|
|
|
*
|
|
|
|
* @since 3.0.0
|
|
|
|
*/
|
|
|
|
do_action( 'in_admin_header' );
|
2011-05-06 19:06:24 -04:00
|
|
|
?>
|
|
|
|
|
2008-08-29 02:36:31 -04:00
|
|
|
<div id="wpbody">
|
2010-01-15 11:58:36 -05:00
|
|
|
<?php
|
2011-01-04 03:36:06 -05:00
|
|
|
unset($title_class, $blog_name, $total_update_count, $update_title);
|
2010-01-26 13:16:53 -05:00
|
|
|
|
2011-09-26 17:03:38 -04:00
|
|
|
$current_screen->set_parentage( $parent_file );
|
|
|
|
|
2010-01-15 11:58:36 -05:00
|
|
|
?>
|
2008-10-26 21:22:24 -04:00
|
|
|
|
2012-10-16 17:26:59 -04:00
|
|
|
<div id="wpbody-content" aria-label="<?php esc_attr_e('Main content'); ?>" tabindex="0">
|
2008-08-29 02:36:31 -04:00
|
|
|
<?php
|
2011-09-30 20:24:44 -04:00
|
|
|
|
|
|
|
$current_screen->render_screen_meta();
|
2008-11-28 19:36:26 -05:00
|
|
|
|
2013-09-19 12:33:08 -04:00
|
|
|
if ( is_network_admin() ) {
|
|
|
|
/**
|
|
|
|
* Print network admin screen notices.
|
|
|
|
*
|
|
|
|
* @since 3.1.0
|
|
|
|
*/
|
|
|
|
do_action( 'network_admin_notices' );
|
|
|
|
} elseif ( is_user_admin() ) {
|
|
|
|
/**
|
|
|
|
* Print user admin screen notices.
|
|
|
|
*
|
|
|
|
* @since 3.1.0
|
|
|
|
*/
|
|
|
|
do_action( 'user_admin_notices' );
|
|
|
|
} else {
|
|
|
|
/**
|
|
|
|
* Print admin screen notices.
|
|
|
|
*
|
|
|
|
* @since 3.1.0
|
|
|
|
*/
|
|
|
|
do_action( 'admin_notices' );
|
|
|
|
}
|
2010-08-02 11:36:57 -04:00
|
|
|
|
2013-09-19 12:33:08 -04:00
|
|
|
/**
|
|
|
|
* Print generic admin screen notices.
|
|
|
|
*
|
|
|
|
* @since 3.1.0
|
|
|
|
*/
|
|
|
|
do_action( 'all_admin_notices' );
|
2008-11-11 17:40:16 -05:00
|
|
|
|
2010-01-26 13:16:53 -05:00
|
|
|
if ( $parent_file == 'options-general.php' )
|
2007-07-27 17:28:01 -04:00
|
|
|
require(ABSPATH . 'wp-admin/options-head.php');
|