Ticket #17157: 17157.diff
File 17157.diff, 758 bytes (added by , 10 years ago) |
---|
-
wp-includes/post-template.php
684 684 * @return string Link. 685 685 */ 686 686 function _wp_link_page( $i ) { 687 global $post, $wp_rewrite ;687 global $post, $wp_rewrite, $preview; 688 688 689 689 if ( 1 == $i ) { 690 690 $url = get_permalink(); … … 696 696 else 697 697 $url = trailingslashit(get_permalink()) . user_trailingslashit($i, 'single_paged'); 698 698 } 699 700 if( $preview ) 701 $url = add_query_arg( array( 'preview' => 'true', 'preview_id' => $post->ID, 'preview_nonce' => wp_create_nonce( 'post_preview_' . $post->ID ) ), $url ); 699 702 700 703 return '<a href="' . esc_url( $url ) . '">'; 701 704 }