WordPress.org

Make WordPress Core

Changeset 37265


Ignore:
Timestamp:
04/20/2016 03:54:20 PM (4 years ago)
Author:
DrewAPicture
Message:

Docs: Clarify the return descriptions for get_the_time(), get_post_time(), and get_post_modified_time() to specify when an integer in the form of a Unix timestamp should be expected.

See [30674]. See #30989.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/general-template.php

    r37135 r37265  
    23042304 *                          to the value specified in the time_format option. Default empty.
    23052305 * @param int|WP_Post $post WP_Post object or ID. Default is global $post object.
    2306  * @return false|string Formatted date string or Unix timestamp. False on failure.
     2306 * @return string|int|false Formatted date string or Unix timestamp if `$id` is 'U' or 'G'. False on failure.
    23072307 */
    23082308function get_the_time( $d = '', $post = null ) {
     
    23422342 * @param int|WP_Post $post      WP_Post object or ID. Default is global $post object.
    23432343 * @param bool        $translate Whether to translate the time string. Default false.
    2344  * @return false|string|int Formatted date string or Unix timestamp. False on failure.
     2344 * @return string|int|false Formatted date string or Unix timestamp if `$id` is 'U' or 'G'. False on failure.
    23452345 */
    23462346function get_post_time( $d = 'U', $gmt = false, $post = null, $translate = false ) {
     
    24292429 * @param int|WP_Post $post      WP_Post object or ID. Default is global $post object.
    24302430 * @param bool        $translate Whether to translate the time string. Default false.
    2431  * @return false|string Formatted date string or Unix timestamp. False on failure.
     2431 * @return string|int|false Formatted date string or Unix timestamp if `$id` is 'U' or 'G'. False on failure.
    24322432 */
    24332433function get_post_modified_time( $d = 'U', $gmt = false, $post = null, $translate = false ) {
Note: See TracChangeset for help on using the changeset viewer.