[wp-trac] [WordPress Trac] #20899: is_home() should be able to be true when is_feed()

WordPress Trac noreply at wordpress.org
Thu Mar 30 03:54:51 UTC 2017


#20899: is_home() should be able to be true when is_feed()
-------------------------------------------------+-------------------------
 Reporter:  nacin                                |       Owner:
     Type:  defect (bug)                         |      Status:  reviewing
 Priority:  normal                               |   Milestone:  4.8
Component:  Query                                |     Version:
 Severity:  normal                               |  Resolution:
 Keywords:  has-patch needs-testing has-unit-    |     Focuses:
  tests dev-feedback                             |
-------------------------------------------------+-------------------------

Comment (by dlh):

 Hi @stevenkword,

 I tested [attachment:20899.4.diff] and found it generally worked as
 expected, but I had a few questions and comments along the way. My
 apologies if I've missed previous discussions about these.

 - Should `is_home_feed()` and `is_custom_feed()` be mutually exclusive? I
 ask because if I register `add_feed( 'foo', 'do_feed_rss2' )`, then my
 feed will be available at `example.com/foo/`, and I think I might then
 assume I was still looking at a "home feed."

 - Should `is_custom_feed()` be true for invalid feeds? Currently it looks
 like it is. I suppose that's consistent with `is_feed()`?

 - Along those lines, I was curious about the benefits of having an "is
 custom feed" conditional as opposed to "is bundled feed"? Not that "is
 custom feed" is unhelpful, but it seems like it currently assumes that
 something is a custom feed if it isn't a core feed. An "is bundled feed"
 conditional might be able to tell you roughly the same thing but with more
 certainty because it could test against a known list of core feeds.

 - Currently, `is_home()` will be false when `is_home_feed()` or
 `is_custom_feed()` is true. I think this is expected behavior, but I'm
 noting it just in case.

 - Lastly, should the new `_doing_it_wrong()` calls use 4.8.0 for the
 version?

--
Ticket URL: <https://core.trac.wordpress.org/ticket/20899#comment:30>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list