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
|
|
|
|
2015-05-28 17:41:30 -04:00
|
|
|
/**
|
|
|
|
* In case admin-header.php is included in a function.
|
|
|
|
*
|
|
|
|
* @global string $title
|
|
|
|
* @global string $hook_suffix
|
|
|
|
* @global WP_Screen $current_screen
|
|
|
|
* @global WP_Locale $wp_locale
|
|
|
|
* @global string $pagenow
|
|
|
|
* @global string $update_title
|
|
|
|
* @global int $total_update_count
|
|
|
|
* @global string $parent_file
|
|
|
|
*/
|
2016-08-31 01:49:37 -04:00
|
|
|
global $title, $hook_suffix, $current_screen, $wp_locale, $pagenow,
|
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
|
|
|
|
2016-11-20 21:46:30 -05:00
|
|
|
if ( is_network_admin() ) {
|
|
|
|
/* translators: Network admin screen title. 1: Network name */
|
2016-10-19 00:47:30 -04:00
|
|
|
$admin_title = sprintf( __( 'Network Admin: %s' ), esc_html( get_network()->site_name ) );
|
2016-11-20 21:46:30 -05:00
|
|
|
} elseif ( is_user_admin() ) {
|
|
|
|
/* translators: User dashboard screen title. 1: Network name */
|
2016-10-19 00:47:30 -04:00
|
|
|
$admin_title = sprintf( __( 'User Dashboard: %s' ), esc_html( get_network()->site_name ) );
|
2016-11-20 21:46:30 -05:00
|
|
|
} else {
|
2010-11-18 18:02:52 -05:00
|
|
|
$admin_title = get_bloginfo( 'name' );
|
2016-11-20 21:46:30 -05:00
|
|
|
}
|
2010-11-18 18:02:52 -05:00
|
|
|
|
2016-11-20 21:46:30 -05:00
|
|
|
if ( $admin_title == $title ) {
|
|
|
|
/* translators: Admin screen title. 1: Admin screen name */
|
2010-11-18 18:02:52 -05:00
|
|
|
$admin_title = sprintf( __( '%1$s — WordPress' ), $title );
|
2016-11-20 21:46:30 -05:00
|
|
|
} else {
|
|
|
|
/* translators: Admin screen title. 1: Admin screen name, 2: Network or site name */
|
2010-11-18 18:02:52 -05:00
|
|
|
$admin_title = sprintf( __( '%1$s ‹ %2$s — WordPress' ), $title, $admin_title );
|
2016-11-20 21:46:30 -05:00
|
|
|
}
|
2010-11-18 18:02:52 -05:00
|
|
|
|
2013-09-19 12:33:08 -04:00
|
|
|
/**
|
2016-05-22 14:01:30 -04:00
|
|
|
* Filters the title tag content for an admin page.
|
2013-09-19 12:33:08 -04:00
|
|
|
*
|
|
|
|
* @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 14:53:27 -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
|
|
|
|
*/
|
2016-08-22 14:25:31 -04:00
|
|
|
do_action( "admin_print_styles-{$hook_suffix}" );
|
2013-09-19 12:33:08 -04:00
|
|
|
|
|
|
|
/**
|
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
|
|
|
|
*/
|
2016-08-22 14:25:31 -04:00
|
|
|
do_action( "admin_print_scripts-{$hook_suffix}" );
|
2013-09-19 12:33:08 -04:00
|
|
|
|
|
|
|
/**
|
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' );
|
|
|
|
|
|
|
|
/**
|
2014-11-23 23:27:23 -05:00
|
|
|
* Fires in head section for a specific admin page.
|
|
|
|
*
|
|
|
|
* The dynamic portion of the hook, `$hook_suffix`, refers to the hook suffix
|
|
|
|
* for the admin page.
|
2013-09-19 12:33:08 -04:00
|
|
|
*
|
|
|
|
* @since 2.1.0
|
|
|
|
*/
|
2016-08-22 14:25:31 -04:00
|
|
|
do_action( "admin_head-{$hook_suffix}" );
|
2013-09-19 12:33:08 -04:00
|
|
|
|
|
|
|
/**
|
2014-11-23 23:27:23 -05:00
|
|
|
* Fires in head section for all admin pages.
|
2013-09-19 12:33:08 -04:00
|
|
|
*
|
|
|
|
* @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;
|
|
|
|
|
2016-08-31 01:49:37 -04:00
|
|
|
$admin_body_class .= ' branch-' . str_replace( array( '.', ',' ), '-', floatval( get_bloginfo( 'version' ) ) );
|
|
|
|
$admin_body_class .= ' version-' . str_replace( '.', '-', preg_replace( '/^([.0-9]+).*/', '$1', get_bloginfo( 'version' ) ) );
|
2011-05-18 14:11:48 -04:00
|
|
|
$admin_body_class .= ' admin-color-' . sanitize_html_class( get_user_option( 'admin_color' ), 'fresh' );
|
2016-10-03 03:04:29 -04:00
|
|
|
$admin_body_class .= ' locale-' . sanitize_html_class( strtolower( str_replace( '_', '-', get_user_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
|
|
|
|
/**
|
2016-05-22 14:01:30 -04:00
|
|
|
* Filters the CSS classes for the body tag in the admin.
|
2013-09-19 12:33:08 -04:00
|
|
|
*
|
2014-12-06 16:32:24 -05:00
|
|
|
* This filter differs from the {@see 'post_class'} and {@see 'body_class'} filters
|
|
|
|
* in two important ways:
|
2014-12-06 18:21:24 -05:00
|
|
|
*
|
2014-12-06 16:32:24 -05:00
|
|
|
* 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.
|
2013-09-19 12:33:08 -04:00
|
|
|
*
|
|
|
|
* @since 2.3.0
|
|
|
|
*
|
2014-12-06 16:32:24 -05:00
|
|
|
* @param string $classes Space-separated list of CSS classes.
|
2013-09-19 12:33:08 -04:00
|
|
|
*/
|
2014-12-06 16:32:24 -05:00
|
|
|
$admin_body_classes = apply_filters( 'admin_body_class', '' );
|
2013-09-19 12:33:08 -04:00
|
|
|
?>
|
2014-12-06 16:32:24 -05:00
|
|
|
<body class="wp-admin wp-core-ui no-js <?php echo $admin_body_classes . ' ' . $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.
|
2014-07-14 15:01:16 -04:00
|
|
|
if ( current_user_can( 'customize' ) ) {
|
2012-05-25 18:26:00 -04:00
|
|
|
wp_customize_support_script();
|
2014-07-14 15:01:16 -04:00
|
|
|
}
|
2012-05-25 18:26:00 -04:00
|
|
|
?>
|
2012-05-24 20:15:12 -04:00
|
|
|
|
2008-01-13 22:16:56 -05:00
|
|
|
<div id="wpwrap">
|
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
|
|
|
?>
|
|
|
|
|
2015-04-01 09:17:27 -04:00
|
|
|
<div id="wpbody" role="main">
|
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() ) {
|
|
|
|
/**
|
2016-05-25 12:05:27 -04:00
|
|
|
* Prints network admin screen notices.
|
2013-09-19 12:33:08 -04:00
|
|
|
*
|
|
|
|
* @since 3.1.0
|
|
|
|
*/
|
|
|
|
do_action( 'network_admin_notices' );
|
|
|
|
} elseif ( is_user_admin() ) {
|
|
|
|
/**
|
2016-05-25 12:05:27 -04:00
|
|
|
* Prints user admin screen notices.
|
2013-09-19 12:33:08 -04:00
|
|
|
*
|
|
|
|
* @since 3.1.0
|
|
|
|
*/
|
|
|
|
do_action( 'user_admin_notices' );
|
|
|
|
} else {
|
|
|
|
/**
|
2016-05-25 12:05:27 -04:00
|
|
|
* Prints admin screen notices.
|
2013-09-19 12:33:08 -04:00
|
|
|
*
|
|
|
|
* @since 3.1.0
|
|
|
|
*/
|
|
|
|
do_action( 'admin_notices' );
|
|
|
|
}
|
2010-08-02 11:36:57 -04:00
|
|
|
|
2013-09-19 12:33:08 -04:00
|
|
|
/**
|
2016-05-25 12:05:27 -04:00
|
|
|
* Prints generic admin screen notices.
|
2013-09-19 12:33:08 -04:00
|
|
|
*
|
|
|
|
* @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');
|