[wp-trac] [WordPress Trac] #44490: get_the_date() should be calling get_post_time()

WordPress Trac noreply at wordpress.org
Mon Jul 2 16:57:55 UTC 2018


#44490: get_the_date() should be calling get_post_time()
-------------------------+-----------------------------
 Reporter:  Rarst        |      Owner:  (none)
     Type:  enhancement  |     Status:  new
 Priority:  normal       |  Milestone:  Awaiting Review
Component:  Date/Time    |    Version:  3.0
 Severity:  minor        |   Keywords:
  Focuses:               |
-------------------------+-----------------------------
 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.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/44490>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list