mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-11 12:20:22 +00:00
Eliminate verbose rewrite rules for ambiguous rewrite structures, resulting in massive performance gains. props andy, otto42, duck_. Nice work everyone! see #16687
git-svn-id: https://develop.svn.wordpress.org/trunk@18541 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -200,6 +200,13 @@ class WP {
|
||||
|
||||
if ( preg_match("#^$match#", $request_match, $matches) ||
|
||||
preg_match("#^$match#", urldecode($request_match), $matches) ) {
|
||||
|
||||
if ( $wp_rewrite->use_verbose_page_rules && preg_match( '/pagename=\$([^&\[]+)\[([0-9]+)\]/', $query, $varmatch ) ) {
|
||||
// this is a verbose page match, lets check to be sure about it
|
||||
if ( ! get_page_by_path( ${$varmatch[1]}[$varmatch[2]] ) )
|
||||
continue;
|
||||
}
|
||||
|
||||
// Got a match.
|
||||
$this->matched_rule = $match;
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user