-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathActivation.php
More file actions
33 lines (28 loc) · 898 Bytes
/
Activation.php
File metadata and controls
33 lines (28 loc) · 898 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
<?php
namespace GoodWP\Altinator\Migration;
use GoodWP\Altinator\Plugin;
/**
* {@inheritDoc}
*/
class Activation extends \GoodWP\Altinator\Vendor\GoodWP\Common\Plugin\Activation {
/**
* Creates a new activation instance.
*
* @param string $plugin_file The main plugin file. Required for activation hook.
* @param Plugin $plugin The main plugin instance which is being activated.
*/
public function __construct( string $plugin_file, protected Plugin $plugin ) {
parent::__construct( $plugin_file );
}
/**
* {@inheritDoc}
*/
public function run(): void {
/**
* Allows doing something when the plugin is being activated, and after the plugins activation code ran.
*
* @param Plugin $plugin The main plugin instance.
*/
do_action( 'altinator/activation', $this->plugin );
}
}