Changeset 28874
- Timestamp:
- 06/28/2014 02:12:19 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/canonical.php
r28712 r28874 40 40 global $wp_rewrite, $is_IIS, $wp_query, $wpdb; 41 41 42 // If we're not in wp-admin and the post has been published and preview nonce 43 // is non-existant or invalid then no need for preview in query 44 if ( is_preview() && get_query_var( 'p' ) && 'publish' == get_post_status( get_query_var( 'p' ) ) ) { 45 if ( ! isset( $_GET['preview_id'] ) 46 || ! isset( $_GET['preview_nonce'] ) 47 || ! wp_verify_nonce( $_GET['preview_nonce'], 'post_preview_' . (int) $_GET['preview_id'] ) ) { 48 $wp_query->is_preview = false; 49 } 50 } 51 42 52 if ( is_trackback() || is_search() || is_comments_popup() || is_admin() || !empty($_POST) || is_preview() || is_robots() || ( $is_IIS && !iis7_supports_permalinks() ) ) 43 53 return; … … 68 78 if ( !isset($redirect['query']) ) 69 79 $redirect['query'] = ''; 80 81 // If its not a preview then remove it from URL 82 if ( ! is_preview() ) { 83 $redirect['query'] = remove_query_arg( 'preview', $redirect['query'] ); 84 } 70 85 71 86 if ( is_feed() && ( $id = get_query_var( 'p' ) ) ) {
Note: See TracChangeset
for help on using the changeset viewer.