get_post_modified_time

SummerySummery

Retrieve the time at which the post was last modified.

Syntax

get_post_modified_time( string $format = 'U', bool $gmt = false, int|WP_Post $post = null, bool $translate = false )

ParametersParameters

$format

(string) (Optional) Format to use for retrieving the time the post was modified. Either 'G', 'U', or PHP date format.

Default value: 'U'

$gmt

(bool) (Optional) Whether to retrieve the GMT time.

Default value: false

$post

(int|WP_Post) (Optional) WP_Post object or ID. Default is global $post object.

Default value: null

$translate

(bool) (Optional) Whether to translate the time string.

Default value: false

ReturnReturn

(string|int|false) Formatted date string or Unix timestamp if $format is 'U' or 'G'. False on failure.

SourceSource

File: wp-includes/general-template.php


			

ChangelogChangelog

Changelog
Version Description
2.0.0 Introduced.
Scroll to Top