wp plugin loaded

This commit is contained in:
alorig
2025-11-21 19:18:24 +05:00
parent 4a39c349f6
commit 1eba4a4e15
35 changed files with 11730 additions and 0 deletions

View File

@@ -0,0 +1,53 @@
<?php
/**
* Uninstall Handler
*
* Cleans up plugin data on uninstall
*
* @package Igny8Bridge
*/
// If uninstall not called from WordPress, then exit
if (!defined('WP_UNINSTALL_PLUGIN')) {
exit;
}
// Remove all options
delete_option('igny8_access_token');
delete_option('igny8_refresh_token');
delete_option('igny8_email');
delete_option('igny8_site_id');
delete_option('igny8_last_site_sync');
delete_option('igny8_last_site_import_id');
delete_option('igny8_token_refreshed_at');
delete_option('igny8_bridge_version');
// Remove all post meta (optional - uncomment if you want to remove all meta on uninstall)
/*
global $wpdb;
$wpdb->query("
DELETE FROM {$wpdb->postmeta}
WHERE meta_key LIKE '_igny8_%'
");
*/
// Unschedule cron jobs
$timestamp = wp_next_scheduled('igny8_sync_post_statuses');
if ($timestamp) {
wp_unschedule_event($timestamp, 'igny8_sync_post_statuses');
}
$timestamp = wp_next_scheduled('igny8_sync_site_data');
if ($timestamp) {
wp_unschedule_event($timestamp, 'igny8_sync_site_data');
}
$timestamp = wp_next_scheduled('igny8_sync_from_igny8');
if ($timestamp) {
wp_unschedule_event($timestamp, 'igny8_sync_from_igny8');
}
// Note: Taxonomies and terms are NOT deleted
// They remain in WordPress for user reference
// Only the taxonomy registration is removed