[wp-trac] [WordPress Trac] #48427: feed_links_extra() has 2 "elseif ( is_post_type_archive() ) {}" clauses
WordPress Trac
noreply at wordpress.org
Thu Oct 24 22:02:29 UTC 2019
#48427: feed_links_extra() has 2 "elseif ( is_post_type_archive() ) {}" clauses
--------------------------+-----------------------------
Reporter: pbiron | Owner: SergeyBiryukov
Type: defect (bug) | Status: accepted
Priority: normal | Milestone: 5.4
Component: Feeds | Version: 3.7
Severity: normal | Resolution:
Keywords: | Focuses:
--------------------------+-----------------------------
Comment (by pbiron):
Thanx both of you for tracking the history.
I think the 1st one (using `get_query_var( 'post_type' )` is easier to
understand. It takes a little bit of mental gymnastics to realize that
`get_queried_object()` will return the post type object when
`is_post_type_archive() === true`. Anyone disagree?
Just let me know which is the preferred one to keep and I'll create a
patch for it.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/48427#comment:4>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list