When registering a post type, pass the correct argument for feeds to add_permastruct().

props butuzov, johnpbloch.
fixes #23302.



git-svn-id: https://develop.svn.wordpress.org/trunk@24830 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Nacin 2013-07-28 22:28:18 +00:00
parent 434066573b
commit 828514ac0b

View File

@ -1270,7 +1270,9 @@ function register_post_type( $post_type, $args = array() ) {
add_rewrite_rule( "{$archive_slug}/{$wp_rewrite->pagination_base}/([0-9]{1,})/?$", "index.php?post_type=$post_type" . '&paged=$matches[1]', 'top' );
}
add_permastruct( $post_type, "{$args->rewrite['slug']}/%$post_type%", $args->rewrite );
$permastruct_args = $args->rewrite;
$permastruct_args['feed'] = $permastruct_args['feeds'];
add_permastruct( $post_type, "{$args->rewrite['slug']}/%$post_type%", $permastruct_args );
}
if ( $args->register_meta_box_cb )