IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
|
|
|
214 | 214 | if ( is_singular() && ! is_front_page() && get_query_var('page') ) { |
215 | 215 | if ( !$redirect_url ) |
216 | 216 | $redirect_url = get_permalink( get_queried_object_id() ); |
217 | | $redirect_url = trailingslashit( $redirect_url ) . user_trailingslashit( get_query_var( 'page' ), 'single_paged' ); |
| 217 | |
| 218 | $post = get_post( get_queried_object_id() ); |
| 219 | $pagination = wp_parse_post_content( $post ); |
| 220 | if ( get_query_var( 'page' ) <= $pagination['numpages'] ) { |
| 221 | $redirect_url = trailingslashit( $redirect_url ) . user_trailingslashit( get_query_var( 'page' ), 'single_paged' ); |
| 222 | } else { |
| 223 | $redirect_url = trailingslashit( $redirect_url ); |
| 224 | } |
218 | 225 | $redirect['query'] = remove_query_arg( 'page', $redirect['query'] ); |
219 | 226 | } |
220 | 227 | |