]> scripts.mit.edu Git - autoinstalls/wordpress.git/blobdiff - wp-admin/admin-header.php
WordPress 3.4
[autoinstalls/wordpress.git] / wp-admin / admin-header.php
index a34a51b882e59990e079f96c8a5a7a879d17b114..248897c9877233ba4e4f1e6f0e3278050bf746c8 100644 (file)
@@ -11,7 +11,7 @@ if ( ! defined( 'WP_ADMIN' ) )
        require_once( './admin.php' );
 
 // In case admin-header.php is included in a function.
-global $title, $hook_suffix, $current_screen, $wp_locale, $pagenow, $wp_version, $is_iphone,
+global $title, $hook_suffix, $current_screen, $wp_locale, $pagenow, $wp_version,
        $current_site, $update_title, $total_update_count, $parent_file;
 
 // Catch plugins that include admin-header.php before admin.php completes.
@@ -55,7 +55,7 @@ var userSettings = {
                'uid': '<?php if ( ! isset($current_user) ) $current_user = wp_get_current_user(); echo $current_user->ID; ?>',
                'time':'<?php echo time() ?>'
        },
-       ajaxurl = '<?php echo admin_url('admin-ajax.php'); ?>',
+       ajaxurl = '<?php echo admin_url( 'admin-ajax.php', 'relative' ); ?>',
        pagenow = '<?php echo $current_screen->id; ?>',
        typenow = '<?php echo $current_screen->post_type; ?>',
        adminpage = '<?php echo $admin_body_class; ?>',
@@ -85,13 +85,26 @@ if ( is_rtl() )
 $admin_body_class .= ' branch-' . str_replace( array( '.', ',' ), '-', floatval( $wp_version ) );
 $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' );
+$admin_body_class .= ' locale-' . sanitize_html_class( strtolower( str_replace( '_', '-', get_locale() ) ) );
 
-if ( $is_iphone ) { ?>
-<style type="text/css">.row-actions{visibility:visible;}</style>
-<?php } ?>
+if ( wp_is_mobile() )
+       $admin_body_class .= ' mobile';
+
+$admin_body_class .= ' no-customize-support';
+
+?>
 </head>
 <body class="wp-admin no-js <?php echo apply_filters( 'admin_body_class', '' ) . " $admin_body_class"; ?>">
-<script type="text/javascript">document.body.className = document.body.className.replace('no-js','js');</script>
+<script type="text/javascript">
+       document.body.className = document.body.className.replace('no-js','js');
+</script>
+
+<?php
+// If the customize-loader script is enqueued, make sure the customize
+// body classes are correct as early as possible.
+if ( wp_script_is( 'customize-loader', 'queue' ) && current_user_can( 'edit_theme_options' ) )
+       wp_customize_support_script();
+?>
 
 <div id="wpwrap">
 <?php require(ABSPATH . 'wp-admin/menu-header.php'); ?>