Custom post type archives, second pass. see #13818.

git-svn-id: https://develop.svn.wordpress.org/trunk@15819 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Nacin
2010-10-15 19:44:57 +00:00
parent 227e02298a
commit 38092bb128
5 changed files with 148 additions and 8 deletions
+1 -1
View File
@@ -924,7 +924,7 @@ function register_post_type($post_type, $args = array()) {
if ( !isset($args->rewrite['archive']) )
$args->rewrite['archive'] = false;
if ( !isset($args->rewrite['feeds']) || !$args->rewrite['archive'] )
$args->rewrite['feeds'] = false;
$args->rewrite['feeds'] = (bool) $args->rewrite['archive'];
if ( $args->hierarchical )
$wp_rewrite->add_rewrite_tag("%$post_type%", '(.+?)', $args->query_var ? "{$args->query_var}=" : "post_type=$post_type&name=");