Use IE conditionals when adding the ie8 class, introduce _wp_admin_html_begin(), props scribu, fixes #18966

git-svn-id: http://svn.automattic.com/wordpress/trunk@18982 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
azaozz 2011-10-17 20:57:32 +00:00
parent 1bc8ca65fe
commit e849d3b270
5 changed files with 20 additions and 22 deletions

View File

@ -33,11 +33,8 @@ $admin_title = apply_filters( 'admin_title', $admin_title, $title );
wp_user_settings();
_wp_admin_html_begin();
?>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" <?php do_action('admin_xml_ns'); echo "$wp_htmltag_class "; language_attributes(); ?>>
<head>
<meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php echo get_option('blog_charset'); ?>" />
<title><?php echo $admin_title; ?></title>
<?php

View File

@ -309,11 +309,8 @@ function media_handle_sideload($file_array, $post_id, $desc = null, $post_data =
* @param unknown_type $content_func
*/
function wp_iframe($content_func /* ... */) {
_wp_admin_html_begin();
?>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" <?php do_action('admin_xml_ns'); echo $GLOBALS['wp_htmltag_class'] . ' '; language_attributes(); ?>>
<head>
<meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php echo get_option('blog_charset'); ?>" />
<title><?php bloginfo('name') ?> &rsaquo; <?php _e('Uploads'); ?> &#8212; <?php _e('WordPress'); ?></title>
<?php

View File

@ -1352,10 +1352,8 @@ function iframe_header( $title = '', $limit_styles = false ) {
global $hook_suffix, $current_screen, $current_user, $admin_body_class, $wp_locale;
$admin_body_class = preg_replace('/[^a-z0-9_-]+/i', '-', $hook_suffix);
?><!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" <?php do_action('admin_xml_ns'); echo $GLOBALS['wp_htmltag_class'] . ' '; language_attributes(); ?>>
<head>
<meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php echo get_option('blog_charset'); ?>" />
_wp_admin_html_begin();
?>
<title><?php bloginfo('name') ?> &rsaquo; <?php echo $title ?> &#8212; <?php _e('WordPress'); ?></title>
<?php
wp_enqueue_style( 'colors' );
@ -1629,6 +1627,20 @@ function get_submit_button( $text = NULL, $type = 'primary', $name = 'submit', $
return $button;
}
function _wp_admin_html_begin() {
?>
<!DOCTYPE html>
<!--[if IE 8]>
<html xmlns="http://www.w3.org/1999/xhtml" class="ie8" <?php do_action('admin_xml_ns'); ?> <?php language_attributes(); ?>>
<![endif]-->
<!--[if !(IE 8) ]><!-->
<html xmlns="http://www.w3.org/1999/xhtml" <?php do_action('admin_xml_ns'); ?> <?php language_attributes(); ?>>
<!--<![endif]-->
<head>
<meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php echo get_option('blog_charset'); ?>" />
<?php
}
/**
* Initializes the new feature pointers.
*

View File

@ -280,17 +280,11 @@ if ( !empty($_REQUEST['ajax']) ) {
die;
}
?>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" <?php do_action('admin_xml_ns'); echo "$wp_htmltag_class "; language_attributes(); ?>>
<head>
<meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php echo get_option('blog_charset'); ?>" />
<title><?php _e('Press This') ?></title>
<?php
wp_enqueue_style( 'colors' );
wp_enqueue_script( 'post' );
_wp_admin_html_begin();
?>
<title><?php _e('Press This') ?></title>
<script type="text/javascript">
//<![CDATA[
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();}}};

View File

@ -74,8 +74,6 @@ if ( $is_safari && stripos($_SERVER['HTTP_USER_AGENT'], 'mobile') !== false )
$is_IE = ( $is_macIE || $is_winIE );
$wp_htmltag_class = strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE 8.') ? ' class="ie8"' : ''; // can't start with this
// Server detection
/**