← Back
Editing: adm-image-intelligence.php
<?php /** * Plugin Name: All-in-One Image Intelligence by ADM * Plugin URI: https://affordabledentistmarketing.com * Description: Auto-generates SEO alt text for every image via Claude AI and embeds GPS EXIF coordinates. Activates and runs immediately — no configuration needed per site. * Version: 2.5.0 * Author: Affordable Dentist Marketing * Network: true */ defined( 'ABSPATH' ) || exit; define( 'ADM_ALT_VERSION', '2.5.0' ); define( 'ADM_ALT_FILE', __FILE__ ); define( 'ADM_ALT_DIR', plugin_dir_path( __FILE__ ) ); define( 'ADM_ALT_URL', plugin_dir_url( __FILE__ ) ); define( 'ADM_ALT_LOG_TABLE', 'adm_alt_log' ); define( 'ADM_ALT_QUEUE_TABLE','adm_alt_queue' ); // ── Default Claude API key (saved to wp_options on activation if not already set) ── define( 'ADM_DEFAULT_CLAUDE_KEY', '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' ); require_once ADM_ALT_DIR . 'includes/class-db-handler.php'; require_once ADM_ALT_DIR . 'includes/class-scanner.php'; require_once ADM_ALT_DIR . 'includes/class-ai-generator.php'; require_once ADM_ALT_DIR . 'includes/class-geocoder.php'; require_once ADM_ALT_DIR . 'includes/class-processor.php'; require_once ADM_ALT_DIR . 'includes/class-cron.php'; require_once ADM_ALT_DIR . 'admin/class-admin.php'; register_activation_hook( __FILE__, 'adm_alt_activate' ); register_deactivation_hook( __FILE__, 'adm_alt_deactivate' ); function adm_alt_activate() { ADM_Alt_DB_Handler::install(); // Save default Claude API key only if not already set if ( ! get_option( 'adm_alt_claude_key' ) ) { update_option( 'adm_alt_claude_key', ADM_DEFAULT_CLAUDE_KEY ); } // Schedule daily cron at 2 AM IST (20:30 UTC) ADM_Alt_Cron::schedule(); // Redirect to Settings so location can be configured before first scan set_transient( 'adm_alt_activated', 1, 30 ); } function adm_alt_deactivate() { ADM_Alt_Cron::unschedule(); } add_action( 'plugins_loaded', function () { ADM_Alt_DB_Handler::maybe_migrate(); ADM_Alt_Admin::init(); ADM_Alt_Processor::init(); ADM_Alt_Cron::init(); } );
Save File
Cancel