WordPress.org

Make WordPress Core


Ignore:
Timestamp:
06/08/2004 05:48:21 PM (14 years ago)
Author:
rboren
Message:

Add back the trailing slash to paged permalinks.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/template-functions-links.php

    r1391 r1395  
    309309   $page_modstring = "page/";
    310310   $page_modregex = "page/?";
     311   $permalink = 0;
    311312
    312313   // if we already have a QUERY style page string
     
    316317   // if we already have a mod_rewrite style page string
    317318   } elseif ( preg_match( '|'.$page_modregex.'\d+|', $qstr ) ){
     319      $permalink = 1;
    318320      $qstr = preg_replace('|'.$page_modregex.'\d+|',"$page_modstring$pagenum",$qstr);
    319321
     
    329331         // otherwise, it could be rewritten, OR just the default index ...
    330332      } elseif( '' != get_settings('permalink_structure')) {
     333         $permalink = 1;
    331334         $qstr = preg_replace('|(.*)/[^/]*|', '$1/', $qstr).$page_modstring.$pagenum;
    332335      } else {
     
    341344   $qstr = preg_replace('|^'. $home_root . '|', '', $qstr);
    342345   $qstr = preg_replace('|^/+|', '', $qstr);
     346   if ($permalink) $qstr = trailingslashit($qstr);
    343347   return preg_replace('/&([^#])(?![a-z]{1,8};)/', '&$1', trailingslashit( get_settings('home') ) . $qstr );
    344348}
Note: See TracChangeset for help on using the changeset viewer.