Files
peptide-repo-core/includes/class-pr-core-deactivator.php
peptiderepo 665d7fa9e1 Adopt reusable CI standard + PHPUnit conversion (#22)
Squash-merge of PR #22: adopt shared reusable CI workflow, convert PHPUnit to stubs, update branch-protection contexts.

QA-approved at 05d8094a1d. All required CI checks green.

Agent-Session: 2026-06-17-prcore-ci-deploy
2026-06-17 01:12:00 +07:00

43 lines
893 B
PHP

<?php
/**
* Deactivator.
*
* @package Peptide_Repo_Core
*/
declare(strict_types=1);
/**
* Flushes rewrite rules on deactivation (data preserved)
*
* @package Peptide_Repo_Core
*/
/**
* Plugin deactivation handler.
*
* What: Flushes rewrite rules on deactivation (data preserved).
* Who calls it: register_deactivation_hook() in peptide-repo-core.php.
* Dependencies: None.
*
* @see peptide-repo-core.php — Registers this class on deactivation.
* @see uninstall.php — Full data teardown happens on uninstall, not deactivation.
*/
class PR_Core_Deactivator {
/**
* Run on plugin deactivation.
*
* Side effects: flushes rewrite rules.
*
* @return void
*/
public static function deactivate(): void {
// Clear verification scan cron.
wp_clear_scheduled_hook( 'pr_core_verification_scan' );
// Flush rewrite rules.
flush_rewrite_rules();
}
}