Revisions: Add a `wp_post_revision_title_expanded` filter.

This allows for content to be added to revision lists, such as in the revisions metabox.

fixes #9681.


git-svn-id: https://develop.svn.wordpress.org/trunk@34842 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Helen Hou-Sandi 2015-10-06 00:58:17 +00:00
parent 95fc47be4f
commit 8baf0e0737
1 changed files with 11 additions and 1 deletions

View File

@ -1648,7 +1648,17 @@ function wp_post_revision_title_expanded( $revision, $link = true ) {
elseif ( wp_is_post_autosave( $revision ) )
$revision_date_author = sprintf( $autosavef, $revision_date_author );
return $revision_date_author;
/**
* Filter 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().
*/
return apply_filters( 'wp_post_revision_title_expanded', $revision_date_author, $revision, $link );
}
/**