[wp-trac] [WordPress Trac] #18035: ignore_sticky_posts fails to remove sticky class
WordPress Trac
noreply at wordpress.org
Tue Dec 16 14:18:53 UTC 2014
#18035: ignore_sticky_posts fails to remove sticky class
---------------------------------------------+-------------------------
Reporter: mikkelbreum | Owner: johneckman
Type: enhancement | Status: reopened
Priority: normal | Milestone: 4.1
Component: Query | Version: 3.2
Severity: normal | Resolution:
Keywords: good-first-bug has-patch revert | Focuses: template
---------------------------------------------+-------------------------
Comment (by SergeyBiryukov):
Replying to [comment:21 helen]:
> The global `is_main_query()` function is deprecated (see #23329) so the
following patch is a no-go.
`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.
I 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.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/18035#comment:22>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list