WordPress.org

Make WordPress Core

Changes between Version 1 and Version 2 of Ticket #30210, comment 11


Ignore:
Timestamp:
11/05/2015 12:24:27 AM (5 years ago)
Author:
stevenkword
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #30210, comment 11

    v1 v2  
    1 I believe [attachment:30210.2.patch] solves the problem, but the solution isn't perfect.  Because of the way the query is parsed in `$wp_query->parse_query`, both `$wp_query->is_feed()` and `$wp_query->is_tax()` can not simultaneously be true.  Currently, `is_tax()` will return false for all feeds.  This means in order to solve the case of empty but valid taxonomy archive feeds, we are not able to use the typical core functions.  As a work around, I'm checking to see if `$wp_query->tax_query` is an instance of the `WP_Tax_Query` object.
     1I believe [attachment:30210.2.patch] solves the problem, but the solution isn't perfect.  Because of the way the WP_Query is parsed in `$wp_query->parse_query()`, both `$wp_query->is_feed()` and `$wp_query->is_tax()` can not simultaneously be true.  Currently, `is_tax()` will return false for all feeds.  This means in order to solve the case of empty but valid taxonomy archive feeds, we are not able to use the typical core functions.  As a work around, I'm checking to see if `$wp_query->tax_query` is an instance of the `WP_Tax_Query` object.
    22
    33The unit tests proposed in [attachment:30210.unit-test.patch] will struggle with the same `is_tax` symptoms and will need to be updated if we decide [attachment:30210.2.patch] is valid.