[wp-trac] [WordPress Trac] #4575: Add functions to return the last-modified timestamp of a category/tag
WordPress Trac
noreply at wordpress.org
Wed Sep 20 20:57:05 UTC 2017
#4575: Add functions to return the last-modified timestamp of a category/tag
-------------------------------------------------+-------------------------
Reporter: delusions | Owner:
Type: enhancement | stevenkword
Priority: normal | Status: assigned
Component: Feeds | Milestone: 4.9
Severity: normal | Version: 2.2.1
Keywords: has-patch needs-testing needs-unit- | Resolution:
tests | Focuses: template
-------------------------------------------------+-------------------------
Comment (by spacedmonkey):
In [https://core.trac.wordpress.org/attachment/ticket/4575/4575.2.diff
4575.2.diff] it is tidying and refactoring. Key points
- Remove while in tests and replaced with for loop as this is cleaner.
- General WordPress coding style fixes.
- Added ticket docs on `test_get_last_build_date` test
- Return early on `get_last_build_date` if no posts.
- Fixed docs and changed version number on `get_last_build_date`
- Only have two return points in `get_last_build_date`
The only thing I noticed is that `get_lastpostmodified` has two filters in
it `pre_get_lastpostmodified` and `get_lastpostmodified` will no longer
fire. If developers using these filters to change the values in the feed,
they stop working. This is small breaking change, but I personally don't
have a problem with this. I would add a filter to the return at the of
function, so developers can change the value if they want to.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/4575#comment:61>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list