Make WordPress Core

Changes between Initial Version and Version 1 of Ticket #18035, comment 22


Ignore:
Timestamp:
12/16/2014 02:22:05 PM (12 years ago)
Author:
SergeyBiryukov

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #18035, comment 22

    initial v1  
    22> The global `is_main_query()` function is deprecated (see #23329) so the following patch is a no-go.
    33
    4 `is_main_query()` only issues a notice when being called from `pre_get_posts`. It still have a valid use case otherwise ("is `$wp_query` the main query?"), see comment:3:ticket:23329, which is exactly the use case here.
     4`is_main_query()` only issues a notice when being called from `pre_get_posts`. It still has a valid use case otherwise ("is `$wp_query` the main query?"), see comment:3:ticket:23329, which is exactly the use case here.
    55
    66I don't disagree with a wontfix, but checking `is_main_query()` seems like a correct thing to do here, so perhaps revert and fix in a future release would be a better way.