Ticket #16807: 16807.2.diff
| File 16807.2.diff, 1.7 KB (added by , 15 years ago) |
|---|
-
wp-includes/post.php
987 987 $archive_slug = $args->has_archive === true ? $args->rewrite['slug'] : $args->has_archive; 988 988 if ( $args->rewrite['with_front'] ) 989 989 $archive_slug = substr( $wp_rewrite->front, 1 ) . $archive_slug; 990 else 991 $archive_slug = $wp_rewrite->root . $archive_slug; 990 992 991 993 $wp_rewrite->add_rule( "{$archive_slug}/?$", "index.php?post_type=$post_type", 'top' ); 992 994 if ( $args->rewrite['feeds'] && $wp_rewrite->feeds ) { -
wp-includes/link-template.php
847 847 $struct = ( true === $post_type_obj->has_archive ) ? $post_type_obj->rewrite['slug'] : $post_type_obj->has_archive; 848 848 if ( $post_type_obj->rewrite['with_front'] ) 849 849 $struct = $wp_rewrite->front . $struct; 850 else 851 $struct = $wp_rewrite->root . $struct; 850 852 $link = home_url( user_trailingslashit( $struct, 'post_type_archive' ) ); 851 853 } else { 852 854 $link = home_url( '?post_type=' . $post_type ); -
wp-includes/rewrite.php
1857 1857 function add_permastruct($name, $struct, $with_front = true, $ep_mask = EP_NONE) { 1858 1858 if ( $with_front ) 1859 1859 $struct = $this->front . $struct; 1860 else 1861 $struct = $this->root . $struct; 1860 1862 $this->extra_permastructs[$name] = array($struct, $ep_mask); 1861 1863 } 1862 1864