WordPress.org

Make WordPress Core


Ignore:
Timestamp:
01/15/2019 02:07:41 AM (11 months ago)
Author:
desrosj
Message:

Docs: Update inaccurate return descriptions.

In the @return tag description for get_post_modified_time(), get_the_time(), and get_post_time(), the $d parameter is incorrectly referred to as $id.

Props behzod.
Fixes #45323.

File:
1 edited

Legend:

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

    r44566 r44592  
    24272427 *                          to the value specified in the time_format option. Default empty.
    24282428 * @param int|WP_Post $post WP_Post object or ID. Default is global $post object.
    2429  * @return string|int|false Formatted date string or Unix timestamp if `$id` is 'U' or 'G'. False on failure.
     2429 * @return string|int|false Formatted date string or Unix timestamp if `$d` is 'U' or 'G'. False on failure.
    24302430 */
    24312431function get_the_time( $d = '', $post = null ) {
     
    24662466 * @param int|WP_Post $post      WP_Post object or ID. Default is global $post object.
    24672467 * @param bool        $translate Whether to translate the time string. Default false.
    2468  * @return string|int|false Formatted date string or Unix timestamp if `$id` is 'U' or 'G'. False on failure.
     2468 * @return string|int|false Formatted date string or Unix timestamp if `$d` is 'U' or 'G'. False on failure.
    24692469 */
    24702470function get_post_time( $d = 'U', $gmt = false, $post = null, $translate = false ) {
     
    25662566 * @param int|WP_Post $post      WP_Post object or ID. Default is global $post object.
    25672567 * @param bool        $translate Whether to translate the time string. Default false.
    2568  * @return string|int|false Formatted date string or Unix timestamp if `$id` is 'U' or 'G'. False on failure.
     2568 * @return string|int|false Formatted date string or Unix timestamp if `$d` is 'U' or 'G'. False on failure.
    25692569 */
    25702570function get_post_modified_time( $d = 'U', $gmt = false, $post = null, $translate = false ) {
Note: See TracChangeset for help on using the changeset viewer.