mirror of
git://develop.git.wordpress.org/
synced 2025-02-25 09:03:09 +01:00
Pass along preview query args only if they are already present. Avoids sloppily appending a preview nonce when there should not be one. See #17157.
git-svn-id: https://develop.svn.wordpress.org/trunk@27334 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
85079f08b7
commit
54a8eff27a
@ -719,10 +719,10 @@ function _wp_link_page( $i ) {
|
||||
'preview' => 'true'
|
||||
), $url );
|
||||
|
||||
if ( 'draft' !== $post->post_status ) {
|
||||
if ( ( 'draft' !== $post->post_status ) && isset( $_GET['preview_id'], $_GET['preview_nonce'] ) ) {
|
||||
$url = add_query_arg( array(
|
||||
'preview_id' => $post->ID,
|
||||
'preview_nonce' => wp_create_nonce( 'post_preview_' . $post->ID )
|
||||
'preview_id' => wp_unslash( $_GET['preview_id'] ),
|
||||
'preview_nonce' => wp_unslash( $_GET['preview_nonce'] )
|
||||
), $url );
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user