Revisions: Clean up _wp_post_revision_fields():

* Move the array processing to a new function, `_wp_post_revision_data()`.
* Make both functions accept a post array or a `WP_Post` object. 
* Always apply the `_wp_post_revision_fields` filter and pass the post data to it.

Fixes #13382.

git-svn-id: https://develop.svn.wordpress.org/trunk@36659 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Sergey Biryukov
2016-02-24 00:43:31 +00:00
parent 50a4dd92ac
commit 45017abf02
5 changed files with 76 additions and 49 deletions
+1 -1
View File
@@ -55,7 +55,7 @@ function wp_get_revision_ui_diff( $post, $compare_from, $compare_to ) {
$return = array();
foreach ( _wp_post_revision_fields() as $field => $name ) {
foreach ( _wp_post_revision_fields( $post ) as $field => $name ) {
/**
* Contextually filter a post revision field.
*