Projects : mp-wp : mp-wp_genesis
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 = wp_specialchars( strip_tags( $title ) ); |
14 | wp_user_settings(); |
15 | ?> |
16 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
17 | <html xmlns="http://www.w3.org/1999/xhtml" <?php do_action('admin_xml_ns'); ?> <?php language_attributes(); ?>> |
18 | <head> |
19 | <meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php echo get_option('blog_charset'); ?>" /> |
20 | <title><?php bloginfo('name') ?> › <?php echo $title; ?> — WordPress</title> |
21 | <?php |
22 | |
23 | wp_admin_css( 'css/global' ); |
24 | wp_admin_css(); |
25 | wp_admin_css( 'css/colors' ); |
26 | wp_admin_css( 'css/ie' ); |
27 | |
28 | ?> |
29 | <script type="text/javascript"> |
30 | //<![CDATA[ |
31 | 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();}}}; |
32 | |
33 | function convertEntities(o) { |
34 | var c = function(s) { |
35 | if (/&[^;]+;/.test(s)) { |
36 | var e = document.createElement("div"); |
37 | e.innerHTML = s; |
38 | return !e.firstChild ? s : e.firstChild.nodeValue; |
39 | } |
40 | return s; |
41 | } |
42 | |
43 | if ( typeof o === 'string' ) |
44 | return c(o); |
45 | else if ( typeof o === 'object' ) |
46 | for (var v in o) { |
47 | if ( typeof o[v] === 'string' ) |
48 | o[v] = c(o[v]); |
49 | } |
50 | return o; |
51 | }; |
52 | //]]> |
53 | </script> |
54 | <?php |
55 | |
56 | if ( in_array( $pagenow, array('post.php', 'post-new.php', 'page.php', 'page-new.php') ) ) { |
57 | add_action( 'admin_head', 'wp_tiny_mce' ); |
58 | } |
59 | |
60 | $hook_suffix = ''; |
61 | if ( isset($page_hook) ) |
62 | $hook_suffix = "$page_hook"; |
63 | else if ( isset($plugin_page) ) |
64 | $hook_suffix = "$plugin_page"; |
65 | else if ( isset($pagenow) ) |
66 | $hook_suffix = "$pagenow"; |
67 | |
68 | do_action("admin_print_styles-$hook_suffix"); |
69 | do_action('admin_print_styles'); |
70 | do_action("admin_print_scripts-$hook_suffix"); |
71 | do_action('admin_print_scripts'); |
72 | do_action("admin_head-$hook_suffix"); |
73 | do_action('admin_head'); |
74 | |
75 | if ( $is_iphone ) { ?> |
76 | <style type="text/css">.row-actions{visibility:visible;}</style> |
77 | <?php } ?> |
78 | </head> |
79 | <body class="wp-admin <?php echo apply_filters( 'admin_body_class', '' ); ?>"> |
80 | |
81 | <div id="wpwrap"> |
82 | <div id="wpcontent"> |
83 | <div id="wphead"> |
84 | <?php |
85 | $blog_name = get_bloginfo('name', 'display'); |
86 | if ( '' == $blog_name ) { |
87 | $blog_name = ' '; |
88 | } else { |
89 | $blog_name_excerpt = wp_html_excerpt($blog_name, 40); |
90 | if ( $blog_name != $blog_name_excerpt ) |
91 | $blog_name_excerpt = trim($blog_name_excerpt) . '…'; |
92 | $blog_name = $blog_name_excerpt; |
93 | } |
94 | $title_class = ''; |
95 | if ( function_exists('mb_strlen') ) { |
96 | if ( mb_strlen($blog_name, 'UTF-8') > 30 ) |
97 | $title_class = 'class="long-title"'; |
98 | } else { |
99 | if ( strlen($blog_name) > 30 ) |
100 | $title_class = 'class="long-title"'; |
101 | } |
102 | ?> |
103 | |
104 | <img id="header-logo" src="../wp-includes/images/blank.gif" alt="" width="32" height="32" /> <h1 <?php echo $title_class ?>><a href="<?php echo trailingslashit( get_bloginfo('url') ); ?>" title="<?php _e('Visit site') ?>"><?php echo $blog_name ?> <span>← <?php _e('Visit site') ?></span></a></h1> |
105 | |
106 | <div id="wphead-info"> |
107 | <div id="user_info"> |
108 | <p><?php printf(__('Howdy, <a href="%1$s" title="Edit your profile">%2$s</a>'), 'profile.php', $user_identity) ?> |
109 | <?php if ( ! $is_opera ) { ?><span class="turbo-nag hidden"> | <a href="tools.php"><?php _e('Turbo') ?></a></span><?php } ?> | |
110 | <a href="<?php echo wp_logout_url() ?>" title="<?php _e('Log Out') ?>"><?php _e('Log Out'); ?></a></p> |
111 | </div> |
112 | |
113 | <?php favorite_actions(); ?> |
114 | </div> |
115 | </div> |
116 | |
117 | <?php if ( get_user_setting('mfold') == 'f' ) { ?> |
118 | <script type="text/javascript">jQuery('#wpcontent').addClass('folded');</script> |
119 | <?php } ?> |
120 | |
121 | <div id="wpbody"> |
122 | <?php require(ABSPATH . 'wp-admin/menu-header.php'); ?> |
123 | |
124 | <div id="wpbody-content"> |
125 | <?php |
126 | screen_meta($hook_suffix); |
127 | |
128 | do_action('admin_notices'); |
129 | |
130 | if ( $parent_file == 'options-general.php' ) { |
131 | require(ABSPATH . 'wp-admin/options-head.php'); |
132 | } |