Opened 6 years ago

Last modified 4 years ago

#4575 new enhancement

Add functions to return the last-modified timestamp of a category/tag

Reported by: delusions Owned by: anonymous
Priority: normal Milestone: Future Release
Component: Template Version: 2.2.1
Severity: normal Keywords: needs-patch
Cc:

Description

Hi,

All categories Last-Modified dates are the same, and thats a one big rss file i guess.
Is there a chance to send individual Last-Modified dates to these feed ?

Thanks

Change History (10)

  • Milestone set to 2.4 (future)
  • Milestone changed from 2.5 to 2.7

comment:3   matt5 years ago

  • Milestone changed from 2.7 to 2.9
  • Priority changed from normal to low
  • Severity changed from normal to minor
  • Component changed from Optimization to Feeds
  • Keywords needs-patch added
  • Milestone changed from 2.9 to Future Release
  • Priority changed from low to normal
  • Severity changed from minor to normal

I suggest adding a function that returns the last-modified timestamp of the query in WP_Query.

Alternatively, since the first entry in the feed is the latest, using it as the feed's last-modified timestamp seems to be fine as well.

seems right, yes. if posts, use the latest (possibly non-sticky) post to work it out, else we fallback to the normal last modified date.

  • Component changed from Feeds to Template
  • Summary changed from Last-Modified for rss categories to Add functions to return the last-modified timestamp of a category/tag

Perhaps this should be moved from Feeds to Template because the category_last_modified and tag_last_modified functions have to be implemented in category-template.php first. The last_modified functions may also be used for generating the HTTP Last-Modified header when the category/tag is loaded.

  • Type changed from task (blessed) to enhancement
Note: See TracTickets for help on using tickets.