From 780926c1616967eb25a791030c67f567a46e2cb4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Helen=20Hou-Sand=C3=AD?= Date: Tue, 6 Oct 2015 00:59:27 +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. Built from https://develop.svn.wordpress.org/trunk@34842 git-svn-id: http://core.svn.wordpress.org/trunk@34807 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/post-template.php | 12 +++++++++++- wp-includes/version.php | 2 +- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/wp-includes/post-template.php b/wp-includes/post-template.php index f6c8a8c112..8d28bd03aa 100644 --- a/wp-includes/post-template.php +++ b/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 ); } /** diff --git a/wp-includes/version.php b/wp-includes/version.php index 6df161591a..f6ff7036c3 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.4-alpha-34841'; +$wp_version = '4.4-alpha-34842'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.