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 )