Make WordPress Core


Ignore:
Timestamp:
10/16/2012 01:48:07 PM (13 years ago)
Author:
ryan
Message:

Pass the result of the the_preview filter through get_post() to ensure the post is filtered and of type WP_Post. fixes #22162

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/query.php

    r22238 r22244  
    27262726
    27272727            if ( $this->is_preview && $this->posts && current_user_can( $edit_cap, $this->posts[0]->ID ) )
    2728                 $this->posts[0] = apply_filters_ref_array('the_preview', array( $this->posts[0], &$this ));
     2728                $this->posts[0] = get_post( apply_filters_ref_array( 'the_preview', array( $this->posts[0], &$this ) ) );
    27292729        }
    27302730
Note: See TracChangeset for help on using the changeset viewer.