WordPress.org

Make WordPress Core

Changeset 27148


Ignore:
Timestamp:
02/09/2014 09:02:36 PM (6 years ago)
Author:
DrewAPicture
Message:

Improve inline documenation for get_the_time() and `get_post_time().

Props ruud@joyo for the initial patch.
Fixes #26682.

File:
1 edited

Legend:

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

    r27115 r27148  
    15001500 * @since 1.5.0
    15011501 *
    1502  * @param string $d Optional Either 'G', 'U', or php date format defaults to the value specified in the time_format option.
    1503  * @param int|object $post Optional post ID or object. Default is global $post object.
    1504  * @return string
     1502 * @param string      $d    Optional. Format to use for retrieving the time the post
     1503 *                          was written. Either 'G', 'U', or php date format defaults
     1504 *                          to the value specified in the time_format option. Default empty.
     1505 * @param int|WP_Post $post WP_Post object or ID. Default is global $post object.
     1506 * @return string|int Formatted date string, or Unix timestamp.
    15051507 */
    15061508function get_the_time( $d = '', $post = null ) {
     
    15191521 * @since 2.0.0
    15201522 *
    1521  * @param string $d Optional Either 'G', 'U', or php date format.
    1522  * @param bool $gmt Optional, default is false. Whether to return the gmt time.
    1523  * @param int|object $post Optional post ID or object. Default is global $post object.
    1524  * @param bool $translate Whether to translate the time string
    1525  * @return string
    1526  */
    1527 function get_post_time( $d = 'U', $gmt = false, $post = null, $translate = false ) { // returns timestamp
     1523 * @param string      $d         Optional. Format to use for retrieving the time the post
     1524 *                               was written. Either 'G', 'U', or php date format. Default 'U'.
     1525 * @param bool        $gmt       Optional. Whether to retrieve the GMT time. Default false.
     1526 * @param int|WP_Post $post      WP_Post object or ID. Default is global $post object.
     1527 * @param bool        $translate Whether to translate the time string. Default false.
     1528 * @return string|int Formatted date string, or Unix timestamp.
     1529 */
     1530function get_post_time( $d = 'U', $gmt = false, $post = null, $translate = false ) {
    15281531    $post = get_post($post);
    15291532
Note: See TracChangeset for help on using the changeset viewer.