[ Index ]

PHP Cross Reference of WordPress 3.0 beta 1

[ Index ]     [ Variables ]     [ Functions ]     [ Classes ]     [ Constants ]     [ Statistics ]

title

Body

[close]

/wp-admin/ -> admin-header.php (source)

   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 (!isset($_GET["page"])) require_once ('admin.php');
  11  
  12  get_admin_page_title();
  13  $title = esc_html( strip_tags( $title ) );
  14  wp_user_settings();
  15  wp_menu_unfold();
  16  ?>
  17  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  18  <html xmlns="http://www.w3.org/1999/xhtml" <?php do_action('admin_xml_ns'); ?> <?php language_attributes(); ?>>
  19  <head>
  20  <meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php echo get_option('blog_charset'); ?>" />
  21  <title><?php echo $title; ?> &lsaquo; <?php bloginfo('name') ?>  &#8212; WordPress</title>
  22  <?php
  23  
  24  wp_admin_css( 'css/global' );
  25  wp_admin_css();
  26  wp_admin_css( 'css/colors' );
  27  wp_admin_css( 'css/ie' );
  28  if ( is_multisite() )
  29      wp_admin_css( 'css/ms' );
  30  wp_enqueue_script('utils');
  31  
  32  $admin_body_class = preg_replace('/[^a-z0-9_-]+/i', '-', $hook_suffix);
  33  ?>
  34  <script type="text/javascript">
  35  //<![CDATA[
  36  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();}}};
  37  var userSettings = {
  38          'url': '<?php echo SITECOOKIEPATH; ?>',
  39          'uid': '<?php if ( ! isset($current_user) ) $current_user = wp_get_current_user(); echo $current_user->ID; ?>',
  40          'time':'<?php echo time() ?>'
  41      },
  42      ajaxurl = '<?php echo admin_url('admin-ajax.php'); ?>',
  43      pagenow = '<?php echo $current_screen->id; ?>',
  44      typenow = '<?php if ( isset($current_screen->post_type) ) echo $current_screen->post_type; ?>',
  45      adminpage = '<?php echo $admin_body_class; ?>',
  46      thousandsSeparator = '<?php echo addslashes( $wp_locale->number_format['thousands_sep'] ); ?>',
  47      decimalPoint = '<?php echo addslashes( $wp_locale->number_format['decimal_point'] ); ?>';
  48  //]]>
  49  </script>
  50  <?php
  51  
  52  if ( in_array( $pagenow, array('post.php', 'post-new.php') ) ) {
  53      add_action( 'admin_print_footer_scripts', 'wp_tiny_mce', 25 );
  54      wp_enqueue_script('quicktags');
  55  }
  56  
  57  do_action('admin_enqueue_scripts', $hook_suffix);
  58  do_action("admin_print_styles-$hook_suffix");
  59  do_action('admin_print_styles');
  60  do_action("admin_print_scripts-$hook_suffix");
  61  do_action('admin_print_scripts');
  62  do_action("admin_head-$hook_suffix");
  63  do_action('admin_head');
  64  
  65  if ( get_user_setting('mfold') == 'f' )
  66      $admin_body_class .= ' folded';
  67  
  68  if ( $is_iphone ) { ?>
  69  <style type="text/css">.row-actions{visibility:visible;}</style>
  70  <?php } ?>
  71  </head>
  72  <body class="wp-admin no-js <?php echo apply_filters( 'admin_body_class', '' ) . " $admin_body_class"; ?>">
  73  <script type="text/javascript">
  74  //<![CDATA[
  75  (function(){
  76  var c = document.body.className;
  77  c = c.replace(/no-js/, 'js');
  78  document.body.className = c;
  79  })();
  80  //]]>
  81  </script>
  82  
  83  <div id="wpwrap">
  84  <div id="wpcontent">
  85  <div id="wphead">
  86  <?php
  87  $blog_name = get_bloginfo('name', 'display');
  88  if ( '' == $blog_name ) {
  89      $blog_name = '&nbsp;';
  90  } else {
  91      $blog_name_excerpt = wp_html_excerpt($blog_name, 40);
  92      if ( $blog_name != $blog_name_excerpt )
  93          $blog_name_excerpt = trim($blog_name_excerpt) . '&hellip;';
  94      $blog_name = $blog_name_excerpt;
  95      unset($blog_name_excerpt);
  96  }
  97  $title_class = '';
  98  if ( function_exists('mb_strlen') ) {
  99      if ( mb_strlen($blog_name, 'UTF-8') > 30 )
 100          $title_class = 'class="long-title"';
 101  } else {
 102      if ( strlen($blog_name) > 30 )
 103          $title_class = 'class="long-title"';
 104  }
 105  ?>
 106  
 107  <img id="header-logo" src="<?php echo esc_url( includes_url( 'images/blank.gif' ) ); ?>" alt="" width="32" height="32" /> <h1 id="site-heading" <?php echo $title_class ?>><a href="<?php echo trailingslashit( get_bloginfo('url') ); ?>" title="<?php esc_attr_e('Visit Site') ?>"><span id="site-title"><?php echo $blog_name ?></span></a><?php if ( current_user_can('manage_options') && ! get_option('blog_public') ) { ?> <a id="privacy-on-link" href="options-privacy.php" title="<?php esc_attr_e('Your site is asking search engines not to index its content') ?>"><?php _e('Search Engines Blocked') ?></a><?php } ?></h1>
 108  
 109  <?php do_action('in_admin_header'); ?>
 110  
 111  <div id="wphead-info">
 112  <div id="user_info">
 113  <p><?php
 114  $links = array();
 115  $links[5] = sprintf(__('Howdy, <a href="%1$s" title="Edit your profile">%2$s</a>'), 'profile.php', $user_identity);
 116  $links[15] = '| <a href="' . wp_logout_url() . '" title="' . __('Log Out') . '">' . __('Log Out') . '</a>';
 117  
 118  $links = apply_filters('admin_user_info_links', $links, $current_user);
 119  ksort($links);
 120  
 121  echo implode(' ', $links);
 122  ?></p>
 123  </div>
 124  
 125  <?php favorite_actions($current_screen); ?>
 126  </div>
 127  </div>
 128  
 129  <div id="wpbody">
 130  <?php
 131  unset($title_class, $blog_name);
 132  
 133  require (ABSPATH . 'wp-admin/menu-header.php');
 134  
 135  $current_screen->parent_file = $parent_file;
 136  $current_screen->parent_base = preg_replace('/\?.*$/', '', $parent_file);
 137  $current_screen->parent_base = str_replace('.php', '', $current_screen->parent_base);
 138  ?>
 139  
 140  <div id="wpbody-content">
 141  <?php
 142  screen_meta($current_screen);
 143  
 144  do_action('admin_notices');
 145  
 146  if ( $parent_file == 'options-general.php' )
 147      require (ABSPATH . 'wp-admin/options-head.php');


Generated: Mon Apr 5 14:26:09 2010 Cross-referenced by PHPXref 0.7