Changeset 7520 for trunk/wp-includes/rewrite.php
- Timestamp:
- 03/26/2008 06:37:19 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/rewrite.php
r7493 r7520 462 462 } 463 463 464 function get_extra_permastruct($name) { 465 if ( isset($this->extra_permastructs[$name]) ) 466 return $this->extra_permastructs[$name]; 467 return false; 468 } 469 464 470 function get_author_permastruct() { 465 471 if (isset($this->author_structure)) { … … 833 839 834 840 // Extra permastructs 835 $extra_rewrite = array();836 841 foreach ( $this->extra_permastructs as $permastruct ) 837 $ extra_rewrite = array_merge($extra_rewrite, $this->generate_rewrite_rules($permastruct, EP_NONE));842 $this->extra_rules_top = array_merge($this->extra_rules_top, $this->generate_rewrite_rules($permastruct, EP_NONE)); 838 843 839 844 // Put them together. 840 845 if ( $this->use_verbose_page_rules ) 841 $this->rules = array_merge($this->extra_rules_top, $robots_rewrite, $default_feeds, $page_rewrite, $root_rewrite, $comments_rewrite, $search_rewrite, $category_rewrite, $tag_rewrite, $author_rewrite, $date_rewrite, $post_rewrite, $ extra_rewrite, $this->extra_rules);846 $this->rules = array_merge($this->extra_rules_top, $robots_rewrite, $default_feeds, $page_rewrite, $root_rewrite, $comments_rewrite, $search_rewrite, $category_rewrite, $tag_rewrite, $author_rewrite, $date_rewrite, $post_rewrite, $this->extra_rules); 842 847 else 843 $this->rules = array_merge($this->extra_rules_top, $robots_rewrite, $default_feeds, $root_rewrite, $comments_rewrite, $search_rewrite, $category_rewrite, $tag_rewrite, $author_rewrite, $date_rewrite, $post_rewrite, $ extra_rewrite, $page_rewrite, $this->extra_rules);848 $this->rules = array_merge($this->extra_rules_top, $robots_rewrite, $default_feeds, $root_rewrite, $comments_rewrite, $search_rewrite, $category_rewrite, $tag_rewrite, $author_rewrite, $date_rewrite, $post_rewrite, $page_rewrite, $this->extra_rules); 844 849 845 850 do_action_ref_array('generate_rewrite_rules', array(&$this)); … … 955 960 } 956 961 957 function add_permastruct($ struct, $with_front = true) {962 function add_permastruct($name, $struct, $with_front = true) { 958 963 if ( $with_front ) 959 964 $struct = $this->front . $struct; 960 $this->extra_permastructs[ ] = $struct;965 $this->extra_permastructs[$name] = $struct; 961 966 } 962 967
Note: See TracChangeset
for help on using the changeset viewer.