Ticket #1762: 1762.diff
File 1762.diff, 2.5 KB (added by , 18 years ago) |
---|
-
wp-includes/link-template.php
357 357 358 358 $qstr = wp_specialchars($_SERVER['REQUEST_URI']); 359 359 360 $page_querystring = "paged";361 $page_modstring = "page/";362 $page_modregex = "page/?";360 $page_querystring = 'paged'; 361 $page_modstring = $wp_rewrite->page_number_base . '/'; 362 $page_modregex = $wp_rewrite->pace_number_base . '/?'; 363 363 $permalink = 0; 364 364 365 365 $home_root = parse_url(get_option('home')); -
wp-includes/rewrite.php
150 150 var $permalink_structure; 151 151 var $category_base; 152 152 var $category_structure; 153 var $author_base = 'author';153 var $author_base; 154 154 var $author_structure; 155 155 var $date_structure; 156 156 var $page_structure; 157 var $search_base = 'search';157 var $search_base; 158 158 var $search_structure; 159 var $comments_base = 'comments';160 var $feed_base = 'feed';159 var $comments_base; 160 var $feed_base; 161 161 var $comments_feed_structure; 162 162 var $feed_structure; 163 163 var $front; … … 218 218 ); 219 219 220 220 var $feeds = array ( 'feed', 'rdf', 'rss', 'rss2', 'atom' ); 221 var $page_number_base; 221 222 222 223 function using_permalinks() { 223 224 if (empty($this->permalink_structure)) … … 232 233 } 233 234 234 235 // If the index is not in the permalink, we're using mod_rewrite. 235 if (preg_match('#^/*' . $this->index . '#', $this->permalink_structure)) { 236 if (preg_match('#^/*' . $this->index . '#', $this->permalink_structure)) { /* */ 236 237 return true; 237 238 } 238 239 … … 480 481 481 482 //build a regex to match the trackback and page/xx parts of URLs 482 483 $trackbackregex = 'trackback/?$'; 483 $pageregex = 'page/?([0-9]{1,})/?$';484 $pageregex = $this->page_number_base . '/?([0-9]{1,})/?$'; 484 485 485 486 //build up an array of endpoint regexes to append => queries to append 486 487 if ($endpoints) { … … 860 861 $this->root = $this->index . '/'; 861 862 } 862 863 $this->category_base = get_option('category_base'); 864 $this->author_base = trim(__('/author/'), '/'); 865 $this->search_base = trim(__('/search/'), '/'); 866 $this->comments_base = trim(__('/comments/'), '/'); 867 $this->feed_base = trim(__('/feed/'), '/'); 868 $this->page_number_base = trim(__('/page/'), '/'); 869 863 870 unset($this->category_structure); 864 871 unset($this->author_structure); 865 872 unset($this->date_structure); … … 888 895 } 889 896 } 890 897 891 ?> 892 No newline at end of file 898 ?>