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

props butuzov, johnpbloch.
fixes #23302.



git-svn-id: http://core.svn.wordpress.org/trunk@24830 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Andrew Nacin 2013-07-28 22:28:18 +00:00
parent cd47b3dc90
commit c95a24f2d9
1 changed files with 3 additions and 1 deletions

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 )