public static function scan() {
		global $itsec_globals;
		
		require_once( dirname( __FILE__ ) . '/class-itsec-malware-scheduling-admin.php' );
		
		
		$defaults = array(
			'enabled'             => false,
			'email_notifications' => true,
			'email_contacts'      => array(),
		);
		
		$settings = get_site_option( 'itsec_malware_scheduling', array() );
		
		if ( ! is_array( $settings ) ) {
			$settings = array();
		}
		
		$settings = array_merge( $defaults, $settings );
		
		if ( ! $settings['enabled'] ) {
			ITSEC_Malware_Scheduling_Admin::update_schedule( $settings['enabled'] );
			return;
		}
		
		
		require_once( trailingslashit( $itsec_globals['plugin_dir'] ) . 'core/modules/malware/class-itsec-malware-scanner.php' );
		$results = ITSEC_Malware_Scanner::scan();
		
		if ( ! $settings['email_notifications'] ) {
			return;
		}
		
		$subject = self::get_email_subject( $results );
		
		if ( empty( $subject ) ) {
			return;
		}
		
		$addresses = self::get_email_addresses( $settings['email_contacts'] );
		
		if ( empty( $addresses ) ) {
			$display = ini_set( 'display_errors', false );
			trigger_error( __( 'One or more malware issues were found by iThemes Security, but no user could be found to send the email notification to. Please update the Malware Scan Scheduling settings for iThemes Security so that email notifications are properly sent.', 'it-l10n-ithemes-security-pro' ) );
			ini_set( 'display_errors', $display );
			return;
		}
		
		$message = self::get_email_message( $results );
		$headers = array( 'Content-Type: text/html; charset=UTF-8' );
		
		foreach ( $addresses as $address ) {
			wp_mail( $address, $subject, $message, $headers );
		}
	}
	public function run( $arguments ) {
		$settings = get_site_option( 'itsec_malware_scheduling' );
		
		if ( ! is_array( $settings ) ) {
			$settings = array();
		}
		if ( ! isset( $settings['enabled'] ) ) {
			$settings['enabled'] = false;
		}
		
		if ( isset( $arguments['enabled'] ) && ( $arguments['enabled'] != $settings['enabled'] ) ) {
			require_once( dirname( __FILE__ ) . '/class-itsec-malware-scheduling-admin.php' );
			
			ITSEC_Malware_Scheduling_Admin::update_schedule( $arguments['enabled'] );
		}
		
		$settings = array_merge( $settings, $arguments );
		
		return update_site_option( 'itsec_malware_scheduling', $settings );
	}
		/**
		 * Execute module upgrade
		 *
		 * @return void
		 */
		public function execute_upgrade() {
			global $itsec_old_version;
			
			if ( $itsec_old_version < 4037 ) {
				$options = get_site_option( 'itsec_malware_scheduling' );
				
				if ( is_array( $options ) ) {
					unset( $options['standard'] );
					unset( $options['standard_interval'] );
					unset( $options['individual'] );
				} else {
					$options = array();
				}
				
				
				$options = array_merge( $this->defaults, $options );
				
				update_site_option( 'itsec_malware_scheduling', $options );
				
				delete_site_option( 'itsec_malware_scheduling_report_queue' );
				delete_site_option( 'itsec_malware_scheduling_last_scan' );
				
				
				require_once( dirname( __FILE__ ) . '/class-itsec-malware-scheduling-admin.php' );
				ITSEC_Malware_Scheduling_Admin::update_schedule( $options['enabled'] );
			}
		}