#17455 closed enhancement (fixed)
Add $post_type argument to get_lastpostdate/get_lastpostmodified/_get_last_post_time
Reported by: | duck_ | Owned by: | SergeyBiryukov |
---|---|---|---|
Milestone: | 4.4 | Priority: | normal |
Severity: | normal | Version: | |
Component: | Posts, Post Types | Keywords: | has-patch needs-unit-tests |
Focuses: | Cc: |
Description
As title says. You can currently use these functions to only get the latest [modification] date of all publicly queryable content types.
Attachments (4)
Change History (14)
#2
@
14 years ago
Haven't tested the cache invalidation in an environment with a persistent cache. Also moved the call to date('Z')
to where it's needed, don't need to hit the system clock if unnecessary.
Related #14922 which added a filter for a short period.
#4
@
9 years ago
- Milestone Awaiting Review deleted
- Resolution set to wontfix
- Status changed from new to closed
There has been no interest or meaningful activity in four years. Closing as wontfix.
#5
@
9 years ago
- Keywords needs-unit-tests added
- Milestone set to 4.4
- Resolution wontfix deleted
- Status changed from closed to reopened
This would make things easier for XML sitemaps in Yoast SEO.
#7
@
9 years ago
While we're at it, the $timezone
description should be synchronized between get_lastpostdate()
and _get_last_post_time()
, and extra or 'server'.
should be removed from get_lastpostmodified()
.
It would probably make sense to move the extended description from get_lastpostmodified()
to get_lastpostdate()
(since it comes first), and then reference it in get_lastpostmodified()
and _get_last_post_time()
.
Leaving a note here to create a separate ticket or handle this in a separate commit.
Updated key for adding to cache, but haven't put in code for deleting it when it changes yet.