[wp-trac] [WordPress Trac] #24867: Feeds for custom posts type can not be set independently of has_archive and supports => comments
WordPress Trac
noreply at wordpress.org
Mon Jul 29 00:12:27 UTC 2013
#24867: Feeds for custom posts type can not be set independently of has_archive and
supports => comments
--------------------------+-----------------------------
Reporter: marcosf | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Post Types | Version: trunk
Severity: normal | Keywords:
--------------------------+-----------------------------
I was testing the patch for ticket (Feeds or Feed - add_permastruct
missunderstanding: #23302) and discovered a few things (I'm using trunk
rev 19712).
Turning of feeds for custom post types only works if supports feeds &
has_archive are set to either false or true.
If you, e.g. set the argument feeds in rewrite to true and has_archive to
false then the rewrite rules for feeds do not get created (some happens of
you switch true & false around in both arguments).
This happens due to this condition in /wp-includes/post.php, line 1242:
if ( ! isset( $args->rewrite['feeds'] ) OR ! $args->has_archive )
$args->rewrite['feeds'] = (bool) $args->has_archive;
Another problem I run into is that:
With the patch for ticket (#23302) you can not enable/disable the comments
feed independent of the main feed of the custom post type. It also does
not get disabled if you do not enabled comments via supports. Rewrite
rules for feeds seem to always get created.
I've attached an example to showcase what I wrote above.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/24867>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list