Actually it seems the WP_Query internally set the “is_home” to true when a get_posts() is called (the get_posts() function not the internal method) in the cron context.
That is a problem since plugins that change the main query believed they are in the home rendering context.
The WP_Query actually set the is_home to false is we are in the administration context, this is how I discovered the problem.
I think it should be added a check on the DOING_CRON so the post extraction in a cron fired event is considered like an administrative context (or at least not the home context).
- The topic ‘WP_Query modification while on cron context’ is closed to new replies.