From 828514ac0bc92fcdc28901e6415e5fdd39e8a211 Mon Sep 17 00:00:00 2001 From: Andrew Nacin Date: Sun, 28 Jul 2013 22:28:18 +0000 Subject: [PATCH] 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 --- wp-includes/post.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/wp-includes/post.php b/wp-includes/post.php index 18544599a5..4179e7fc09 100644 --- a/wp-includes/post.php +++ b/wp-includes/post.php @@ -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 )