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
This commit is contained in:
Helen Hou-Sandí 2015-10-06 00:59:27 +00:00
parent 93a5af5753
commit 780926c161
2 changed files with 12 additions and 2 deletions

View File

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

View File

@ -4,7 +4,7 @@
* *
* @global string $wp_version * @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. * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.