<?php
/**
 * Uninstall Launchmind Blog
 */

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

// Load cache class if available
if (!class_exists('Launchmind_Cache')) {
    $cache_file = plugin_dir_path(__FILE__) . 'includes/class-launchmind-cache.php';
    if (file_exists($cache_file)) {
        require_once $cache_file;
    }
}

// Delete options
delete_option('launchmind_blog_api_base');
delete_option('launchmind_blog_api_key');
delete_option('launchmind_blog_site_id');
delete_option('launchmind_blog_cache_ttl');
delete_option('launchmind_blog_base_path');

// Clear cached transients
if (class_exists('Launchmind_Cache')) {
    Launchmind_Cache::clear_all();
}
