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' ) )
|
|
|
|
require_once( './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,
|
2011-11-14 16:35:44 -05:00
|
|
|
$current_site, $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() )
|
|
|
|
$admin_title = __( 'Network Admin' );
|
|
|
|
elseif ( is_user_admin() )
|
|
|
|
$admin_title = __( 'Global Dashboard' );
|
|
|
|
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 );
|
|
|
|
|
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');
|
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">
|
2009-01-12 08:43:17 -05: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();}}};
|
2012-12-04 14:29:56 -05:00
|
|
|
var ajaxurl = '<?php echo admin_url( 'admin-ajax.php', 'relative' ); ?>',
|
2010-03-17 12:27:25 -04:00
|
|
|
pagenow = '<?php echo $current_screen->id; ?>',
|
2011-11-17 14:50:14 -05:00
|
|
|
typenow = '<?php echo $current_screen->post_type; ?>',
|
2010-03-17 12:27:25 -04:00
|
|
|
adminpage = '<?php echo $admin_body_class; ?>',
|
2010-04-22 17:39:37 -04:00
|
|
|
thousandsSeparator = '<?php echo addslashes( $wp_locale->number_format['thousands_sep'] ); ?>',
|
2010-05-27 14:57:07 -04:00
|
|
|
decimalPoint = '<?php echo addslashes( $wp_locale->number_format['decimal_point'] ); ?>',
|
|
|
|
isRtl = <?php echo (int) is_rtl(); ?>;
|
2003-05-22 08:12:53 -04:00
|
|
|
</script>
|
2008-10-02 07:04:09 -04:00
|
|
|
<?php
|
2006-08-28 19:08:48 -04:00
|
|
|
|
2009-01-15 02:43:35 -05:00
|
|
|
do_action('admin_enqueue_scripts', $hook_suffix);
|
2008-11-12 12:11:49 -05:00
|
|
|
do_action("admin_print_styles-$hook_suffix");
|
|
|
|
do_action('admin_print_styles');
|
|
|
|
do_action("admin_print_scripts-$hook_suffix");
|
|
|
|
do_action('admin_print_scripts');
|
|
|
|
do_action("admin_head-$hook_suffix");
|
|
|
|
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';
|
|
|
|
|
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
|
|
|
|
2013-05-10 19:22:58 -04:00
|
|
|
if ( isset( $post ) && is_a( $post, 'WP_Post' ) && post_type_supports( get_post_type(), 'post-formats' ) ) {
|
|
|
|
$post_format = get_post_format();
|
2013-05-09 18:45:14 -04:00
|
|
|
if ( ! $post_format ) {
|
|
|
|
$post_format = 'standard';
|
|
|
|
|
|
|
|
if ( ! empty( $_REQUEST['format'] ) && in_array( $_REQUEST['format'], get_post_format_slugs() ) )
|
|
|
|
$post_format = $_REQUEST['format'];
|
|
|
|
}
|
|
|
|
|
|
|
|
$admin_body_class .= ' wp-format-' . $post_format;
|
2013-05-15 16:43:09 -04:00
|
|
|
|
|
|
|
$show_post_format_ui = false;
|
|
|
|
|
|
|
|
if ( apply_filters( 'enable_post_format_ui', true, $post ) ) {
|
|
|
|
|
|
|
|
// If the user has explicitly set a screen option, use it, otherwise the UI is shown
|
|
|
|
// when the theme supports formats, or if the site has formats assigned to posts.
|
|
|
|
$post_format_user_option = get_user_option( 'post_formats_' . $post->post_type );
|
|
|
|
if ( false !== $post_format_user_option )
|
|
|
|
$show_post_format_ui = (bool) $post_format_user_option;
|
|
|
|
else
|
|
|
|
$show_post_format_ui = current_theme_supports( 'post-formats' ) || (bool) get_terms( 'post_format', array( 'number' => 1 ) );
|
2013-05-17 11:12:50 -04:00
|
|
|
|
|
|
|
if ( ! $show_post_format_ui ) {
|
|
|
|
$meta = get_post_format_meta( $post->ID );
|
|
|
|
$format_meta_keys = array(
|
|
|
|
'link' => array( 'linkurl' ),
|
|
|
|
'image' => array( 'url', 'image' ),
|
|
|
|
'quote' => array( 'quote_source_name', 'quote_source_url' ),
|
|
|
|
'video' => array( 'video_embed' ),
|
|
|
|
'audio' => array( 'audio_embed' ),
|
|
|
|
);
|
|
|
|
|
|
|
|
// If there's any structured post format data, enforce the UI display.
|
|
|
|
$format_meta_keys = isset( $format_meta_keys[ get_post_format() ] ) ? $format_meta_keys[ get_post_format() ] : array();
|
|
|
|
foreach ( $format_meta_keys as $key )
|
|
|
|
if ( ! empty( $meta[ $key ] ) )
|
|
|
|
$show_post_format_ui = true;
|
|
|
|
}
|
2013-05-15 16:43:09 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
if ( $show_post_format_ui )
|
|
|
|
$admin_body_class .= ' wp-post-format-show-ui';
|
2013-05-09 18:45:14 -04:00
|
|
|
}
|
|
|
|
|
2012-04-09 21:19:30 -04:00
|
|
|
if ( wp_is_mobile() )
|
|
|
|
$admin_body_class .= ' mobile';
|
|
|
|
|
2012-05-09 17:47:15 -04:00
|
|
|
$admin_body_class .= ' no-customize-support';
|
|
|
|
|
2012-04-09 21:19:30 -04:00
|
|
|
?>
|
2009-04-04 13:07:31 -04:00
|
|
|
</head>
|
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
|
|
|
|
do_action('in_admin_header');
|
|
|
|
?>
|
|
|
|
|
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
|
|
|
|
2010-11-06 13:40:12 -04:00
|
|
|
if ( is_network_admin() )
|
2010-08-02 11:36:57 -04:00
|
|
|
do_action('network_admin_notices');
|
2010-11-06 13:40:12 -04:00
|
|
|
elseif ( is_user_admin() )
|
|
|
|
do_action('user_admin_notices');
|
2011-11-21 10:43:57 -05:00
|
|
|
else
|
2010-12-16 22:46:47 -05:00
|
|
|
do_action('admin_notices');
|
2010-08-02 11:36:57 -04:00
|
|
|
|
2011-11-21 10:43:57 -05:00
|
|
|
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');
|