Opened 13 years ago
Closed 13 years ago
#26682 closed defect (bug) (fixed)
Improve phpdocs for get_the_time and get_post_time
| Reported by: | Owned by: | DrewAPicture | |
|---|---|---|---|
| Priority: | normal | Milestone: | 3.9 |
| Component: | Posts, Post Types | Version: | |
| Severity: | normal | Keywords: | has-patch commit |
| Cc: | Focuses: | docs, template |
Description
get_the_time utilizes get_the_post, get_the_post uses mysql2date, mysql2date can return a string or an int in the specific case that an Unix timestamp is requested.
( * @return string|int Formatted date string, or Unix timestamp. )
In the added patch I've changed the inline documentation to better reflect that possibility.
Of course via the filters they can return also other types.., but I don't know how that is supposed to be handled with the inline docs.
Attachments (2)
Change History (10)
#4
@
13 years ago
- Keywords commit added
- Milestone Awaiting Review → 3.9
- Summary get_the_time and get_post_time both say to only return a string when in fact they can also return an int. → Improve phpdocs for get_the_time and get_post_time
26682.diff also fixes some other issues with the phpdocs for these two functions. Might as well fix them while we're in there :)
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
get_the_time, get_post_time inline docs patch