<?php
/**
 * MarqueeX uninstall — remove plugin-owned options and transients.
 */

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

delete_option('marqueex_settings');

delete_transient('marqueex_builder_cache');
delete_transient('_marqueex_welcome_screen_activation_redirect');

global $wpdb;
if (isset($wpdb)) {
    $value_like = $wpdb->esc_like('_transient_marqueex_registerable_blocks_') . '%';
    $timeout_like = $wpdb->esc_like('_transient_timeout_marqueex_registerable_blocks_') . '%';
    $wpdb->query($wpdb->prepare("DELETE FROM {$wpdb->options} WHERE option_name LIKE %s", $value_like));
    $wpdb->query($wpdb->prepare("DELETE FROM {$wpdb->options} WHERE option_name LIKE %s", $timeout_like));
}
