Title: get_the_modified_time
Published: April 25, 2014
Last modified: February 24, 2026

---

# apply_filters( ‘get_the_modified_time’, string|int|false $the_time, string $format, WP_Post|null $post )

## In this article

 * [Parameters](https://developer.wordpress.org/reference/hooks/get_the_modified_time/?output_format=md#parameters)
 * [Source](https://developer.wordpress.org/reference/hooks/get_the_modified_time/?output_format=md#source)
 * [Related](https://developer.wordpress.org/reference/hooks/get_the_modified_time/?output_format=md#related)
 * [Changelog](https://developer.wordpress.org/reference/hooks/get_the_modified_time/?output_format=md#changelog)

[ Back to top](https://developer.wordpress.org/reference/hooks/get_the_modified_time/?output_format=md#wp--skip-link--target)

Filters the localized time a post was last modified.

## 󠀁[Parameters](https://developer.wordpress.org/reference/hooks/get_the_modified_time/?output_format=md#parameters)󠁿

 `$the_time`string|int|false

The formatted time or false if no post is found.

`$format`string

Format to use for retrieving the time the post was modified. Accepts `'G'`, `'U'`,
or PHP date format.

`$post`[WP_Post](https://developer.wordpress.org/reference/classes/wp_post/)|null

[WP_Post](https://developer.wordpress.org/reference/classes/wp_post/) object or 
null if no post is found.

## 󠀁[Source](https://developer.wordpress.org/reference/hooks/get_the_modified_time/?output_format=md#source)󠁿

    ```php
    return apply_filters( 'get_the_modified_time', $the_time, $format, $post );
    ```

[View all references](https://developer.wordpress.org/reference/files/wp-includes/general-template.php/)
[View on Trac](https://core.trac.wordpress.org/browser/tags/6.9.4/src/wp-includes/general-template.php#L3051)
[View on GitHub](https://github.com/WordPress/wordpress-develop/blob/6.9.4/src/wp-includes/general-template.php#L3051-L3051)

## 󠀁[Related](https://developer.wordpress.org/reference/hooks/get_the_modified_time/?output_format=md#related)󠁿

| Used by | Description | 
| [get_the_modified_time()](https://developer.wordpress.org/reference/functions/get_the_modified_time/)`wp-includes/general-template.php` |

Retrieves the time at which the post was last modified.

  |

## 󠀁[Changelog](https://developer.wordpress.org/reference/hooks/get_the_modified_time/?output_format=md#changelog)󠁿

| Version | Description | 
| [4.6.0](https://developer.wordpress.org/reference/since/4.6.0/) | Added the `$post` parameter. | 
| [2.0.0](https://developer.wordpress.org/reference/since/2.0.0/) | Introduced. |

## User Contributed Notes

You must [log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Fhooks%2Fget_the_modified_time%2F)
before being able to contribute a note or feedback.