From 9e4be29f4bcf3b50e88003d97a12d381e86fe2c7 Mon Sep 17 00:00:00 2001 From: Ryan Boren 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: https://develop.svn.wordpress.org/trunk@13050 602fd350-edb4-49c9-b593-d223f7449a82 --- 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 )