Settings'; array_unshift($links, $settings_link); return $links; }); function command_post_activate() { if (!wp_next_scheduled(COMMAND_POST_CRON_HOOK)) { wp_schedule_event(time(), 'hourly', COMMAND_POST_CRON_HOOK); } } function command_post_deactivate() { $timestamp = wp_next_scheduled(COMMAND_POST_CRON_HOOK); if ($timestamp) { wp_unschedule_event($timestamp, COMMAND_POST_CRON_HOOK); } } add_action(COMMAND_POST_CRON_HOOK, function() { $reporter = new Command_Post_Reporter(); $reporter->ping(); });