- Exhaustive rename: PGM_ -> PRV_, pgm_ -> prv_, text domain and slug peptide-geo-monitor -> pr-vision, admin menu GEO Monitor -> PR Vision, main file peptide-geo-monitor.php -> pr-vision.php, DB table pgm_ai_visibility -> prv_ai_visibility. - P2-A: replace ltrim($host,'www.') character-mask with str_starts_with/substr prefix strip in PRV_Citation_Detector. Adds test coverage for wikipedia.org, webmd.com survival. - P2-B: drop continue-on-error: true from PHPCS CI step; WordPress Coding Standards now gates the build. - P2-C: remove dead in-run cache from PRV_Probe_Runner::run(); each (peptide, intent, model) triplet is visited once per run, cache hit is structurally impossible. - Version bump 0.1.0 -> 0.1.1 + CHANGELOG [0.1.1] entry. Agent-Session: pr-vision rename v0.1.1
35 lines
1.3 KiB
PHP
35 lines
1.3 KiB
PHP
<?php
|
|
/**
|
|
* PR Vision — full data teardown on uninstall.
|
|
*
|
|
* Drops the custom prv_ai_visibility table and deletes every wp_options
|
|
* row whose name starts with "prv_". WP-Cron events are already cleared
|
|
* by PRV_Deactivator on deactivation; this runs after that.
|
|
*
|
|
* @see ARCHITECTURE.md — §Uninstall specification.
|
|
* @see class-prv-deactivator.php — Clears cron on deactivation.
|
|
*/
|
|
|
|
if ( ! defined( 'WP_UNINSTALL_PLUGIN' ) ) {
|
|
exit;
|
|
}
|
|
|
|
global $wpdb;
|
|
|
|
/* ── 1. Drop the custom table ─────────────────────────────────────── */
|
|
|
|
$table = $wpdb->prefix . 'prv_ai_visibility';
|
|
// phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.SchemaChange, WordPress.DB.PreparedSQL.InterpolatedNotPrepared
|
|
$wpdb->query( "DROP TABLE IF EXISTS {$table}" );
|
|
|
|
/* ── 2. Delete all prv_ prefixed options ──────────────────────────── */
|
|
|
|
// phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery
|
|
$wpdb->query(
|
|
"DELETE FROM {$wpdb->options} WHERE option_name LIKE 'prv\_%'"
|
|
);
|
|
|
|
/* ── 3. Clear any remaining scheduled cron events ─────────────────── */
|
|
|
|
wp_clear_scheduled_hook( 'prv_weekly_probe' );
|