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:
parent
f932c77406
commit
9e4be29f4b
@ -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 )
|
||||||
|
Loading…
Reference in New Issue
Block a user