<?php
/**
 * Plugin Name: LocalGuard Scanner
 * Description: Local, explainable malware scanning for WordPress files and database content.
 * Version: 1.2.6
 * Requires at least: 6.4
 * Requires PHP: 7.4
 * Author: Garaje Imagina
 * Author URI: https://garajeimagina.com/
 * License: GPL-2.0-or-later
 * License URI: https://www.gnu.org/licenses/gpl-2.0.html
 * Text Domain: localguard-scanner
 * Domain Path: /languages
 * Network: true
 *
 * @package LocalGuardScanner
 */

defined( 'ABSPATH' ) || exit;

define( 'LOCALGUARD_SCANNER_VERSION', '1.2.6' );
define( 'LOCALGUARD_SCANNER_FILE', __FILE__ );
define( 'LOCALGUARD_SCANNER_DIR', plugin_dir_path( __FILE__ ) );
define( 'LOCALGUARD_SCANNER_URL', plugin_dir_url( __FILE__ ) );

$localguard_scanner_autoload = LOCALGUARD_SCANNER_DIR . 'vendor/autoload.php';

if ( is_readable( $localguard_scanner_autoload ) ) {
	require $localguard_scanner_autoload;
	LocalGuardScanner\Bootstrap::boot();
} else {
	add_action(
		'admin_notices',
		static function () {
			echo '<div class="notice notice-error"><p>';
			echo esc_html__( 'LocalGuard Scanner is incomplete: the production dependencies are missing.', 'localguard-scanner' );
			echo '</p></div>';
		}
	);
}
