Changeset 23305
- Timestamp:
- 01/18/2013 01:44:22 PM (12 years ago)
- Location:
- trunk
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/options-permalink.php
r22931 r23305 228 228 $suffix = ''; 229 229 if ( ! $is_apache && ! $iis7_permalinks ) 230 $suffix = 'index.php/';230 $suffix = $wp_rewrite->index . '/'; 231 231 ?> 232 232 <p><?php -
trunk/wp-includes/canonical.php
r21813 r23305 273 273 } 274 274 275 $redirect['path'] = user_trailingslashit( preg_replace('|/ index.php/?$|', '/', $redirect['path']) ); // strip off trailing /index.php/276 if ( !empty( $addl_path ) && $wp_rewrite->using_index_permalinks() && strpos($redirect['path'], '/ index.php/') === false )277 $redirect['path'] = trailingslashit($redirect['path']) . 'index.php/';275 $redirect['path'] = user_trailingslashit( preg_replace('|/' . preg_quote( $wp_rewrite->index, '|' ) . '/?$|', '/', $redirect['path']) ); // strip off trailing /index.php/ 276 if ( !empty( $addl_path ) && $wp_rewrite->using_index_permalinks() && strpos($redirect['path'], '/' . $wp_rewrite->index . '/') === false ) 277 $redirect['path'] = trailingslashit($redirect['path']) . $wp_rewrite->index . '/'; 278 278 if ( !empty( $addl_path ) ) 279 279 $redirect['path'] = trailingslashit($redirect['path']) . $addl_path; … … 325 325 326 326 // trailing /index.php 327 $redirect['path'] = preg_replace('|/ index.php/*?$|', '/', $redirect['path']);327 $redirect['path'] = preg_replace('|/' . preg_quote( $wp_rewrite->index, '|' ) . '/*?$|', '/', $redirect['path']); 328 328 329 329 // Remove trailing spaces from the path … … 346 346 // strip /index.php/ when we're not using PATHINFO permalinks 347 347 if ( !$wp_rewrite->using_index_permalinks() ) 348 $redirect['path'] = str_replace( '/index.php/', '/', $redirect['path']);348 $redirect['path'] = str_replace( '/' . $wp_rewrite->index . '/', '/', $redirect['path'] ); 349 349 350 350 // trailing slashes -
trunk/wp-includes/link-template.php
r22564 r23305 1450 1450 1451 1451 $request = preg_replace( "|$wp_rewrite->pagination_base/\d+/?$|", '', $request); 1452 $request = preg_replace( '|^ index\.php|i', '', $request);1452 $request = preg_replace( '|^' . preg_quote( $wp_rewrite->index, '|' ) . '|i', '', $request); 1453 1453 $request = ltrim($request, '/'); 1454 1454 … … 1456 1456 1457 1457 if ( $wp_rewrite->using_index_permalinks() && ( $pagenum > 1 || '' != $request ) ) 1458 $base .= 'index.php/';1458 $base .= $wp_rewrite->index . '/'; 1459 1459 1460 1460 if ( $pagenum > 1 ) { -
trunk/wp-includes/nav-menu-template.php
r22302 r23305 368 368 $raw_item_url = strpos( $menu_item->url, '#' ) ? substr( $menu_item->url, 0, strpos( $menu_item->url, '#' ) ) : $menu_item->url; 369 369 $item_url = untrailingslashit( $raw_item_url ); 370 $_indexless_current = untrailingslashit( preg_replace( '/ index.php$/', '', $current_url ) );370 $_indexless_current = untrailingslashit( preg_replace( '/' . preg_quote( $wp_rewrite->index, '/' ) . '$/', '', $current_url ) ); 371 371 372 372 if ( $raw_item_url && in_array( $item_url, array( $current_url, $_indexless_current, $_root_relative_current ) ) ) { -
trunk/wp-includes/rewrite.php
r22441 r23305 316 316 // Strip 'index.php/' if we're not using path info permalinks 317 317 if ( !$wp_rewrite->using_index_permalinks() ) 318 $url = str_replace( 'index.php/', '', $url);318 $url = str_replace( $wp_rewrite->index . '/', '', $url ); 319 319 320 320 if ( false !== strpos($url, home_url()) ) {
Note: See TracChangeset
for help on using the changeset viewer.