[wp-trac] [WordPress Trac] #26682: get_the_time and get_post_time both say to only return a string when in fact they can also return an int.

WordPress Trac noreply at wordpress.org
Thu Dec 19 11:38:10 UTC 2013


#26682: get_the_time and get_post_time both say to only return a string when in
fact they can also return an int.
-------------------------+-----------------------------
 Reporter:  ruud@…       |      Owner:
     Type:  enhancement  |     Status:  new
 Priority:  normal       |  Milestone:  Awaiting Review
Component:  Inline Docs  |    Version:  3.8
 Severity:  normal       |   Keywords:
-------------------------+-----------------------------
 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.

--
Ticket URL: <http://core.trac.wordpress.org/ticket/26682>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list