get_the_modified_time

SummerySummery

Retrieve the time at which the post was last modified.

Syntax

get_the_modified_time( string $format = '', int|WP_Post $post = null )

ParametersParameters

$format

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

Default value: ''

$post

(int|WP_Post) (Optional) Post ID or WP_Post object. Default current post.

Default value: null

ReturnReturn

(string|false) Formatted date string or Unix timestamp. False on failure.

SourceSource

File: wp-includes/general-template.php


			

ChangelogChangelog

Changelog
Version Description
4.6.0 Added the $post parameter.
2.0.0 Introduced.
Scroll to Top