Ticket #3964: fix_ep_root_rewrite.diff
| File fix_ep_root_rewrite.diff, 1.2 KB (added by westi, 6 years ago) |
|---|
-
wp-includes/rewrite.php
582 582 if ($paged) //...and /page/xx ones 583 583 $rewrite = array_merge($rewrite, array($pagematch => $pagequery)); 584 584 585 //do endpoints 586 if ($endpoints) { 587 foreach ($ep_query_append as $regex => $ep) { 588 //add the endpoints on if the mask fits 589 if ($ep[0] & $ep_mask || $ep[0] & $ep_mask_specific) { 590 $rewrite[$match . $regex] = $index . '?' . $query . $ep[1] . $this->preg_index($num_toks + 2); 591 } 592 } 593 } 594 585 595 //if we've got some tags in this dir 586 596 if ($num_toks) { 587 597 $post = false; … … 599 609 $page = true; 600 610 } 601 611 602 //do endpoints603 if ($endpoints) {604 foreach ($ep_query_append as $regex => $ep) {605 //add the endpoints on if the mask fits606 if ($ep[0] & $ep_mask || $ep[0] & $ep_mask_specific) {607 $rewrite[$match . $regex] = $index . '?' . $query . $ep[1] . $this->preg_index($num_toks + 2);608 }609 }610 }611 612 612 //if we're creating rules for a permalink, do all the endpoints like attachments etc 613 613 if ($post) { 614 614 $post = true;
