<?php
/**
 * Plugin Name:       Easy Critical CSS
 * Description:       Easily inject Critical CSS and Secondary CSS (with unused CSS styles removed) to improve site speed and performance.
 * Version:           1.4.8
 * Requires at least: 6.2
 * Tested up to:      7.0
 * Requires PHP:      7.4
 * Author:            CriticalCSS.net
 * Author URI:        https://criticalcss.net/
 * License:           GPL v2 or later
 * License URI:       https://www.gnu.org/licenses/gpl-2.0.html
 * Text Domain:       easy-critical-css
 *
 * @package EasyCriticalCSS
 */

namespace EasyCriticalCSS;

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

// Load Composer autoload.
require_once plugin_dir_path( __FILE__ ) . 'vendor/autoload.php';

// Load Freemius.
require_once plugin_dir_path( __FILE__ ) . 'inc/load-freemius.php';

// Initialize the plugin.
Plugin::get_instance( __FILE__ );

// Timestamp (de)activation hooks.
register_activation_hook(
	__FILE__,
	function () {
		update_option( 'easy_cc_activation', gmdate( 'YmdHis' ) );
	}
);
register_deactivation_hook(
	__FILE__,
	function () {
		delete_option( 'easy_cc_activation' );
		wp_clear_scheduled_hook( 'easy_cc_cleanup_old_handshakes' );
	}
);
