/**
* Checks the installation for compliance with the system requirements.
*
* @since 3.0.0
*
* @return int The status of the installation check.
*/
public function check_installation()
{
if (!$this->is_plugins_page()) {
return self::WRONG_PAGE_FOR_CHECK;
}
$this->check_php_version();
$this->check_wordpress_version();
$this->check_multisite();
$this->check_plugin_activation();
if (!$this->errors) {
return self::INSTALLATION_OK;
}
$deactivator = new PluginDeactivator($this->plugin_properties->plugin_base_name(), $this->plugin_properties->plugin_name(), $this->errors);
add_action('admin_notices', [$deactivator, 'deactivate_plugin'], 0);
add_action('network_admin_notices', [$deactivator, 'deactivate_plugin'], 0);
return self::PLUGIN_DEACTIVATED;
}