mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-11 12:20:22 +00:00
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:
@@ -340,7 +340,7 @@ class Tests_Post_Revisions extends WP_UnitTestCase {
|
||||
$post = self::factory()->post->create_and_get( array( 'post_title' => 'some-post', 'post_type' => 'post', 'post_content' => 'some_content' ) );
|
||||
|
||||
$post = (array) $post;
|
||||
$post_revision_fields = _wp_post_revision_fields( $post );
|
||||
$post_revision_fields = _wp_post_revision_data( $post );
|
||||
$post_revision_fields = wp_slash( $post_revision_fields );
|
||||
|
||||
$revision_ids = array();
|
||||
@@ -368,7 +368,7 @@ class Tests_Post_Revisions extends WP_UnitTestCase {
|
||||
$post = self::factory()->post->create_and_get( array( 'post_title' => 'some-post', 'post_type' => 'post', 'post_content' => 'some_content' ) );
|
||||
|
||||
$post = (array) $post;
|
||||
$post_revision_fields = _wp_post_revision_fields( $post );
|
||||
$post_revision_fields = _wp_post_revision_data( $post );
|
||||
$post_revision_fields = wp_slash( $post_revision_fields );
|
||||
|
||||
$revision_ids = array();
|
||||
|
||||
Reference in New Issue
Block a user