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

git-svn-id: http://svn.automattic.com/wordpress/trunk@13050 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2010-02-10 21:57:25 +00:00
parent ca45669343
commit 98c0c1065b
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']) ) if ( !isset($args->rewrite['with_front']) )
$args->rewrite['with_front'] = true; $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_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 ) if ( $args->register_meta_box_cb )