PR Vision v0.2.0: admin/settings interface + correctness fixes (#3)
Model manager (UI-swappable models) + versioned/idempotent prv_models migration; metric comparability (config-version stamping); run-lock; projected cost + truncation state; per-model run-health; cadence reschedule; API-key 3-state; design/a11y fixes (dark v2). QA: APPROVE-WITH-P2-NOTES — qa-reviews/pr-vision/2026-06-14-ee4371d9163f992f60e09c7e4ac6cf8cd1d3c5eb.md Agent-Session: pr-vision admin v0.2.0 merge
This commit is contained in:
@@ -1,13 +1,18 @@
|
||||
<?php
|
||||
/**
|
||||
* PR Vision — full data teardown on uninstall.
|
||||
* 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.
|
||||
* v0.2.0 additions: prv_models_schema_version, prv_config_versions,
|
||||
* prv_active_config_version, prv_api_key_status, prv_api_key_last_check,
|
||||
* prv_last_run_at, prv_last_run_counts, prv_last_run_truncated,
|
||||
* prv_last_run_truncated_at -- all purged by the prv_ wildcard DELETE below.
|
||||
*
|
||||
* @see ARCHITECTURE.md -- Section Uninstall specification.
|
||||
* @see class-prv-deactivator.php -- Clears cron on deactivation.
|
||||
* @package PrVision
|
||||
*/
|
||||
|
||||
@@ -23,13 +28,20 @@ $table = $wpdb->prefix . 'prv_ai_visibility';
|
||||
// phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.SchemaChange, WordPress.DB.PreparedSQL.InterpolatedNotPrepared, WordPress.DB.DirectDatabaseQuery.NoCaching
|
||||
$wpdb->query( "DROP TABLE IF EXISTS {$table}" );
|
||||
|
||||
/* ── 2. Delete all prv_ prefixed options ──────────────────────────── */
|
||||
/* ── 2. Delete all prv_ prefixed options (covers v0.1 + v0.2 keys) ── */
|
||||
|
||||
// phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching
|
||||
$wpdb->query(
|
||||
"DELETE FROM {$wpdb->options} WHERE option_name LIKE 'prv\_%'"
|
||||
);
|
||||
|
||||
/* ── 3. Clear any remaining scheduled cron events ─────────────────── */
|
||||
/* ── 3. Delete prv_ transients ────────────────────────────────────── */
|
||||
|
||||
// phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching
|
||||
$wpdb->query(
|
||||
"DELETE FROM {$wpdb->options} WHERE option_name LIKE '_transient_prv\_%' OR option_name LIKE '_transient_timeout_prv\_%'"
|
||||
);
|
||||
|
||||
/* ── 4. Clear any remaining scheduled cron events ─────────────────── */
|
||||
|
||||
wp_clear_scheduled_hook( 'prv_weekly_probe' );
|
||||
|
||||
Reference in New Issue
Block a user