Remove leading slash so that it doesn't get doubled when front is added. see #9674

git-svn-id: https://develop.svn.wordpress.org/trunk@13050 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren 2010-02-10 21:57:25 +00:00
parent f932c77406
commit 9e4be29f4b
1 changed files with 1 additions and 1 deletions

View File

@ -801,7 +801,7 @@ function register_post_type($post_type, $args = array()) {
if ( !isset($args->rewrite['with_front']) )
$args->rewrite['with_front'] = true;
$wp_rewrite->add_rewrite_tag("%$post_type%", '([^/]+)', $args->query_var ? "{$args->query_var}=" : "post_type=$post_type&name=");
$wp_rewrite->add_permastruct($post_type, "/{$args->rewrite['slug']}/%$post_type%", $args->rewrite['with_front']);
$wp_rewrite->add_permastruct($post_type, "{$args->rewrite['slug']}/%$post_type%", $args->rewrite['with_front']);
}
if ( $args->register_meta_box_cb )