Enable previews for all pages of multi-page posts. Fixes #17157. Props solarissmoke, chrisscott
git-svn-id: https://develop.svn.wordpress.org/trunk@27333 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
fdfbca6ca6
commit
85079f08b7
@ -714,6 +714,19 @@ function _wp_link_page( $i ) {
|
||||
$url = trailingslashit(get_permalink()) . user_trailingslashit($i, 'single_paged');
|
||||
}
|
||||
|
||||
if ( is_preview() ) {
|
||||
$url = add_query_arg( array(
|
||||
'preview' => 'true'
|
||||
), $url );
|
||||
|
||||
if ( 'draft' !== $post->post_status ) {
|
||||
$url = add_query_arg( array(
|
||||
'preview_id' => $post->ID,
|
||||
'preview_nonce' => wp_create_nonce( 'post_preview_' . $post->ID )
|
||||
), $url );
|
||||
}
|
||||
}
|
||||
|
||||
return '<a href="' . esc_url( $url ) . '">';
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user