get_post_time


get_post_time ( $d = 'U', $gmt = false, $post = null, $translate = false )

Parameters:
  • (string) $d Optional. Format to use for retrieving the time the post was written. Either 'G', 'U', or php date format. Default 'U'.
  • (bool) $gmt Optional. Whether to retrieve the GMT time. Default false.
  • (int|WP_Post) $post WP_Post object or ID. Default is global $post object.
  • (bool) $translate Whether to translate the time string. Default false.
Returns:
  • (string|int|false) Formatted date string or Unix timestamp if `$id` is 'U' or 'G'. False on failure.
Defined at:

Description

Retrieve the time at which the post was written.

Related Functions

get_post_meta, get_post_type, get_post_stati, _get_last_post_time, get_post_field

Top Google Results

User discussions

wpseek mobile