Make WordPress Core

Ticket #43570: 43570.diff

File 43570.diff, 544 bytes (added by graymouser, 7 years ago)

Patch from https://github.com/WordPress/WordPress/pull/353

  • wp-includes/revision.php

    diff --git a/wp-includes/revision.php b/wp-includes/revision.php
    index bc95631fb6e..4aea5f1cb12 100644
    a b function _show_post_preview() { 
    581581                $id = (int) $_GET['preview_id'];
    582582
    583583                if ( false === wp_verify_nonce( $_GET['preview_nonce'], 'post_preview_' . $id ) ) {
    584                         wp_die( __( 'Sorry, you are not allowed to preview drafts.' ) );
     584                        wp_die( __( 'Sorry, you are not allowed to preview drafts.' ), '', 401 );
    585585                }
    586586
    587587                add_filter( 'the_preview', '_set_preview' );