wp_post_revision_title_expanded
Filter HookDescription
Filters the formatted author and date for a revision.Hook Information
File Location |
wp-includes/post-template.php
View on GitHub
|
Hook Type | Filter |
Line Number | 2007 |
Hook Parameters
Type | Name | Description |
---|---|---|
string
|
$revision_date_author
|
The formatted string. |
WP_Post
|
$revision
|
The revision object. |
bool
|
$link
|
Whether to link to the revisions page, as passed into wp_post_revision_title_expanded(). |
Usage Examples
Basic Usage
<?php
// Hook into wp_post_revision_title_expanded
add_filter('wp_post_revision_title_expanded', 'my_custom_filter', 10, 3);
function my_custom_filter($revision_date_author, $revision, $link) {
// Your custom filtering logic here
return $revision_date_author;
}
Source Code Context
wp-includes/post-template.php:2007
- How this hook is used in WordPress core
<?php
2002 * @param string $revision_date_author The formatted string.
2003 * @param WP_Post $revision The revision object.
2004 * @param bool $link Whether to link to the revisions page, as passed into
2005 * wp_post_revision_title_expanded().
2006 */
2007 return apply_filters( 'wp_post_revision_title_expanded', $revision_date_author, $revision, $link );
2008 }
2009
2010 /**
2011 * Displays a list of a post's revisions.
2012 *
PHP Documentation
<?php
/**
* Filters the formatted author and date for a revision.
*
* @since 4.4.0
*
* @param string $revision_date_author The formatted string.
* @param WP_Post $revision The revision object.
* @param bool $link Whether to link to the revisions page, as passed into
* wp_post_revision_title_expanded().
*/
Quick Info
- Hook Type: Filter
- Parameters: 3
- File: wp-includes/post-template.php
Related Hooks
Related hooks will be displayed here in future updates.