<?php

/**
 * Plugin Name:       Bulk Alt Text AI
 * Plugin URI:        https://antunescode.com/bulk-alt-text-ai
 * Description:       Automatically write descriptive image alt text with AI — one click per image, on every upload, or in bulk across your whole media library. Great for accessibility (WCAG/ADA) and Google Images. Uses the native WordPress 7 AI connectors, including your own local model.
 * Version:           1.4.1
 * Requires at least: 7.0
 * Requires PHP:      7.4
 * Author:            Roddyka
 * Author URI:        https://antunescode.com
 * License:           GPL-2.0-or-later
 * License URI:       https://spdx.org/licenses/GPL-2.0-or-later.html
 * Text Domain:       bulk-alt-text-ai
 * Domain Path:       /languages
 *
 * @package BulkAltText
 */

declare(strict_types=1);

namespace BulkAltText;

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

// --- Freemius: selling, licensing and updates ------------------------------
// Loaded in the global namespace; access anywhere via \bata_fs().
require_once __DIR__ . '/freemius.php';
if (function_exists('bata_fs')) {
    \bata_fs()->set_basename(true, __FILE__);
}

define('BATAI_VERSION', '1.4.1');
define('BATAI_FILE', __FILE__);
define('BATAI_DIR', plugin_dir_path(__FILE__));
define('BATAI_URL', plugin_dir_url(__FILE__));
define('BATAI_BASENAME', plugin_basename(__FILE__));

require_once BATAI_DIR . 'src/autoload.php';

/**
 * Boot the plugin once all plugins are loaded.
 */
function bootstrap(): void
{
    Plugin::instance()->init();
}
add_action('plugins_loaded', __NAMESPACE__ . '\\bootstrap');

register_activation_hook(__FILE__, [Plugin::class, 'on_activate']);
register_deactivation_hook(__FILE__, [Plugin::class, 'on_deactivate']);
