Plugin Author
wpseek
(@alphawolf)
Hi jneto81,
sorry for the late reply, but life and work keeps me busy. 🙂
I just released v1.6.0 that moves the schedule_event action outside the admin_init function AND gets rid of both the get_plugins and get_themes functions.
Thanks for the heads up.
Thanks.
But you duplicate the wp_update_themes, and forget the wp_maybe_auto_update
/**
* Filter cron events
*
* @since 1.5.0
*/
public function filter_cron_events($event) {
switch( $event->hook ) {
case 'wp_version_check':
case 'wp_update_plugins':
case 'wp_update_themes':
case 'wp_update_themes':
$event = false;
break;
}
return $event;
}
Plugin Author
wpseek
(@alphawolf)
This is not about removing, it’s about avoiding to schedule the future update check .
I’m analyzing all my wordpress queries ( 600+ per request in Admin ) and with my filter_cron_events
$ignore = array(
‘wp_version_check’,
‘wp_update_plugins’,
‘wp_update_themes’,
‘wp_maybe_auto_update’,
);
i reduce 8 update queries, 2 per hook. ( sometimes, the cron queries are very heavy )
Without my filter, wordpress is always removing the events from the cron ( + 4 queries ) and scheduling again ( + 4 queries ) for the next check in the future.
With my filter, i never schedule the next check ( -4 queries ), so if it’s not in the cron, we don’t need to remove them ( – 4 queries ).
Hope you understand.
By the way, i’m using wordpress 4.11 for now and can’t upgrade.
Plugin Author
wpseek
(@alphawolf)
Fixed in version 1.6.2, thank you!