Ticket #23229: 23229-r23303.diff
| File 23229-r23303.diff, 4.5 KB (added by , 14 years ago) |
|---|
-
wp-includes/post.php
3118 3118 $check_sql = "SELECT post_name FROM $wpdb->posts WHERE post_name = %s AND post_type IN ( '" . implode( "', '", esc_sql( $hierarchical_post_types ) ) . "' ) AND ID != %d AND post_parent = %d LIMIT 1"; 3119 3119 $post_name_check = $wpdb->get_var( $wpdb->prepare( $check_sql, $slug, $post_ID, $post_parent ) ); 3120 3120 3121 if ( $post_name_check || in_array( $slug, $feeds ) || preg_match( "@^ ($wp_rewrite->pagination_base)?\d+$@", $slug ) || apply_filters( 'wp_unique_post_slug_is_bad_hierarchical_slug', false, $slug, $post_type, $post_parent ) ) {3121 if ( $post_name_check || in_array( $slug, $feeds ) || preg_match( "@^/$wp_rewrite->pagination_base/\d+$@", $slug ) || apply_filters( 'wp_unique_post_slug_is_bad_hierarchical_slug', false, $slug, $post_type, $post_parent ) ) { 3122 3122 $suffix = 2; 3123 3123 do { 3124 3124 $alt_post_name = substr( $slug, 0, 200 - ( strlen( $suffix ) + 1 ) ) . "-$suffix"; -
wp-includes/link-template.php
1448 1448 $query_string = ''; 1449 1449 } 1450 1450 1451 $request = preg_replace( "| $wp_rewrite->pagination_base/\d+/?$|", '', $request);1451 $request = preg_replace( "|/$wp_rewrite->pagination_base/\d+/?$|", '', $request); 1452 1452 $request = preg_replace( '|^index\.php|i', '', $request); 1453 1453 $request = ltrim($request, '/'); 1454 1454 … … 1464 1464 $result = $base . $request . $query_string; 1465 1465 } 1466 1466 1467 $result = apply_filters('get_pagenum_link', $result );1467 $result = apply_filters('get_pagenum_link', $result, $pagenum); 1468 1468 1469 1469 if ( $escape ) 1470 1470 return esc_url( $result ); -
wp-includes/rewrite.php
1232 1232 1233 1233 //$feedregex is identical but with /feed/ added on as well, so URLs like <permalink>/feed/atom 1234 1234 //and <permalink>/atom are both possible 1235 $feedregex = $this->feed_base . '/' . $feedregex2;1235 $feedregex = '/'.$this->feed_base . '/' . $feedregex2; 1236 1236 1237 1237 //build a regex to match the trackback and page/xx parts of URLs 1238 $trackbackregex = ' trackback/?$';1239 $pageregex = $this->pagination_base . '/?([0-9]{1,})/?$';1240 $commentregex = ' comment-page-([0-9]{1,})/?$';1238 $trackbackregex = '/trackback/?$'; 1239 $pageregex = '/'.$this->pagination_base . '/?([0-9]{1,})/?$'; 1240 $commentregex = '/comment-page-([0-9]{1,})/?$'; 1241 1241 1242 1242 //build up an array of endpoint regexes to append => queries to append 1243 1243 if ( $endpoints ) { … … 1297 1297 $struct = ltrim($struct, '/'); 1298 1298 1299 1299 //replace tags with regexes 1300 $match = str_replace($this->rewritecode, $this->rewritereplace, $struct);1300 $match = untrailingslashit(str_replace($this->rewritecode, $this->rewritereplace, $struct)); 1301 1301 1302 1302 //make a list of tags, and store how many there are in $num_toks 1303 1303 $num_toks = preg_match_all('/%.+?%/', $struct, $toks); -
wp-includes/canonical.php
220 220 221 221 // paging and feeds 222 222 if ( get_query_var('paged') || is_feed() || get_query_var('cpage') ) { 223 while ( preg_match( "#/$wp_rewrite->pagination_base/ ?[0-9]+?(/+)?$#", $redirect['path'] ) || preg_match( '#/(comments/?)?(feed|rss|rdf|atom|rss2)(/+)?$#', $redirect['path'] ) || preg_match( '#/comment-page-[0-9]+(/+)?$#', $redirect['path'] ) ) {223 while ( preg_match( "#/$wp_rewrite->pagination_base/[0-9]+?(/+)?$#", $redirect['path'] ) || preg_match( '#/(comments/?)?(feed|rss|rdf|atom|rss2)(/+)?$#', $redirect['path'] ) || preg_match( '#/comment-page-[0-9]+(/+)?$#', $redirect['path'] ) ) { 224 224 // Strip off paging and feed 225 $redirect['path'] = preg_replace("#/$wp_rewrite->pagination_base/ ?[0-9]+?(/+)?$#", '/', $redirect['path']); // strip off any existing paging225 $redirect['path'] = preg_replace("#/$wp_rewrite->pagination_base/[0-9]+?(/+)?$#", '/', $redirect['path']); // strip off any existing paging 226 226 $redirect['path'] = preg_replace('#/(comments/?)?(feed|rss2?|rdf|atom)(/+|$)#', '/', $redirect['path']); // strip off feed endings 227 227 $redirect['path'] = preg_replace('#/comment-page-[0-9]+?(/+)?$#', '/', $redirect['path']); // strip off any existing comment paging 228 228 }
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)