diff --git a/src/wp-includes/revision.php b/src/wp-includes/revision.php
index b4ecf0c863..ca869a94ce 100644
|
a
|
b
|
function _show_post_preview() {
|
| 741 | 741 | $id = (int) $_GET['preview_id']; |
| 742 | 742 | |
| 743 | 743 | if ( false === wp_verify_nonce( $_GET['preview_nonce'], 'post_preview_' . $id ) ) { |
| 744 | | wp_die( __( 'Sorry, you are not allowed to preview drafts.' ), 403 ); |
| | 744 | wp_die( esc_html__( 'Sorry, you are not allowed to preview drafts.' ), 403 ); |
| 745 | 745 | } |
| 746 | 746 | |
| 747 | 747 | add_filter( 'the_preview', '_set_preview' ); |
| … |
… |
function _wp_preview_terms_filter( $terms, $post_id, $taxonomy ) {
|
| 766 | 766 | return $terms; |
| 767 | 767 | } |
| 768 | 768 | |
| 769 | | if ( empty( $_REQUEST['post_format'] ) || $post->ID != $post_id |
| | 769 | if ( empty( $_REQUEST['post_format'] ) || $post->ID !== $post_id |
| 770 | 770 | || 'post_format' !== $taxonomy || 'revision' === $post->post_type |
| 771 | 771 | ) { |
| 772 | 772 | return $terms; |
| … |
… |
function _wp_preview_post_thumbnail_filter( $value, $post_id, $meta_key ) {
|
| 804 | 804 | |
| 805 | 805 | if ( empty( $_REQUEST['_thumbnail_id'] ) || |
| 806 | 806 | empty( $_REQUEST['preview_id'] ) || |
| 807 | | $post->ID != $post_id || |
| | 807 | $post->ID !== $post_id || |
| 808 | 808 | '_thumbnail_id' !== $meta_key || |
| 809 | 809 | 'revision' === $post->post_type || |
| 810 | | $post_id != $_REQUEST['preview_id'] ) { |
| | 810 | $post_id !== $_REQUEST['preview_id'] ) { |
| 811 | 811 | |
| 812 | 812 | return $value; |
| 813 | 813 | } |