clear_scheduled_event() public method

Wrapper for clearing scheduled events for a specific cron job
public clear_scheduled_event ( string $hook )
$hook string
 /**
  * Pause upgrade
  */
 function action_pause_update()
 {
     if (!isset($_GET['update']) || $this->upgrade_name !== sanitize_key($_GET['update'])) {
         return;
     }
     $this->as3cf->clear_scheduled_event($this->cron_hook);
     $this->change_status_request(self::STATUS_PAUSED);
 }
示例#2
0
 /**
  * Remove the cron schedule
  */
 protected function unschedule()
 {
     $this->as3cf->clear_scheduled_event($this->cron_hook);
 }