Changeset 36237 for trunk/src/wp-includes/canonical.php
- Timestamp:
- 01/09/2016 07:32:42 AM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/canonical.php
r36010 r36237 173 173 if ( $redirect_url = get_permalink(get_query_var('page_id')) ) 174 174 $redirect['query'] = remove_query_arg('page_id', $redirect['query']); 175 } elseif ( is_page() && !is_feed() && isset($wp_query->queried_object) && 'page' == get_option('show_on_front') && $wp_query->queried_object->ID== get_option('page_on_front') && ! $redirect_url ) {175 } elseif ( is_page() && !is_feed() && 'page' == get_option('show_on_front') && get_queried_object_id() == get_option('page_on_front') && ! $redirect_url ) { 176 176 $redirect_url = home_url('/'); 177 177 } elseif ( is_home() && !empty($_GET['page_id']) && 'page' == get_option('show_on_front') && get_query_var('page_id') == get_option('page_for_posts') && ! $redirect_url ) { … … 263 263 264 264 // Post Paging 265 if ( is_singular() && ! is_front_page() &&get_query_var('page') ) {265 if ( is_singular() && get_query_var('page') ) { 266 266 if ( !$redirect_url ) 267 267 $redirect_url = get_permalink( get_queried_object_id() ); 268 $redirect_url = trailingslashit( $redirect_url ) . user_trailingslashit( get_query_var( 'page' ), 'single_paged' ); 268 269 $page = get_query_var( 'page' ); 270 if ( $page > 1 ) { 271 if ( is_front_page() ) { 272 $redirect_url = trailingslashit( $redirect_url ) . user_trailingslashit( "$wp_rewrite->pagination_base/$page", 'paged' ); 273 } else { 274 $redirect_url = trailingslashit( $redirect_url ) . user_trailingslashit( $page, 'single_paged' ); 275 } 276 } 269 277 $redirect['query'] = remove_query_arg( 'page', $redirect['query'] ); 270 278 }
Note: See TracChangeset
for help on using the changeset viewer.