=" );
}
/**
* Checks if the plugin is compatible with user environment or not
* Add more compatibility checks whenever required
*
* @since 1.4.3
*
* @return bool is_plugin_compatible
*/
public function is_plugin_compatible() {
return $this->is_php_version_compatible();
}
/**
* Prints the reason for User environment not being compatible as notice on admin page
*
* @since 1.4.3
*/
public function incompatible_environment_message() {
printf( "
Amazon Associates Link Builder Plugin Not Activated!
%s plugin requires PHP Version %s or higher. You’re still on %s.
", AALB_PLUGIN_NAME, AALB_PLUGIN_MINIMUM_SUPPORTED_PHP_VERSION, phpversion() );
}
/**
* Deactivates the plugin
*
* @since 1.4.3
*/
public function deactivate() {
//To remove the "Plugin Activated" Admin Notice
unset( $_GET['activate'] );
require_once( ABSPATH . 'wp-admin/includes/plugin.php' );
$plugin = plugin_basename( AALB_PLUGIN_DIR . 'amazon-associates-link-builder.php' );
deactivate_plugins( $plugin );
//Remove action_links from admin page present below the plugin
remove_filter( 'plugin_action_links_' . $plugin, 'add_action_links' );
add_action( 'all_admin_notices', array( $this, 'incompatible_environment_message' ) );
}
}
?>