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:
parent
cd47b3dc90
commit
c95a24f2d9
|
@ -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_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 )
|
if ( $args->register_meta_box_cb )
|
||||||
|
|
Loading…
Reference in New Issue