get_the_modified_date
Filter HookDescription
Filters the date a post was last modified.Hook Information
File Location |
wp-includes/general-template.php
View on GitHub
|
Hook Type | Filter |
Line Number | 2799 |
Hook Parameters
Type | Name | Description |
---|---|---|
string|int|false
|
$the_time
|
The formatted date or false if no post is found. |
string
|
$format
|
PHP date format. |
WP_Post|null
|
$post
|
WP_Post object or null if no post is found. |
Usage Examples
Basic Usage
<?php
// Hook into get_the_modified_date
add_filter('get_the_modified_date', 'my_custom_filter', 10, 3);
function my_custom_filter($the_time, $format, $post) {
// Your custom filtering logic here
return $the_time;
}
Source Code Context
wp-includes/general-template.php:2799
- How this hook is used in WordPress core
<?php
2794 *
2795 * @param string|int|false $the_time The formatted date or false if no post is found.
2796 * @param string $format PHP date format.
2797 * @param WP_Post|null $post WP_Post object or null if no post is found.
2798 */
2799 return apply_filters( 'get_the_modified_date', $the_time, $format, $post );
2800 }
2801
2802 /**
2803 * Displays the time of the post.
2804 *
PHP Documentation
<?php
/**
* Filters the date a post was last modified.
*
* @since 2.1.0
* @since 4.6.0 Added the `$post` parameter.
*
* @param string|int|false $the_time The formatted date or false if no post is found.
* @param string $format PHP date format.
* @param WP_Post|null $post WP_Post object or null if no post is found.
*/
Quick Info
- Hook Type: Filter
- Parameters: 3
- File: wp-includes/general-template.php
Related Hooks
Related hooks will be displayed here in future updates.