html_type to allow for true XHTML.

git-svn-id: http://svn.automattic.com/wordpress/trunk@2321 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
saxmatt 2005-02-14 04:36:57 +00:00
parent 41f2e62b24
commit 8e014dea63
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> <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="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" /> <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"> <script type="text/javascript">
//<![CDATA[ //<![CDATA[

View File

@ -52,7 +52,7 @@ window.close()
<html xmlns="http://www.w3.org/1999/xhtml"> <html xmlns="http://www.w3.org/1999/xhtml">
<head> <head>
<title><?php bloginfo('name') ?> &rsaquo; Bookmarklet &#8212; WordPress</title> <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="stylesheet" href="wp-admin.css" type="text/css" />
<link rel="shortcut icon" href="../wp-images/wp-favicon.png" /> <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"> <html xmlns="http://www.w3.org/1999/xhtml">
<head> <head>
<title>WordPress &#8250; Posted</title> <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" /> <link rel="stylesheet" href="wp-admin.css" type="text/css" />
</head> </head>
<body <body
@ -30,7 +30,7 @@ if ('b' == $_GET['a']) {
<html xmlns="http://www.w3.org/1999/xhtml"> <html xmlns="http://www.w3.org/1999/xhtml">
<head> <head>
<title>WordPress &#8250; Sidebar</title> <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="stylesheet" href="wp-admin.css" type="text/css" />
<link rel="shortcut icon" href="../wp-images/wp-favicon.png" /> <link rel="shortcut icon" href="../wp-images/wp-favicon.png" />
<style type="text/css" media="screen"> <style type="text/css" media="screen">

View File

@ -194,7 +194,7 @@ function populate_options() {
add_option('permalink_structure'); add_option('permalink_structure');
add_option('gzipcompression', 0); add_option('gzipcompression', 0);
add_option('hack_file', 0); add_option('hack_file', 0);
add_option('blog_charset', 'utf-8'); add_option('blog_charset', 'UTF-8');
add_option('moderation_keys'); add_option('moderation_keys');
add_option('active_plugins'); add_option('active_plugins');
add_option('home'); add_option('home');
@ -214,6 +214,7 @@ function populate_options() {
add_option('comment_registration', 0); add_option('comment_registration', 0);
add_option('open_proxy_check', 1); add_option('open_proxy_check', 1);
add_option('rss_language', 'en'); add_option('rss_language', 'en');
add_option('html_type', 'text/html');
// Delete unused options // 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'); $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> <modified><?php the_time('Y-m-d\TH:i:s\Z'); ?></modified>
<issued> <?php the_time('Y-m-d\TH:i:s\Z'); ?></issued> <issued> <?php the_time('Y-m-d\TH:i:s\Z'); ?></issued>
<?php the_category_rss('rdf') ?> <?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 (!get_settings('rss_use_excerpt')) : ?>
<?php if ( strlen( $post->post_content ) ) : ?> <?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 : ?> <?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 endif; ?>
<?php else : ?> <?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 endif; ?>
<?php rss_enclosure(); ?> <?php rss_enclosure(); ?>
</entry> </entry>

View File

@ -112,7 +112,7 @@ if ( !empty($error) && '404' == $error ) {
@header('HTTP/1.x 404 Not Found'); @header('HTTP/1.x 404 Not Found');
} else if ( empty($feed) ) { } else if ( empty($feed) ) {
@header('X-Pingback: '. get_bloginfo('pingback_url')); @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 { } else {
// We're showing a feed, so WP is indeed the only thing that last changed // We're showing a feed, so WP is indeed the only thing that last changed
if ( $withcomments ) if ( $withcomments )

View File

@ -10,7 +10,7 @@ foreach ($posts as $post) { start_wp();
<head> <head>
<title><?php echo get_settings('blogname'); ?> - <?php echo sprintf(__("Comments on %s"), the_title('','',false)); ?></title> <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"> <style type="text/css" media="screen">
@import url( <?php bloginfo('stylesheet_url'); ?> ); @import url( <?php bloginfo('stylesheet_url'); ?> );
body { margin: 3px; } body { margin: 3px; }

View File

@ -2,7 +2,7 @@
<html xmlns="http://www.w3.org/1999/xhtml"> <html xmlns="http://www.w3.org/1999/xhtml">
<head profile="http://gmpg.org/xfn/11"> <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> <title><?php bloginfo('name'); ?><?php wp_title(); ?></title>

View File

@ -10,7 +10,7 @@ foreach ($posts as $post) { start_wp();
<head> <head>
<title><?php echo get_settings('blogname'); ?> - <?php echo sprintf(__("Comments on %s"), the_title('','',false)); ?></title> <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"> <style type="text/css" media="screen">
@import url( <?php bloginfo('stylesheet_url'); ?> ); @import url( <?php bloginfo('stylesheet_url'); ?> );
body { margin: 3px; } body { margin: 3px; }

View File

@ -2,7 +2,7 @@
<html xmlns="http://www.w3.org/1999/xhtml"> <html xmlns="http://www.w3.org/1999/xhtml">
<head profile="http://gmpg.org/xfn/11"> <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> <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'); $output = get_settings('blog_charset');
if ('' == $output) $output = 'UTF-8'; if ('' == $output) $output = 'UTF-8';
break; break;
case 'html_type' :
$output = get_option('html_type');
break;
case 'version': case 'version':
global $wp_version; global $wp_version;
$output = $wp_version; $output = $wp_version;

View File

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

View File

@ -88,7 +88,7 @@ case 'register':
<html xmlns="http://www.w3.org/1999/xhtml"> <html xmlns="http://www.w3.org/1999/xhtml">
<head> <head>
<title>WordPress &raquo; <?php _e('Registration Complete') ?></title> <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" /> <link rel="stylesheet" href="wp-admin/wp-admin.css" type="text/css" />
<style type="text/css"> <style type="text/css">
.submit { .submit {
@ -118,7 +118,7 @@ case 'disabled':
<html xmlns="http://www.w3.org/1999/xhtml"> <html xmlns="http://www.w3.org/1999/xhtml">
<head> <head>
<title>WordPress &raquo; <?php _e('Registration Currently Disabled') ?></title> <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"> <link rel="stylesheet" href="wp-admin/wp-admin.css" type="text/css">
</head> </head>
@ -144,7 +144,7 @@ default:
<html xmlns="http://www.w3.org/1999/xhtml"> <html xmlns="http://www.w3.org/1999/xhtml">
<head> <head>
<title>WordPress &raquo; <?php _e('Registration Form') ?></title> <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" /> <link rel="stylesheet" href="wp-admin/wp-admin.css" type="text/css" />
<style type="text/css"> <style type="text/css">
#user_email, #user_login, #submit { #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"> <html xmlns="http://www.w3.org/1999/xhtml">
<head> <head>
<title><?php bloginfo('name'); ?><?php wp_title(); ?></title> <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 --> <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="alternate" type="text/xml" title="RSS" href="<?php bloginfo('rss2_url'); ?>" />
<link rel="pingback" href="<?php bloginfo('pingback_url'); ?>" /> <link rel="pingback" href="<?php bloginfo('pingback_url'); ?>" />