| @@ 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 | ||
| @@ 76-84 (lines=9) @@ | ||
| 73 | ||
| 74 | require_once( HMBKP_PLUGIN_PATH . 'classes/class-setup.php' ); |
|
| 75 | ||
| 76 | if ( false === \HMBKP_Setup::meets_requirements() ) { |
|
| 77 | ||
| 78 | add_action( 'admin_init', array( '\HMBKP_Setup', 'self_deactivate' ) ); |
|
| 79 | ||
| 80 | add_action( 'all_admin_notices', array( '\HMBKP_Setup', 'display_admin_notices' ) ); |
|
| 81 | ||
| 82 | return true; |
|
| 83 | ||
| 84 | } |
|
| 85 | ||
| 86 | return false; |
|
| 87 | ||