From cb3c7997c7f9e8962e7b048ce8db91df789044e7 Mon Sep 17 00:00:00 2001 From: Drew Jaynes Date: Sun, 9 Feb 2014 21:03:13 +0000 Subject: [PATCH] Improve inline documenation for `get_the_time()` and `get_post_time(). Props ruud@joyo for the initial patch. Fixes #26682. Built from https://develop.svn.wordpress.org/trunk@27148 git-svn-id: http://core.svn.wordpress.org/trunk@27015 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/general-template.php | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/wp-includes/general-template.php b/wp-includes/general-template.php index ab4ad61c25..5eb3e3dc3a 100644 --- a/wp-includes/general-template.php +++ b/wp-includes/general-template.php @@ -1499,9 +1499,11 @@ function the_time( $d = '' ) { * * @since 1.5.0 * - * @param string $d Optional Either 'G', 'U', or php date format defaults to the value specified in the time_format option. - * @param int|object $post Optional post ID or object. Default is global $post object. - * @return string + * @param string $d Optional. Format to use for retrieving the time the post + * was written. Either 'G', 'U', or php date format defaults + * to the value specified in the time_format option. Default empty. + * @param int|WP_Post $post WP_Post object or ID. Default is global $post object. + * @return string|int Formatted date string, or Unix timestamp. */ function get_the_time( $d = '', $post = null ) { $post = get_post($post); @@ -1518,13 +1520,14 @@ function get_the_time( $d = '', $post = null ) { * * @since 2.0.0 * - * @param string $d Optional Either 'G', 'U', or php date format. - * @param bool $gmt Optional, default is false. Whether to return the gmt time. - * @param int|object $post Optional post ID or object. Default is global $post object. - * @param bool $translate Whether to translate the time string - * @return string + * @param string $d Optional. Format to use for retrieving the time the post + * was written. Either 'G', 'U', or php date format. Default 'U'. + * @param bool $gmt Optional. Whether to retrieve the GMT time. Default false. + * @param int|WP_Post $post WP_Post object or ID. Default is global $post object. + * @param bool $translate Whether to translate the time string. Default false. + * @return string|int Formatted date string, or Unix timestamp. */ -function get_post_time( $d = 'U', $gmt = false, $post = null, $translate = false ) { // returns timestamp +function get_post_time( $d = 'U', $gmt = false, $post = null, $translate = false ) { $post = get_post($post); if ( $gmt )