PluginProbe
AI / trunk
AI vtrunk
1.3.0 1.2.0 1.1.0 1.0.2 1.0.1 1.0.0 0.9.0 trunk 0.1.1 0.2.0 0.2.1 0.3.0 0.3.1 0.4.0 0.4.1 0.5.0 0.6.0 0.7.0 0.8.0
ai / includes / Admin / Activation.php

Activation.php in AI trunk, at includes/Admin/Activation.php

39 lines 694 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Runs on plugin activation.
4 *
5 * @package WordPress\AI\Admin
6 * @since 0.6.0
7 */
8
9 declare( strict_types=1 );
10
11 namespace WordPress\AI\Admin;
12
13 use WordPress\AI\Experiments\Key_Encryption\Key_Encryption;
14
15 // Exit if accessed directly.
16 defined( 'ABSPATH' ) || exit;
17
18 /**
19 * Class - Activation.
20 *
21 * @internal
22 *
23 * @since 0.6.0
24 */
25 final class Activation {
26 /**
27 * Runs on plugin activation.
28 *
29 * @since 0.6.0
30 */
31 public static function activation_callback(): void {
32 // Check and run any pending upgrades.
33 Upgrades::do_upgrades();
34
35 // Schedule the Key Encryption experiment to re-encrypt plaintext keys on the next request.
36 Key_Encryption::flag_resume_migration();
37 }
38 }
39