diff --git a/src/wp-includes/revision.php b/src/wp-includes/revision.php
index 0f76f908f1..e490a05622 100644
|
a
|
b
|
function _show_post_preview() {
|
| 726 | 726 | $id = (int) $_GET['preview_id']; |
| 727 | 727 | |
| 728 | 728 | if ( false === wp_verify_nonce( $_GET['preview_nonce'], 'post_preview_' . $id ) ) { |
| 729 | | wp_die( __( 'Sorry, you are not allowed to preview drafts.' ), 403 ); |
| | 729 | wp_die( esc_html_e( 'Sorry, you are not allowed to preview drafts.' ), 403 ); |
| 730 | 730 | } |
| 731 | 731 | |
| 732 | 732 | add_filter( 'the_preview', '_set_preview' ); |
| … |
… |
function _wp_preview_terms_filter( $terms, $post_id, $taxonomy ) {
|
| 751 | 751 | return $terms; |
| 752 | 752 | } |
| 753 | 753 | |
| 754 | | if ( empty( $_REQUEST['post_format'] ) || $post->ID != $post_id |
| | 754 | if ( empty( $_REQUEST['post_format'] ) || $post->ID !== $post_id |
| 755 | 755 | || 'post_format' !== $taxonomy || 'revision' === $post->post_type |
| 756 | 756 | ) { |
| 757 | 757 | return $terms; |
| … |
… |
function _wp_preview_post_thumbnail_filter( $value, $post_id, $meta_key ) {
|
| 789 | 789 | |
| 790 | 790 | if ( empty( $_REQUEST['_thumbnail_id'] ) || |
| 791 | 791 | empty( $_REQUEST['preview_id'] ) || |
| 792 | | $post->ID != $post_id || |
| | 792 | $post->ID !== $post_id || |
| 793 | 793 | '_thumbnail_id' !== $meta_key || |
| 794 | 794 | 'revision' === $post->post_type || |
| 795 | | $post_id != $_REQUEST['preview_id'] ) { |
| | 795 | $post_id !== $_REQUEST['preview_id'] ) { |
| 796 | 796 | |
| 797 | 797 | return $value; |
| 798 | 798 | } |