feat: ship Peptide Reconstitution Calculator v1.0.0
Interactive reconstitution calculator with peptide-specific presets. Core features: - [prc_calculator] shortcode with instant client-side math - Concentration (mg/mL), mcg/unit, injection volume, syringe units, doses/vial - Live presets from PR Core dosing data (graceful fallback to 8 defaults) - REST API (prc/v1): presets list/detail + server-side calculate - Transient-cached presets with event-driven invalidation - Dark mode + responsive design (320px+) - Full teardown in uninstall.php 12 PHP files (max 241 lines), 1 JS file, 1 CSS file. CI: PHP lint 8.1-8.3, PHPCS WordPress, 300-line check. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
27
includes/class-prc-deactivator.php
Normal file
27
includes/class-prc-deactivator.php
Normal file
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
/**
|
||||
* Deactivation handler.
|
||||
*
|
||||
* What: Runs on plugin deactivation — flushes rewrite rules.
|
||||
* Who calls it: register_deactivation_hook in bootstrap.
|
||||
* Dependencies: None.
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/**
|
||||
* Handles plugin deactivation tasks.
|
||||
*/
|
||||
class PRC_Deactivator {
|
||||
|
||||
/**
|
||||
* Run deactivation tasks.
|
||||
*
|
||||
* Flushes rewrite rules to remove any routes this plugin registered.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public static function deactivate(): void {
|
||||
flush_rewrite_rules();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user