[wp-trac] [WordPress Trac] #21648: Enable feed autodiscovery for custom post type archives
WordPress Trac
wp-trac at lists.automattic.com
Tue Sep 25 10:30:19 UTC 2012
#21648: Enable feed autodiscovery for custom post type archives
-------------------------+---------------------
Reporter: mdgl | Owner: nacin
Type: enhancement | Status: closed
Priority: normal | Milestone: 3.5
Component: Post Types | Version: 3.4.1
Severity: normal | Resolution: fixed
Keywords: has-patch |
-------------------------+---------------------
Comment (by mdgl):
Sorry, but I noticed a couple of issues with this in further testing:
1) As I suspected, the use of get_post_type() fails with empty post type
archives (because the global $post is not set). In this case, we output an
invalid link (because of issue 2 below). To find the post type, we need to
go via the queried object instead (all a bit messy!).
2) The two uses of isset() later in function feed_links_extra() don't work
as expected because functions such as get_post_type_archive_feed_link()
can return false rather than null. I think these two calls should be
replaced with !empty().
--
Ticket URL: <http://core.trac.wordpress.org/ticket/21648#comment:5>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list