[wp-trac] [WordPress Trac] #4575: Add functions to return the last-modified timestamp of a category/tag

WordPress Trac noreply at wordpress.org
Sun Mar 29 23:57:38 UTC 2015


#4575: Add functions to return the last-modified timestamp of a category/tag
----------------------------------------+-----------------------------
 Reporter:  delusions                   |       Owner:
     Type:  enhancement                 |      Status:  new
 Priority:  normal                      |   Milestone:  Future Release
Component:  Feeds                       |     Version:  2.2.1
 Severity:  normal                      |  Resolution:
 Keywords:  needs-patch good-first-bug  |     Focuses:  template
----------------------------------------+-----------------------------
Changes (by MikeNGarrett):

 * component:  Taxonomy => Feeds


Comment:

 I'm assuming this references `lastBuildDate` on category feeds. I noticed
 these were all the same for all categories regardless of the feed content.

 It appears to correlate to the date and time of the latest updated post
 using [https://codex.wordpress.org/Function_Reference/get_lastpostmodified
 get_lastpostmodified].

 The only other place this function is referenced is in `send_headers()` to
 set `Last-Modified` and `ETag` globally, so changing
 `get_lastpostmodified()` needs to be done carefully.

 In this case, could we rely on the globalized post object being accurate
 for the last modified post? or would this require hooking into `wp_query`
 to get a more accurate result?

--
Ticket URL: <https://core.trac.wordpress.org/ticket/4575#comment:15>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list