Make WordPress Core


Ignore:
Timestamp:
03/29/2007 12:17:40 AM (18 years ago)
Author:
ryan
Message:

Rewrit endpoint fixes from westi. see #3964

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/rewrite.php

    r4990 r5130  
    583583                $rewrite = array_merge($rewrite, array($pagematch => $pagequery));
    584584
     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
    585595            //if we've got some tags in this dir
    586596            if ($num_toks) {
     
    600610                }
    601611
    602                 //do endpoints
    603                 if ($endpoints) {
    604                     foreach ($ep_query_append as $regex => $ep) {
    605                         //add the endpoints on if the mask fits
    606                         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 
    612612                //if we're creating rules for a permalink, do all the endpoints like attachments etc
    613613                if ($post) {
Note: See TracChangeset for help on using the changeset viewer.