From 98c0c1065b90a9ccc80ca6ebbdd104254781d38e Mon Sep 17 00:00:00 2001 From: ryan Date: Wed, 10 Feb 2010 21:57:25 +0000 Subject: [PATCH] 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 --- wp-includes/post.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wp-includes/post.php b/wp-includes/post.php index 624b8bdd76..5dfe747a87 100644 --- a/wp-includes/post.php +++ b/wp-includes/post.php @@ -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 )