Opened 3 years ago
Last modified 8 months ago
#13771 new enhancement
get_the_date() to accept optional $post argument
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | Future Release |
| Component: | General | Version: | 3.0 |
| Severity: | normal | Keywords: | has-patch |
| Cc: | matt@…, devin@…, b.kooij@… |
Description
Currently the get_the_date() function only utilizes the global $post. Allowing this function to accept an optional $post object as an argument would be beneficial for getting the formatted date of any post.
Attachments (2)
Change History (8)
- Milestone changed from 3.0 to 3.1
We typically call get_post() and let it figure out whether to use the global.
No more enhancements for 3.0. Moving to 3.1.
- Cc matt@… added
Thanks Ryan. I agree, I was just trying to trim the extra function calls; but after review it may not be worth the investment in time to set a precedent of allowing an optional $post arg in template tags, though I'll let you guys decide ;)
- Keywords needs-patch added; date removed
- Milestone changed from Awaiting Triage to Future Release
solarissmoke — 2 years ago
comment:4
solarissmoke — 2 years ago
- Keywords has-patch added; needs-patch removed
Also cleaned up the code/docs a bit.
comment:5
devinreams — 19 months ago
- Cc devin@… added
Note: See
TracTickets for help on using
tickets.

Patch for get_the_date() to accept optional $post arg.