| [ Index ] |
PHP Cross Reference of WordPress |
[Summary view] [Print] [Text view]
1 <?php 2 /** 3 * WordPress Administration Template Header 4 * 5 * @package WordPress 6 * @subpackage Administration 7 */ 8 9 @header('Content-Type: ' . get_option('html_type') . '; charset=' . get_option('blog_charset')); 10 if ( ! defined( 'WP_ADMIN' ) ) 11 require_once ( './admin.php' ); 12 13 // In case admin-header.php is included in a function. 14 global $title, $hook_suffix, $current_screen, $wp_locale, $pagenow, $wp_version, 15 $current_site, $update_title, $total_update_count, $parent_file; 16 17 // Catch plugins that include admin-header.php before admin.php completes. 18 if ( empty( $current_screen ) ) 19 set_current_screen(); 20 21 get_admin_page_title(); 22 $title = esc_html( strip_tags( $title ) ); 23 24 if ( is_network_admin() ) 25 $admin_title = __( 'Network Admin' ); 26 elseif ( is_user_admin() ) 27 $admin_title = __( 'Global Dashboard' ); 28 else 29 $admin_title = get_bloginfo( 'name' ); 30 31 if ( $admin_title == $title ) 32 $admin_title = sprintf( __( '%1$s — WordPress' ), $title ); 33 else 34 $admin_title = sprintf( __( '%1$s ‹ %2$s — WordPress' ), $title, $admin_title ); 35 36 $admin_title = apply_filters( 'admin_title', $admin_title, $title ); 37 38 wp_user_settings(); 39 40 _wp_admin_html_begin(); 41 ?> 42 <title><?php echo $admin_title; ?></title> 43 <?php 44 45 wp_enqueue_style( 'colors' ); 46 wp_enqueue_style( 'ie' ); 47 wp_enqueue_script('utils'); 48 49 $admin_body_class = preg_replace('/[^a-z0-9_-]+/i', '-', $hook_suffix); 50 ?> 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();}}}; 53 var userSettings = { 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; ?>', 60 typenow = '<?php echo $current_screen->post_type; ?>', 61 adminpage = '<?php echo $admin_body_class; ?>', 62 thousandsSeparator = '<?php echo addslashes( $wp_locale->number_format['thousands_sep'] ); ?>', 63 decimalPoint = '<?php echo addslashes( $wp_locale->number_format['decimal_point'] ); ?>', 64 isRtl = <?php echo (int) is_rtl(); ?>; 65 </script> 66 <?php 67 68 do_action('admin_enqueue_scripts', $hook_suffix); 69 do_action("admin_print_styles-$hook_suffix"); 70 do_action('admin_print_styles'); 71 do_action("admin_print_scripts-$hook_suffix"); 72 do_action('admin_print_scripts'); 73 do_action("admin_head-$hook_suffix"); 74 do_action('admin_head'); 75 76 if ( get_user_setting('mfold') == 'f' ) 77 $admin_body_class .= ' folded'; 78 79 if ( is_admin_bar_showing() ) 80 $admin_body_class .= ' admin-bar'; 81 82 if ( is_rtl() ) 83 $admin_body_class .= ' rtl'; 84 85 $admin_body_class .= ' branch-' . str_replace( array( '.', ',' ), '-', floatval( $wp_version ) ); 86 $admin_body_class .= ' version-' . str_replace( '.', '-', preg_replace( '/^([.0-9]+).*/', '$1', $wp_version ) ); 87 $admin_body_class .= ' admin-color-' . sanitize_html_class( get_user_option( 'admin_color' ), 'fresh' ); 88 $admin_body_class .= ' locale-' . sanitize_html_class( strtolower( str_replace( '_', '-', get_locale() ) ) ); 89 90 if ( wp_is_mobile() ) 91 $admin_body_class .= ' mobile'; 92 93 $admin_body_class .= ' no-customize-support'; 94 95 ?> 96 </head> 97 <body class="wp-admin no-js <?php echo apply_filters( 'admin_body_class', '' ) . " $admin_body_class"; ?>"> 98 <script type="text/javascript"> 99 document.body.className = document.body.className.replace('no-js','js'); 100 </script> 101 102 <?php wp_customize_support_script(); ?> 103 104 <div id="wpwrap"> 105 <?php require (ABSPATH . 'wp-admin/menu-header.php'); ?> 106 <div id="wpcontent"> 107 108 <?php 109 do_action('in_admin_header'); 110 ?> 111 112 <div id="wpbody"> 113 <?php 114 unset($title_class, $blog_name, $total_update_count, $update_title); 115 116 $current_screen->set_parentage( $parent_file ); 117 118 ?> 119 120 <div id="wpbody-content"> 121 <?php 122 123 $current_screen->render_screen_meta(); 124 125 if ( is_network_admin() ) 126 do_action('network_admin_notices'); 127 elseif ( is_user_admin() ) 128 do_action('user_admin_notices'); 129 else 130 do_action('admin_notices'); 131 132 do_action('all_admin_notices'); 133 134 if ( $parent_file == 'options-general.php' ) 135 require (ABSPATH . 'wp-admin/options-head.php');
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
| Generated: Fri May 25 03:56:23 2012 | Hosted by follow the white rabbit. |