mirror of
https://github.com/WordPress/WordPress.git
synced 2024-09-27 06:42:56 +02:00
Fix feed autodiscovery. Props peaceablewhale. fixes #9810
git-svn-id: http://svn.automattic.com/wordpress/trunk@11358 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
e8b025b971
commit
a5e73d3b9b
@ -5,7 +5,7 @@
|
|||||||
* @package WordPress
|
* @package WordPress
|
||||||
*/
|
*/
|
||||||
|
|
||||||
header('Content-Type: ' . feed_content_type('rss') . '; charset=' . get_option('blog_charset'), true);
|
header('Content-Type: ' . feed_content_type('rss-http') . '; charset=' . get_option('blog_charset'), true);
|
||||||
$more = 1;
|
$more = 1;
|
||||||
|
|
||||||
echo '<?xml version="1.0" encoding="'.get_option('blog_charset').'"?'.'>'; ?>
|
echo '<?xml version="1.0" encoding="'.get_option('blog_charset').'"?'.'>'; ?>
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
* @package WordPress
|
* @package WordPress
|
||||||
*/
|
*/
|
||||||
|
|
||||||
header('Content-Type: ' . feed_content_type('rss2') . '; charset=' . get_option('blog_charset'), true);
|
header('Content-Type: ' . feed_content_type('rss-http') . '; charset=' . get_option('blog_charset'), true);
|
||||||
|
|
||||||
echo '<?xml version="1.0" encoding="'.get_option('blog_charset').'"?'.'>';
|
echo '<?xml version="1.0" encoding="'.get_option('blog_charset').'"?'.'>';
|
||||||
?>
|
?>
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
* @package WordPress
|
* @package WordPress
|
||||||
*/
|
*/
|
||||||
|
|
||||||
header('Content-Type: ' . feed_content_type('rss2') . '; charset=' . get_option('blog_charset'), true);
|
header('Content-Type: ' . feed_content_type('rss-http') . '; charset=' . get_option('blog_charset'), true);
|
||||||
$more = 1;
|
$more = 1;
|
||||||
|
|
||||||
echo '<?xml version="1.0" encoding="'.get_option('blog_charset').'"?'.'>'; ?>
|
echo '<?xml version="1.0" encoding="'.get_option('blog_charset').'"?'.'>'; ?>
|
||||||
|
@ -523,10 +523,11 @@ function feed_content_type( $type = '' ) {
|
|||||||
$type = get_default_feed();
|
$type = get_default_feed();
|
||||||
|
|
||||||
$types = array(
|
$types = array(
|
||||||
'rss' => 'text/xml',
|
'rss' => 'application/rss+xml',
|
||||||
'rss2' => 'text/xml',
|
'rss2' => 'application/rss+xml',
|
||||||
|
'rss-http' => 'text/xml',
|
||||||
'atom' => 'application/atom+xml',
|
'atom' => 'application/atom+xml',
|
||||||
'rdf' => 'application/rdf+xml',
|
'rdf' => 'application/rdf+xml'
|
||||||
);
|
);
|
||||||
|
|
||||||
$content_type = ( !empty($types[$type]) ) ? $types[$type] : 'application/octet-stream';
|
$content_type = ( !empty($types[$type]) ) ? $types[$type] : 'application/octet-stream';
|
||||||
|
Loading…
Reference in New Issue
Block a user