<?php
/**
 * Plugin Name: NaveenCodes Image Optimizer
 * Plugin URI: https://wordpress.org/plugins/naveencodes-image-optimizer/
 * Description: Optimize WordPress images with a secure cloud-powered workflow, bulk controls, and clear media-level reporting.
 * Version: 1.5.1
 * Tribute: Built with love, in memory of Maa ❤️ (18 May)
 * Requires at least: 5.8
 * Requires PHP: 7.4
 * Author: Naveen Goyal
 * Author URI: https://naveencodes.com/
 * License: GPL v2 or later
 * License URI: https://www.gnu.org/licenses/gpl-2.0.html
 * Text Domain: naveencodes-image-optimizer
 * Domain Path: /languages
 *
 * @package NaveenCodesImageOptimizer
 */

namespace NaveenCodesImageOptimizer;

defined( 'ABSPATH' ) || exit;

define( 'NAVEENCODES_VERSION', '1.5.1' );
define( 'NAVEENCODES_FILE', __FILE__ );
define( 'NAVEENCODES_DIR', plugin_dir_path( __FILE__ ) );
define( 'NAVEENCODES_URL', plugin_dir_url( __FILE__ ) );
define( 'NAVEENCODES_BASENAME', plugin_basename( __FILE__ ) );
define( 'NAVEENCODES_ENGINE_URL', 'https://dev.naveencodes.com' );

require_once NAVEENCODES_DIR . 'includes/class-logger.php';
require_once NAVEENCODES_DIR . 'includes/class-settings.php';
require_once NAVEENCODES_DIR . 'includes/class-queue.php';
require_once NAVEENCODES_DIR . 'includes/class-api-client.php';
require_once NAVEENCODES_DIR . 'includes/class-optimizer.php';
require_once NAVEENCODES_DIR . 'includes/class-lazyload.php';
require_once NAVEENCODES_DIR . 'includes/class-admin.php';
require_once NAVEENCODES_DIR . 'includes/class-review-notice.php';
require_once NAVEENCODES_DIR . 'includes/class-init.php';

register_activation_hook( __FILE__, array( Init::class, 'activate' ) );
register_deactivation_hook( __FILE__, array( Init::class, 'deactivate' ) );

/**
 * Boot the plugin singleton.
 *
 * @return Init
 */
function naveencodes_image_optimizer() {
	return Init::get_instance();
}

add_action( 'plugins_loaded', __NAMESPACE__ . '\\naveencodes_image_optimizer' );
