Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 128 lines (100 sloc) 4.059 kb
e297c36 Move raquo into gettext. Props SteveAgl. fixes #2453
ryan authored
1 <?php
175c2b6 WP-Admin File Level Inline Documentation from santosj. see #7496
ryan authored
2 /**
3 * WordPress Administration Template Header
4 *
5 * @package WordPress
6 * @subpackage Administration
7 */
8
9ce729e Content-Type, not Content-type, as headers are case sensitive. Props foo...
rob1n authored
9 @header('Content-Type: ' . get_option('html_type') . '; charset=' . get_option('blog_charset'));
1eb297c Fix admin.php?import=x pages, which can re-include itself in certain env...
nacin authored
10 if ( ! defined( 'WP_ADMIN' ) )
11 require_once( './admin.php' );
4d49e98 Script loader from mdawaffe. #2701
ryan authored
12
5dab729 Globalize variables used in admin-header in case it is used in a functio...
nacin authored
13 // In case admin-header.php is included in a function.
14 global $title, $hook_suffix, $current_screen, $wp_locale, $pagenow, $wp_version, $is_iphone,
30ff371 Don't use $user_identity global. props duck_. fixes #19146.
nacin authored
15 $current_site, $update_title, $total_update_count, $parent_file;
5dab729 Globalize variables used in admin-header in case it is used in a functio...
nacin authored
16
b1935de Call set_current_screen() again in admin-header.php in case a plugin inc...
nacin authored
17 // Catch plugins that include admin-header.php before admin.php completes.
18 if ( empty( $current_screen ) )
19 set_current_screen();
20
4d49e98 Script loader from mdawaffe. #2701
ryan authored
21 get_admin_page_title();
119b39c deprecate wp_specialchars() in favor of esc_html(). Encode quotes for es...
markjaquith authored
22 $title = esc_html( strip_tags( $title ) );
21e3f0f Network Admin, first pass. see #14435
ryan authored
23
76f3dd9 Titles for network admin and global dashboard. see #15477
ryan authored
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 &#8212; WordPress' ), $title );
33 else
34 $admin_title = sprintf( __( '%1$s &lsaquo; %2$s &#8212; WordPress' ), $title, $admin_title );
35
4b260b3 Make admin screen titles filterable. Props caesarsgrunt. Fixes #15301
scribu authored
36 $admin_title = apply_filters( 'admin_title', $admin_title, $title );
37
47c1924 Run wp_user_settings() from admin-header
ryan authored
38 wp_user_settings();
21e3f0f Network Admin, first pass. see #14435
ryan authored
39
e849d3b Use IE conditionals when adding the ie8 class, introduce _wp_admin_html_...
azaozz authored
40 _wp_admin_html_begin();
759faa6 HTML and JS cleanup
matt authored
41 ?>
4b260b3 Make admin screen titles filterable. Props caesarsgrunt. Fixes #15301
scribu authored
42 <title><?php echo $admin_title; ?></title>
04c9051 Remove trailing whites.
ryan authored
43 <?php
9178934 Add wp_default_styles(), convert wp_admin_css(). Props mdawaffe. see #70...
ryan authored
44
1cdec6f Merge most admin css files, first run, see #18314
azaozz authored
45 wp_enqueue_style( 'colors' );
46 wp_enqueue_style( 'ie' );
1c9353a Cleanup js files and prepare for concatenating, move most inline js to f...
azaozz authored
47 wp_enqueue_script('utils');
9178934 Add wp_default_styles(), convert wp_admin_css(). Props mdawaffe. see #70...
ryan authored
48
e4e96c1 Add $hook_suffix as js var, fixes #10008
azaozz authored
49 $admin_body_class = preg_replace('/[^a-z0-9_-]+/i', '-', $hook_suffix);
df17a15 New manage posts almost fully functional, and some admin CSS reorganizat...
matt authored
50 ?>
6c5157a Cleaning out some errors and fixing some XHTML 1.1 problems.
saxmatt authored
51 <script type="text/javascript">
1c9353a Cleanup js files and prepare for concatenating, move most inline js to f...
azaozz authored
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();}}};
95623b4 Fix metabox hiding. Props scribu. fixes #12439
ryan authored
53 var userSettings = {
e25a65b Trim trailing whitespace
ryan authored
54 'url': '<?php echo SITECOOKIEPATH; ?>',
95623b4 Fix metabox hiding. Props scribu. fixes #12439
ryan authored
55 'uid': '<?php if ( ! isset($current_user) ) $current_user = wp_get_current_user(); echo $current_user->ID; ?>',
56 'time':'<?php echo time() ?>'
57 },
e25a65b Trim trailing whitespace
ryan authored
58 ajaxurl = '<?php echo admin_url('admin-ajax.php'); ?>',
59 pagenow = '<?php echo $current_screen->id; ?>',
304a360 WP_Screen->post_type is always set. see #19131.
nacin authored
60 typenow = '<?php echo $current_screen->post_type; ?>',
e25a65b Trim trailing whitespace
ryan authored
61 adminpage = '<?php echo $admin_body_class; ?>',
9356c4b Restore support for floating point numbers in number_format_i18n(). Fixe...
westi authored
62 thousandsSeparator = '<?php echo addslashes( $wp_locale->number_format['thousands_sep'] ); ?>',
00192e2 Add JS var isRtl to admin-header and remove unused JS localized vars for...
nacin authored
63 decimalPoint = '<?php echo addslashes( $wp_locale->number_format['decimal_point'] ); ?>',
64 isRtl = <?php echo (int) is_rtl(); ?>;
a31be59 New admin file locations.
saxmatt authored
65 </script>
3d29e57 Add page options to edit/write page, remove the IE6 scrollbar hack (seem...
azaozz authored
66 <?php
4f10239 Add page specific admin_head action. Add admin_print_scripts actions.
ryan authored
67
45c7401 Add action "admin_enqueue_scripts" to make it easy for plugins to queue ...
azaozz authored
68 do_action('admin_enqueue_scripts', $hook_suffix);
97c061a screen_meta() and contextual help improvements from filosofo. fixes #817...
ryan authored
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');
a4c4566 Fix 'admin_body_class' filter
azaozz authored
75
ef301b7 unset temp vars so they don't pollute the global namespace. Formatting c...
ryan authored
76 if ( get_user_setting('mfold') == 'f' )
6d535ce Load the menu folded (if set), load the editor earlier
azaozz authored
77 $admin_body_class .= ' folded';
3949ce1 Pink trailing whites.
ryan authored
78
b1e7c51 Remove wp_admin_body_style(). Props ocean90. fixes #15507
ryan authored
79 if ( is_admin_bar_showing() )
3949ce1 Pink trailing whites.
ryan authored
80 $admin_body_class .= ' admin-bar';
4a6cfee Revert [10489], it brings non-critical 404 errors
azaozz authored
81
209f213 Add rtl class to the admin body if is_rtl(). RTL fixes for twentyeleven...
ryan authored
82 if ( is_rtl() )
83 $admin_body_class .= ' rtl';
84
39ba82b Handle locales that use a comma as a separator when generating version c...
ryan authored
85 $admin_body_class .= ' branch-' . str_replace( array( '.', ',' ), '-', floatval( $wp_version ) );
9c7fce4 Add admin body classes for the WP branch, WP version, and current admin ...
nacin authored
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
7160187 Improved no-js styles
azaozz authored
89 if ( $is_iphone ) { ?>
90 <style type="text/css">.row-actions{visibility:visible;}</style>
91 <?php } ?>
92 </head>
93 <body class="wp-admin no-js <?php echo apply_filters( 'admin_body_class', '' ) . " $admin_body_class"; ?>">
53ac6d4 Clean up unused bits from responsive admin, fix the JS on dashboard, see...
azaozz authored
94 <script type="text/javascript">document.body.className = document.body.className.replace('no-js','js');</script>
b54484f Faster hide-if-no-js, if-js-closed, etc. needed when loading scripts in ...
azaozz authored
95
3905811 Have footer stay at the bottom even on short pages in long windows. Hat ...
matt authored
96 <div id="wpwrap">
8d87f5d Big UI style update. props koopersmith. see #17324
markjaquith authored
97 <?php require(ABSPATH . 'wp-admin/menu-header.php'); ?>
3905811 Have footer stay at the bottom even on short pages in long windows. Hat ...
matt authored
98 <div id="wpcontent">
9e4e87d Gears update from azaozz. see #6965
ryan authored
99
7a16085 Add user actions dropdown to admin header. see #17324.
koopersmith authored
100 <?php
101 do_action('in_admin_header');
102 ?>
103
3c1095b Fix position of admin notices, includes patch by caesarsgrunt, fixes #76...
azaozz authored
104 <div id="wpbody">
05bf738 Merge edit-pages.php into edit.php. see #9674
ryan authored
105 <?php
b61a5b0 Update indicator for the Network Admin link. fixes #16063.
nacin authored
106 unset($title_class, $blog_name, $total_update_count, $update_title);
ef301b7 unset temp vars so they don't pollute the global namespace. Formatting c...
ryan authored
107
d417524 Introduce help tabs and WP_Screen. props mbijon, goldenapples, natebedor...
koopersmith authored
108 $current_screen->set_parentage( $parent_file );
109
05bf738 Merge edit-pages.php into edit.php. see #9674
ryan authored
110 ?>
2e6d9f2 Attach 'Screen Options' button to the sliding layer and related changes
azaozz authored
111
3c1095b Fix position of admin notices, includes patch by caesarsgrunt, fixes #76...
azaozz authored
112 <div id="wpbody-content">
113 <?php
2d3fa6f Make screen options a help tab. Move screen option functions into WP_Scr...
koopersmith authored
114
115 $current_screen->render_screen_meta();
d3eefc6 Move admin_notices after screen meta
ryan authored
116
39e775d Issue user_admin_notices for user admin. Issue admin_notices only for b...
ryan authored
117 if ( is_network_admin() )
4479952 Update network upgrade links. see #14435
ryan authored
118 do_action('network_admin_notices');
39e775d Issue user_admin_notices for user admin. Issue admin_notices only for b...
ryan authored
119 elseif ( is_user_admin() )
120 do_action('user_admin_notices');
75c741c Revert other stuffs from [19374].
nacin authored
121 else
4398329 Revert [16292], admin_notices for non-network non-user only. all_admin_n...
nacin authored
122 do_action('admin_notices');
4479952 Update network upgrade links. see #14435
ryan authored
123
75c741c Revert other stuffs from [19374].
nacin authored
124 do_action('all_admin_notices');
cc7c443 Move screen_meta() to admin header. Add all meta boxes before requiring...
ryan authored
125
ef301b7 unset temp vars so they don't pollute the global namespace. Formatting c...
ryan authored
126 if ( $parent_file == 'options-general.php' )
764f50b ABSPATH already has a trailing slash. Props Nazgul. fixes #4607
markjaquith authored
127 require(ABSPATH . 'wp-admin/options-head.php');
Something went wrong with that request. Please try again.