~canonical-sysadmins/wordpress/4.4.2

« back to all changes in this revision

Viewing changes to wp-includes/link-template.php

  • Committer: Barry Price
  • Date: 2016-01-07 06:09:42 UTC
  • mfrom: (1.1.12 upstream)
  • Revision ID: barry.price@canonical.com-20160107060942-1ghv2tqiwm8z0j36
Merge WP4.4.1 from upstream

Show diffs side-by-side

added added

removed removed

Lines of Context:
3502
3502
        $url = get_permalink( $id );
3503
3503
 
3504
3504
        $page = get_query_var( 'page' );
3505
 
        if ( $page ) {
3506
 
                $url = trailingslashit( $url ) . user_trailingslashit( $page, 'single_paged' );
 
3505
        if ( $page >= 2 ) {
 
3506
                if ( '' == get_option( 'permalink_structure' ) ) {
 
3507
                        $url = add_query_arg( 'page', $page, $url );
 
3508
                } else {
 
3509
                        $url = trailingslashit( $url ) . user_trailingslashit( $page, 'single_paged' );
 
3510
                }
3507
3511
        }
3508
3512
 
3509
3513
        $cpage = get_query_var( 'cpage' );