[wp-trac] [WordPress Trac] #49550: is_home is set to true even for cron jobs, which causes sticky posts to get prepended to all WP_Query results

WordPress Trac noreply at wordpress.org
Fri Feb 24 23:33:19 UTC 2023


#49550: is_home is set to true even for cron jobs, which causes sticky posts to get
prepended to all WP_Query results
--------------------------+------------------------------
 Reporter:  archon810     |       Owner:  (none)
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  Query         |     Version:  5.3.2
 Severity:  normal        |  Resolution:
 Keywords:                |     Focuses:
--------------------------+------------------------------

Comment (by xParham):

 Agreed, `is_home` being true in a CRON process does not seem right. We saw
 some weird behavior in our CRON tasks and realized it was due to some
 random sticky posts getting included in the query results, which is
 completely unexpected.

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


More information about the wp-trac mailing list