[wp-trac] [WordPress Trac] #34093: New filter: `get_calendar_post_type` in get_calendar()
WordPress Trac
noreply at wordpress.org
Wed Mar 5 22:36:54 UTC 2025
#34093: New filter: `get_calendar_post_type` in get_calendar()
--------------------------------------+-----------------------
Reporter: sebastian.pisula | Owner: audrasjb
Type: task (blessed) | Status: closed
Priority: normal | Milestone: 6.8
Component: Widgets | Version:
Severity: normal | Resolution: fixed
Keywords: has-patch has-unit-tests | Focuses:
--------------------------------------+-----------------------
Changes (by peterwilsoncc):
* status: reopened => closed
* resolution: => fixed
Comment:
In [changeset:"59939" 59939]:
{{{
#!CommitTicketReference repository="" revision="59939"
Widgets: Improve caching within `get_calendar()`.
Improves caching of the `get_calendar()` function by:
* fixing incorrect cache collisions for different `initial` `post_type`
and week values, and,
* ensuring parameter equivalents generate the same cache key, ie passing
the same values in a different order.
Improves tests for the function by:
* navigating to February 2025 in test set up to ensure the correct
calendar month is displayed,
* adding messages for tests with multiple assertions,
* improving the tests for the calendar captions by wrapping the expected
value in the HTML tag,
* adding dedicated test for the different `initial` parameter,
* ensuring caches do not collide for different parameters, and,
* ensuring caches do collide for equivalent parameters.
Follow up to r4522, r59908, r59909, r59917 (reverted), r59918 (reverted),
r59930.
Props peterwilsoncc, jorbin, audrasjb.
Fixes #34093.
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/34093#comment:28>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list