<?php
/**
 * Plugin Name: icomm metrix
 * Description: מדדי חיפוש ואנליטיקס מגוגל - דשבורד, דוח ללקוח וסנכרון. חינמי: סיכום GSC. PRO: GA4, היסטוריה 90 יום, מגמת SEO חודשית ומעקב מילות.
 * Version: 0.8.57
 * Author: icomm
 * Plugin URI: https://icomm.market/
 * Author URI: https://icomm.market
 * Requires at least: 5.8
 * Requires PHP: 7.4
 * Text Domain: icomm-metrix
 */

if (!defined('ABSPATH')) {
	exit;
}

define('ICOMM_SM_VERSION', '0.8.57');
define('ICOMM_SM_PLUGIN_FILE', __FILE__);
define('ICOMM_SM_PLUGIN_DIR', plugin_dir_path(__FILE__));
define('ICOMM_SM_PLUGIN_URL', plugin_dir_url(__FILE__));
define('ICOMM_SM_DB_VERSION', 4);

require_once ICOMM_SM_PLUGIN_DIR . 'includes/class-icomm-metrix.php';
require_once ICOMM_SM_PLUGIN_DIR . 'includes/class-icomm-sm-license.php';
require_once ICOMM_SM_PLUGIN_DIR . 'includes/class-icomm-sm-purchase.php';
require_once ICOMM_SM_PLUGIN_DIR . 'includes/plugin-about.php';

register_activation_hook(__FILE__, ['IComm_Metrix', 'activate']);
register_deactivation_hook(__FILE__, ['IComm_Metrix', 'deactivate']);

add_action('plugins_loaded', static function (): void {
	load_plugin_textdomain('icomm-metrix', false, dirname(plugin_basename(__FILE__)) . '/languages');
	IComm_SM_Purchase::init();
	IComm_Metrix::instance()->init();
}, 5);
