Torro_Forms::deactivate( bool $network_wide = false )

Deactivates the plugin.

Description

Clears the cron task scheduled.

See also

Parameters

$network_wide

(bool) (Optional) Whether the plugin is being deactivated for the whole network.

Default value: false

Source

File: src/torro-forms.php

	public static function deactivate( $network_wide = false ) {
		if ( $network_wide ) {
			$sites = get_sites( array(
				'network_id'    => get_current_network_id(),
				'no_found_rows' => true,
			) );
			foreach ( $sites as $site ) {
				switch_to_blog( $site->id );
				torro()->submissions->clear_cron_task();
				restore_current_blog();
			}
		} else {
			torro()->submissions->clear_cron_task();
		}
	}

Changelog

Changelog
Version Description
1.0.0 Introduced.