Ticket #4816 (closed defect: fixed)

Opened 1 year ago

Last modified 1 year ago

Atom feed entry updated field should use get_post_modified_time, not get_post_time

Reported by: lapcat Assigned to: anonymous
Priority: normal Milestone: 2.3
Component: General Version: 2.2.2
Severity: normal Keywords: Atom feed entry updated has-patch
Cc:

Description

The file wp-includes/feed-atom.php in WordPress 2.2 contains code for generating an Atom feed. (In WordPress 2.0, the code is in the file wp_atom.php.) Here are lines 34 and 35 from feed-atom.php:

		<updated><?php echo get_post_time('Y-m-d\TH:i:s\Z', true); ?></updated>
		<published><?php echo get_post_time('Y-m-d\TH:i:s\Z', true); ?></published>

Both the updated and published fields use the function get_post_time, so the date output will end up being the same. Line 34 should be replaced with the following:

		<updated><?php echo get_post_modified_time('Y-m-d\TH:i:s\Z', true); ?></updated>

I've been using this modification in my own blog for 10 months will no ill effects. Feed readers such as Vienna, which I am a developer for, can correctly parse this updated date information and respond accordingly.

See the Atom API for reference on the updated entry field.

Attachments

feed-atom-patch.txt (0.8 kB) - added by lapcat on 08/25/07 18:14:07.
Patch for wp-includes/feed-atom.php

Change History

08/25/07 18:14:07 changed by lapcat

  • attachment feed-atom-patch.txt added.

Patch for wp-includes/feed-atom.php

08/25/07 18:14:54 changed by lapcat

  • keywords changed from Atom feed entry updated to Atom feed entry updated has-patch.

08/25/07 20:15:24 changed by foolswisdom

  • milestone set to 2.3.

09/12/07 16:26:40 changed by westi

  • status changed from new to closed.
  • resolution set to fixed.

(In [6093]) Make the atom feed updated field actually tell you when the post was updated. Fixes #4816 props lapcat.