@@ 50-56 (lines=7) @@ | ||
47 | register_activation_hook( __FILE__, array( 'HMBKP_Setup', 'activate' ) ); |
|
48 | register_deactivation_hook( __FILE__, array( 'HMBKP_Setup', 'deactivate' ) ); |
|
49 | ||
50 | if ( HMBKP_Setup::meets_requirements() ) { |
|
51 | require_once( HMBKP_PLUGIN_PATH . 'classes/class-plugin.php' ); |
|
52 | } else { |
|
53 | add_action( 'admin_init', array( 'HMBKP_Setup', 'self_deactivate' ) ); |
|
54 | add_action( 'all_admin_notices', array( 'HMBKP_Setup', 'display_admin_notices' ) ); |
|
55 | } |
|
56 |
@@ 68-76 (lines=9) @@ | ||
65 | ||
66 | require_once( HMBKP_PLUGIN_PATH . 'classes/class-setup.php' ); |
|
67 | ||
68 | if ( false === \HMBKP_Setup::meets_requirements() ) { |
|
69 | ||
70 | add_action( 'admin_init', array( '\HMBKP_Setup', 'self_deactivate' ) ); |
|
71 | ||
72 | add_action( 'all_admin_notices', array( '\HMBKP_Setup', 'display_admin_notices' ) ); |
|
73 | ||
74 | return true; |
|
75 | ||
76 | } |
|
77 | ||
78 | return false; |
|
79 |