From eaff87706b3ab9eb750d38db8d403e4de94ead1f Mon Sep 17 00:00:00 2001 From: Drew Jaynes Date: Sun, 9 Feb 2014 21:02:36 +0000 Subject: [PATCH] Improve inline documenation for `get_the_time()` and `get_post_time(). Props ruud@joyo for the initial patch. Fixes #26682. git-svn-id: https://develop.svn.wordpress.org/trunk@27148 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/general-template.php | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/src/wp-includes/general-template.php b/src/wp-includes/general-template.php index ab4ad61c25..5eb3e3dc3a 100644 --- a/src/wp-includes/general-template.php +++ b/src/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 )