Make WordPress Core

Changeset 4803 for trunk/wp-atom.php


Ignore:
Timestamp:
01/25/2007 08:02:18 AM (18 years ago)
Author:
matt
Message:

Beta Atom 1.0 support

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-atom.php

    r4688 r4803  
    1111?>
    1212<?php echo '<?xml version="1.0" encoding="'.get_option('blog_charset').'"?'.'>'; ?>
    13 <feed version="0.3"
    14     xmlns="http://purl.org/atom/ns#"
    15     xmlns:dc="http://purl.org/dc/elements/1.1/"
    16     xml:lang="<?php echo get_option('rss_language'); ?>"
    17     <?php do_action('atom_ns'); ?>
    18 >
    19     <title><?php bloginfo_rss('name') ?></title>
     13<feed
     14  xmlns="http://www.w3.org/2005/Atom"
     15  xmlns:thr="http://purl.org/syndication/thread/1.0"
     16  xml:lang="<?php echo get_option('rss_language'); ?>"
     17  xml:base="<?php bloginfo_rss('home') ?>/wp-atom.php"
     18  <?php do_action('atom_ns'); ?>
     19 >
     20    <title type="text"><?php bloginfo_rss('name') ?></title>
     21    <subtitle type="text"><?php bloginfo_rss("description") ?></subtitle>
     22   
     23    <updated><?php echo mysql2date('Y-m-d\TH:i:s\Z', get_lastpostmodified('GMT')); ?></updated>
     24    <generator url="http://wordpress.org/" version="<?php bloginfo_rss('version'); ?>">WordPress</generator>
     25
    2026    <link rel="alternate" type="text/html" href="<?php bloginfo_rss('home') ?>" />
    21     <tagline><?php bloginfo_rss("description") ?></tagline>
    22     <modified><?php echo mysql2date('Y-m-d\TH:i:s\Z', get_lastpostmodified('GMT'), false); ?></modified>
    23     <copyright>Copyright <?php echo mysql2date('Y', get_lastpostdate('blog'), 0); ?></copyright>
    24     <generator url="http://wordpress.org/" version="<?php bloginfo_rss('version'); ?>">WordPress</generator>
     27    <id><?php bloginfo('atom_url'); ?></id>
     28    <link rel="self" type="application/atom+xml" href="<?php bloginfo('atom_url'); ?>" />
     29
    2530    <?php do_action('atom_head'); ?>
    2631    <?php while (have_posts()) : the_post(); ?>
     
    2833        <author>
    2934            <name><?php the_author() ?></name>
     35            <uri><?php the_author_url()?></uri>
    3036        </author>
    3137        <title type="text/html" mode="escaped"><![CDATA[<?php the_title_rss() ?>]]></title>
    3238        <link rel="alternate" type="text/html" href="<?php permalink_single_rss() ?>" />
    3339        <id><?php the_guid(); ?></id>
    34         <modified><?php echo get_post_time('Y-m-d\TH:i:s\Z', true); ?></modified>
    35         <issued><?php echo get_post_time('Y-m-d\TH:i:s\Z', true); ?></issued>
    36         <?php the_category_rss('rdf') ?>
    37         <summary type="<?php bloginfo('html_type'); ?>" mode="escaped"><![CDATA[<?php the_excerpt_rss(); ?>]]></summary>
     40        <updated><?php echo get_post_time('Y-m-d\TH:i:s\Z', true); ?></updated>
     41        <published><?php echo get_post_time('Y-m-d\TH:i:s\Z', true); ?></published>
     42        <?php the_category_rss('atom') ?>
     43        <summary type="<?php bloginfo('html_type'); ?>"><![CDATA[<?php the_excerpt_rss(); ?>]]></summary>
    3844<?php if ( !get_option('rss_use_excerpt') ) : ?>
    39         <content type="<?php bloginfo('html_type'); ?>" mode="escaped" xml:base="<?php permalink_single_rss() ?>"><![CDATA[<?php the_content('', 0, '') ?>]]></content>
     45        <content type="<?php bloginfo('html_type'); ?>" xml:base="<?php permalink_single_rss() ?>"><![CDATA[<?php the_content('', 0, '') ?>]]></content>
    4046<?php endif; ?>
    4147<?php rss_enclosure(); ?>
Note: See TracChangeset for help on using the changeset viewer.