#44490 closed enhancement (fixed)
get_the_date() should be calling get_post_time()
Reported by: | Rarst | Owned by: | SergeyBiryukov |
---|---|---|---|
Milestone: | 5.1 | Priority: | normal |
Severity: | minor | Version: | 3.0 |
Component: | Date/Time | Keywords: | has-patch has-unit-tests |
Focuses: | Cc: |
Description
Date/Time template tags follow a certain hierarchy with one exception:
the_time()
>get_the_time()
>get_post_time()
>mysql2date()
the_modified_time()
>get_the_modified_time()
>get_post_modified_time()
>mysql2date()
the_date()
>get_the_date()
>mysql2date()
the_modified_date()
>get_the_modified_date()
>get_post_modified_time()
>mysql2date()
There is get_the_date()
> get_post_time()
level missing. Which means that low level get_post_time
filter in it will only affect time branch, but not date branch. This is inconsistent and potentially unexpected.
Will work on a patch to adjust get_the_date()
implementation.
Attachments (2)
Change History (7)
#2
@
7 years ago
- Keywords needs-unit-tests added
- Milestone changed from Awaiting Review to 5.0
A few tests here could be useful, ensuring that the intended filters are fired for all these functions.
Note: See
TracTickets for help on using
tickets.
Changed get_the_date() to call get_post_time() for consistency.