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
This commit is contained in:
parent
aa8b462a95
commit
cb3c7997c7
|
@ -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 )
|
||||
|
|
Loading…
Reference in New Issue