Newly flagged plugins. */ public function run_check() { $flagged = Registry::check_all(); if ( $flagged ) { Notifier::owner_flags( $flagged ); } return $flagged; } /** * Schedules the daily check, plus a first run shortly after activation to take the baseline. * * @return void */ public static function activate() { if ( ! wp_next_scheduled( self::CRON ) ) { wp_schedule_event( time() + HOUR_IN_SECONDS, 'daily', self::CRON ); } wp_schedule_single_event( time() + MINUTE_IN_SECONDS, self::CRON ); } /** * Removes the schedule. Stored data is kept until the plugin is deleted. * * @return void */ public static function deactivate() { wp_clear_scheduled_hook( self::CRON ); } }