Make WordPress Core

Ticket #22162: 22162.4.diff

File 22162.4.diff, 578 bytes (added by ryan, 13 years ago)

Wrap the_preview in get_post() to ensure WP_Post

  • wp-includes/query.php

     
    27252725                        }
    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
    27312731                // Put sticky posts at the top of the posts array