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>
29 lines
504 B
PHP
29 lines
504 B
PHP
<?php
|
|
/**
|
|
* Activation handler.
|
|
*
|
|
* What: Runs on plugin activation — flushes rewrite rules.
|
|
* Who calls it: register_activation_hook in bootstrap.
|
|
* Dependencies: None.
|
|
*/
|
|
|
|
declare(strict_types=1);
|
|
|
|
/**
|
|
* Handles plugin activation tasks.
|
|
*/
|
|
class PRC_Activator {
|
|
|
|
/**
|
|
* Run activation tasks.
|
|
*
|
|
* Flushes rewrite rules so any new pages using the shortcode
|
|
* are immediately accessible.
|
|
*
|
|
* @return void
|
|
*/
|
|
public static function activate(): void {
|
|
flush_rewrite_rules();
|
|
}
|
|
}
|