diff --git a/src/wp-includes/class-wp-post-type.php b/src/wp-includes/class-wp-post-type.php
index ba37a02fb5..15cbafb069 100644
a
|
b
|
final class WP_Post_Type { |
486 | 486 | if ( ! isset( $args['rewrite']['pages'] ) ) { |
487 | 487 | $args['rewrite']['pages'] = true; |
488 | 488 | } |
489 | | if ( ! isset( $args['rewrite']['feeds'] ) || ! $args['has_archive'] ) { |
| 489 | if ( ! isset( $args['rewrite']['feeds'] ) ) { |
490 | 490 | $args['rewrite']['feeds'] = (bool) $args['has_archive']; |
491 | 491 | } |
492 | 492 | if ( ! isset( $args['rewrite']['ep_mask'] ) ) { |
… |
… |
final class WP_Post_Type { |
560 | 560 | if ( $this->rewrite['pages'] ) { |
561 | 561 | add_rewrite_rule( "{$archive_slug}/{$wp_rewrite->pagination_base}/([0-9]{1,})/?$", "index.php?post_type=$this->name" . '&paged=$matches[1]', 'top' ); |
562 | 562 | } |
| 563 | } else if ( $this->rewrite['feeds'] && $wp_rewrite->feeds ) { |
| 564 | $archive_slug = $this->rewrite['slug']; |
| 565 | if ( $this->rewrite['with_front'] ) { |
| 566 | $archive_slug = substr( $wp_rewrite->front, 1 ) . $archive_slug; |
| 567 | } else { |
| 568 | $archive_slug = $wp_rewrite->root . $archive_slug; |
| 569 | } |
| 570 | |
| 571 | $feeds = '(' . trim( implode( '|', $wp_rewrite->feeds ) ) . ')'; |
| 572 | add_rewrite_rule( "{$archive_slug}/feed/$feeds/?$", "index.php?post_type=$this->name" . '&feed=$matches[1]', 'top' ); |
| 573 | add_rewrite_rule( "{$archive_slug}/$feeds/?$", "index.php?post_type=$this->name" . '&feed=$matches[1]', 'top' ); |
563 | 574 | } |
564 | 575 | |
565 | 576 | $permastruct_args = $this->rewrite; |