WordPress.org

Make WordPress Core


Ignore:
Timestamp:
09/07/2010 01:18:42 AM (9 years ago)
Author:
scribu
Message:

Don't hardcode the pagination base. Fixes #12507

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/link-template.php

    r15563 r15582  
    14121412        }
    14131413
    1414         $request = preg_replace( '|page/\d+/?$|', '', $request);
     1414        $request = preg_replace( "|$wp_rewrite->pagination_base/\d+/?$|", '', $request);
    14151415        $request = preg_replace( '|^index\.php|', '', $request);
    14161416        $request = ltrim($request, '/');
     
    14221422
    14231423        if ( $pagenum > 1 ) {
    1424             $request = ( ( !empty( $request ) ) ? trailingslashit( $request ) : $request ) . user_trailingslashit( 'page/' . $pagenum, 'paged' );
     1424            $request = ( ( !empty( $request ) ) ? trailingslashit( $request ) : $request ) . user_trailingslashit( $wp_rewrite->pagination_base . "/" . $pagenum, 'paged' );
    14251425        }
    14261426
Note: See TracChangeset for help on using the changeset viewer.