WordPress.org

Make WordPress Core

Opened 3 years ago

Last modified 3 months ago

#17455 new enhancement

Add $post_type argument to get_lastpostdate/get_lastpostmodified/_get_last_post_time

Reported by: duck_ Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version:
Component: Posts, Post Types Keywords: has-patch
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 (2)

17455.diff (2.9 KB) - added by duck_ 3 years ago.
17455.2.diff (3.8 KB) - added by duck_ 3 years ago.

Download all attachments as: .zip

Change History (5)

duck_3 years ago

comment:1 duck_3 years ago

Updated key for adding to cache, but haven't put in code for deleting it when it changes yet.

duck_3 years ago

comment:2 duck_3 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.

comment:3 nacin3 months ago

  • Component changed from General to Post Types
Note: See TracTickets for help on using tickets.