the_modified_date
Filter HookDescription
Filters the date a post was last modified, for display.Hook Information
File Location |
wp-includes/general-template.php
View on GitHub
|
Hook Type | Filter |
Line Number | 2758 |
Hook Parameters
Type | Name | Description |
---|---|---|
string
|
$the_modified_date
|
The last modified date. |
string
|
$format
|
PHP date format. |
string
|
$before
|
HTML output before the date. |
string
|
$after
|
HTML output after the date. |
Usage Examples
Basic Usage
<?php
// Hook into the_modified_date
add_filter('the_modified_date', 'my_custom_filter', 10, 4);
function my_custom_filter($the_modified_date, $format, $before, $after) {
// Your custom filtering logic here
return $the_modified_date;
}
Source Code Context
wp-includes/general-template.php:2758
- How this hook is used in WordPress core
<?php
2753 * @param string $the_modified_date The last modified date.
2754 * @param string $format PHP date format.
2755 * @param string $before HTML output before the date.
2756 * @param string $after HTML output after the date.
2757 */
2758 $the_modified_date = apply_filters( 'the_modified_date', $the_modified_date, $format, $before, $after );
2759
2760 if ( $display ) {
2761 echo $the_modified_date;
2762 } else {
2763 return $the_modified_date;
PHP Documentation
<?php
/**
* Filters the date a post was last modified, for display.
*
* @since 2.1.0
*
* @param string $the_modified_date The last modified date.
* @param string $format PHP date format.
* @param string $before HTML output before the date.
* @param string $after HTML output after the date.
*/
Quick Info
- Hook Type: Filter
- Parameters: 4
- File: wp-includes/general-template.php
Related Hooks
Related hooks will be displayed here in future updates.