WordPress.org

Make WordPress Core

Changeset 6068


Ignore:
Timestamp:
09/10/07 15:06:21 (7 years ago)
Author:
markjaquith
Message:

Strip index.php/ before adding it in get_pagenum_link(). Insert index.php/ for the first page when blog is on a page. fixes #4945

File:
1 edited

Legend:

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

    r6019 r6068  
    492492 
    493493        $request = preg_replace( '|page/(.+)/?$|', '', $request); 
     494        $request = preg_replace( '|^index\.php/|', '', $request); 
    494495 
    495496        $base = trailingslashit( get_bloginfo( 'url' ) ); 
    496497 
    497         if ( $wp_rewrite->using_index_permalinks() && $pagenum > 1 ) { 
     498        if ( $wp_rewrite->using_index_permalinks() && ( $pagenum > 1 || ( 'page' == get_option('show_on_front') && get_option('page_on_front') )) ) { 
    498499            $base .= 'index.php/'; 
    499500        } 
Note: See TracChangeset for help on using the changeset viewer.