From 8baf0e0737444e82c32c9e33fd1f7673c3fee305 Mon Sep 17 00:00:00 2001 From: Helen Hou-Sandi Date: Tue, 6 Oct 2015 00:58:17 +0000 Subject: [PATCH] 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 --- src/wp-includes/post-template.php | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/wp-includes/post-template.php b/src/wp-includes/post-template.php index f6c8a8c112..8d28bd03aa 100644 --- a/src/wp-includes/post-template.php +++ b/src/wp-includes/post-template.php @@ -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 ); } /**