html_type to allow for true XHTML.

git-svn-id: https://develop.svn.wordpress.org/trunk@2321 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Matt Mullenweg 2005-02-14 04:36:57 +00:00
parent b6c203b47d
commit ed8a84e4cd
14 changed files with 24 additions and 20 deletions

View File

@ -6,7 +6,7 @@
<title><?php bloginfo('name') ?> &rsaquo; <?php echo $title; ?> &#8212; WordPress</title>
<link rel="stylesheet" href="<?php echo get_settings('siteurl') ?>/wp-admin/wp-admin.css" type="text/css" />
<link rel="shortcut icon" href="../wp-images/wp-favicon.png" />
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo get_settings('blog_charset'); ?>" />
<meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php echo get_settings('blog_charset'); ?>" />
<script type="text/javascript">
//<![CDATA[

View File

@ -52,7 +52,7 @@ window.close()
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title><?php bloginfo('name') ?> &rsaquo; Bookmarklet &#8212; WordPress</title>
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo get_settings('blog_charset'); ?>" />
<meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php echo get_settings('blog_charset'); ?>" />
<link rel="stylesheet" href="wp-admin.css" type="text/css" />
<link rel="shortcut icon" href="../wp-images/wp-favicon.png" />

View File

@ -15,7 +15,7 @@ if ('b' == $_GET['a']) {
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>WordPress &#8250; Posted</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=UTF-8" />
<link rel="stylesheet" href="wp-admin.css" type="text/css" />
</head>
<body
@ -30,7 +30,7 @@ if ('b' == $_GET['a']) {
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>WordPress &#8250; Sidebar</title>
<meta http-equiv="Content-Type" content="text/html; charset=<?php bloginfo('blog_charset'); ?>" />
<meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('blog_charset'); ?>" />
<link rel="stylesheet" href="wp-admin.css" type="text/css" />
<link rel="shortcut icon" href="../wp-images/wp-favicon.png" />
<style type="text/css" media="screen">

View File

@ -194,7 +194,7 @@ function populate_options() {
add_option('permalink_structure');
add_option('gzipcompression', 0);
add_option('hack_file', 0);
add_option('blog_charset', 'utf-8');
add_option('blog_charset', 'UTF-8');
add_option('moderation_keys');
add_option('active_plugins');
add_option('home');
@ -214,6 +214,7 @@ function populate_options() {
add_option('comment_registration', 0);
add_option('open_proxy_check', 1);
add_option('rss_language', 'en');
add_option('html_type', 'text/html');
// Delete unused options
$unusedoptions = array ('blodotgsping_url', 'bodyterminator', 'emailtestonly', 'phoneemail_separator', 'smilies_directory', 'subjectprefix', 'use_bbcode', 'use_blodotgsping', 'use_phoneemail', 'use_quicktags', 'use_weblogsping', 'weblogs_cache_file', 'use_preview', 'use_htmltrans', 'smilies_directory', 'fileupload_allowedusers', 'use_phoneemail', 'default_post_status', 'default_post_category', 'archive_mode', 'time_difference', 'links_minadminlevel', 'links_use_adminlevels', 'links_rating_type', 'links_rating_char', 'links_rating_ignore_zero', 'links_rating_single_image', 'links_rating_image0', 'links_rating_image1', 'links_rating_image2', 'links_rating_image3', 'links_rating_image4', 'links_rating_image5', 'links_rating_image6', 'links_rating_image7', 'links_rating_image8', 'links_rating_image9', 'weblogs_cacheminutes', 'comment_allowed_tags', 'search_engine_friendly_urls', 'default_geourl_lat', 'default_geourl_lon', 'use_default_geourl', 'weblogs_xml_url');

View File

@ -35,15 +35,15 @@ $more = 1;
<modified><?php the_time('Y-m-d\TH:i:s\Z'); ?></modified>
<issued> <?php the_time('Y-m-d\TH:i:s\Z'); ?></issued>
<?php the_category_rss('rdf') ?>
<summary type="text/html" mode="escaped"><![CDATA[<?php the_excerpt_rss(); ?>]]></summary>
<summary type="<?php bloginfo('html_type'); ?>" mode="escaped"><![CDATA[<?php the_excerpt_rss(); ?>]]></summary>
<?php if (!get_settings('rss_use_excerpt')) : ?>
<?php if ( strlen( $post->post_content ) ) : ?>
<content type="text/html" mode="escaped" xml:base="<?php permalink_single_rss() ?>"><![CDATA[<?php the_content('', 0, '') ?>]]></content>
<content type="<?php bloginfo('html_type'); ?>" mode="escaped" xml:base="<?php permalink_single_rss() ?>"><![CDATA[<?php the_content('', 0, '') ?>]]></content>
<?php else : ?>
<content type="text/html" mode="escaped" xml:base="<?php permalink_single_rss() ?>"><![CDATA[<?php the_excerpt_rss(); ?>]]></content>
<content type="<?php bloginfo('html_type'); ?>" mode="escaped" xml:base="<?php permalink_single_rss() ?>"><![CDATA[<?php the_excerpt_rss(); ?>]]></content>
<?php endif; ?>
<?php else : ?>
<content type="text/html" mode="escaped" xml:base="<?php permalink_single_rss() ?>"><![CDATA[<?php the_excerpt_rss() ?>]]></content>
<content type="<?php bloginfo('html_type'); ?>" mode="escaped" xml:base="<?php permalink_single_rss() ?>"><![CDATA[<?php the_excerpt_rss() ?>]]></content>
<?php endif; ?>
<?php rss_enclosure(); ?>
</entry>

View File

@ -112,7 +112,7 @@ if ( !empty($error) && '404' == $error ) {
@header('HTTP/1.x 404 Not Found');
} else if ( empty($feed) ) {
@header('X-Pingback: '. get_bloginfo('pingback_url'));
@header('Content-type: text/html; charset=' . get_option('blog_charset'));
@header('Content-type: ' . get_option('html_type') . '; charset=' . get_option('blog_charset'));
} else {
// We're showing a feed, so WP is indeed the only thing that last changed
if ( $withcomments )

View File

@ -10,7 +10,7 @@ foreach ($posts as $post) { start_wp();
<head>
<title><?php echo get_settings('blogname'); ?> - <?php echo sprintf(__("Comments on %s"), the_title('','',false)); ?></title>
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo get_settings('blog_charset'); ?>" />
<meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php echo get_settings('blog_charset'); ?>" />
<style type="text/css" media="screen">
@import url( <?php bloginfo('stylesheet_url'); ?> );
body { margin: 3px; }

View File

@ -2,7 +2,7 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head profile="http://gmpg.org/xfn/11">
<meta http-equiv="Content-Type" content="text/html; charset=<?php bloginfo('charset'); ?>" />
<meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>" />
<title><?php bloginfo('name'); ?><?php wp_title(); ?></title>

View File

@ -10,7 +10,7 @@ foreach ($posts as $post) { start_wp();
<head>
<title><?php echo get_settings('blogname'); ?> - <?php echo sprintf(__("Comments on %s"), the_title('','',false)); ?></title>
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo get_settings('blog_charset'); ?>" />
<meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php echo get_settings('blog_charset'); ?>" />
<style type="text/css" media="screen">
@import url( <?php bloginfo('stylesheet_url'); ?> );
body { margin: 3px; }

View File

@ -2,7 +2,7 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head profile="http://gmpg.org/xfn/11">
<meta http-equiv="Content-Type" content="text/html; charset=<?php bloginfo('charset'); ?>" />
<meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>" />
<title><?php bloginfo('name'); ?> <?php if ( is_single() ) { ?> &raquo; Blog Archive <?php } ?> <?php wp_title(); ?></title>

View File

@ -112,6 +112,9 @@ function get_bloginfo($show='') {
$output = get_settings('blog_charset');
if ('' == $output) $output = 'UTF-8';
break;
case 'html_type' :
$output = get_option('html_type');
break;
case 'version':
global $wp_version;
$output = $wp_version;

View File

@ -39,7 +39,7 @@ case 'lostpassword':
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>WordPress &raquo; <?php _e('Lost Password') ?></title>
<meta http-equiv="Content-Type" content="text/html; charset=<?php bloginfo('charset'); ?>" />
<meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>" />
<link rel="stylesheet" href="<?php echo get_settings('siteurl'); ?>/wp-admin/wp-admin.css" type="text/css" />
<script type="text/javascript">
function focusit() {
@ -196,7 +196,7 @@ default:
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>WordPress &rsaquo; <?php _e('Login') ?></title>
<meta http-equiv="Content-Type" content="text/html; charset=<?php bloginfo('charset'); ?>" />
<meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>" />
<link rel="stylesheet" href="<?php bloginfo('wpurl'); ?>/wp-admin/wp-admin.css" type="text/css" />
<script type="text/javascript">
function focusit() {

View File

@ -88,7 +88,7 @@ case 'register':
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>WordPress &raquo; <?php _e('Registration Complete') ?></title>
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo get_settings('blog_charset'); ?>" />
<meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php echo get_settings('blog_charset'); ?>" />
<link rel="stylesheet" href="wp-admin/wp-admin.css" type="text/css" />
<style type="text/css">
.submit {
@ -118,7 +118,7 @@ case 'disabled':
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>WordPress &raquo; <?php _e('Registration Currently Disabled') ?></title>
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo get_settings('blog_charset'); ?>">
<meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php echo get_settings('blog_charset'); ?>">
<link rel="stylesheet" href="wp-admin/wp-admin.css" type="text/css">
</head>
@ -144,7 +144,7 @@ default:
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>WordPress &raquo; <?php _e('Registration Form') ?></title>
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo get_settings('blog_charset'); ?>" />
<meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php echo get_settings('blog_charset'); ?>" />
<link rel="stylesheet" href="wp-admin/wp-admin.css" type="text/css" />
<style type="text/css">
#user_email, #user_login, #submit {

2
wp.php
View File

@ -7,7 +7,7 @@ require_once('./wp-blog-header.php');
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title><?php bloginfo('name'); ?><?php wp_title(); ?></title>
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo get_settings('blog_charset'); ?>" />
<meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php echo get_settings('blog_charset'); ?>" />
<meta name="generator" content="WordPress <?php $wp_version ?>" /> <!-- leave this for stats -->
<link rel="alternate" type="text/xml" title="RSS" href="<?php bloginfo('rss2_url'); ?>" />
<link rel="pingback" href="<?php bloginfo('pingback_url'); ?>" />