<?php
/**
 * Plugin Name: GistMag Alt Text Generator
 * Plugin URI: https://gistmag.co.uk/wordpress-plugin/gistmag-alt-text-generator
 * Description: AI-powered alt text generation for WordPress media library
 * Version: 1.0.0
 * Author: GistMag
 * Author URI: https://gistmag.co.uk
 * License: GPL v2 or later
 * Text Domain: gistmag-alt-text-generator
 */

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

define('GISTMAG_ATG_VERSION', '1.0.0');
define('GISTMAG_ATG_PLUGIN_DIR', plugin_dir_path(__FILE__));
define('GISTMAG_ATG_PLUGIN_URL', plugin_dir_url(__FILE__));
define('GISTMAG_ATG_API_BASE_URL', 'https://eutekssvzhtkwzperkzb.supabase.co/functions/v1');

require_once GISTMAG_ATG_PLUGIN_DIR . 'includes/class-gistmag-atg.php';
require_once GISTMAG_ATG_PLUGIN_DIR . 'includes/class-gistmag-atg-api.php';
require_once GISTMAG_ATG_PLUGIN_DIR . 'includes/class-gistmag-atg-admin.php';

function gistmag_atg_init() {
    $plugin = new GistMag_ATG();
    $plugin->run();
}
add_action('plugins_loaded', 'gistmag_atg_init');


register_activation_hook(__FILE__, 'gistmag_atg_activate');
register_deactivation_hook(__FILE__, 'gistmag_atg_deactivate');

function gistmag_atg_activate() {
    // Set default options
    add_option('gistmag_atg_api_key', '');
    add_option('gistmag_atg_auto_generate', true);
    add_option('gistmag_atg_default_mode', 'short');
}

function gistmag_atg_deactivate() {
    // Cleanup if needed
}

