Total Complexity | 6 |
Total Lines | 34 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
6 | class MonsterInsights_Welcome { |
||
7 | |||
8 | /** |
||
9 | * MonsterInsights_Welcome constructor. |
||
10 | */ |
||
11 | public function __construct() { |
||
12 | |||
13 | add_action( 'admin_init', array( $this, 'maybe_redirect' ), 9999 ); |
||
14 | |||
15 | } |
||
16 | |||
17 | /** |
||
18 | * Check if we should do any redirect. |
||
19 | */ |
||
20 | public function maybe_redirect() { |
||
40 | } |
||
41 | } |
||
45 |
In general, usage of exit should be done with care and only when running in a scripting context like a CLI script.