| @@ -1,8 +1,9 @@ | ||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | 3 | class Boxzilla_PHP_Fallback { |
| 4 | 4 | |
| 5 | + | |
| 5 | 6 | /** |
| 6 | 7 | * @var string |
| 7 | 8 | */ |
| 8 | 9 | private $plugin_name = ''; |
| @@ -16,9 +17,8 @@ | ||
| 16 | 17 | * @param $plugin_name |
| 17 | 18 | * @param $plugin_file |
| 18 | 19 | */ |
| 19 | 20 | public function __construct( $plugin_name, $plugin_file ) { |
| 20 | - | |
| 21 | 21 | $this->plugin_name = $plugin_name; |
| 22 | 22 | $this->plugin_file = $plugin_file; |
| 23 | 23 | |
| 24 | 24 | // deactivate plugin straight away |
| @@ -28,9 +28,9 @@ | ||
| 28 | 28 | /** |
| 29 | 29 | * @return bool |
| 30 | 30 | */ |
| 31 | 31 | public function deactivate_self() { |
| 32 | - if( ! current_user_can( 'activate_plugins' ) ) { | |
| 32 | + if ( ! current_user_can( 'activate_plugins' ) ) { | |
| 33 | 33 | return false; |
| 34 | 34 | } |
| 35 | 35 | |
| 36 | 36 | // deactivate self |
| @@ -36,9 +36,9 @@ | ||
| 36 | 36 | // deactivate self |
| 37 | 37 | deactivate_plugins( $this->plugin_file ); |
| 38 | 38 | |
| 39 | 39 | // get rid of "Plugin activated" notice |
| 40 | - if( isset( $_GET['activate'] ) ) { | |
| 40 | + if ( isset( $_GET['activate'] ) ) { | |
| 41 | 41 | unset( $_GET['activate'] ); |
| 42 | 42 | } |
| 43 | 43 | |
| 44 | 44 | // show notice to user |
| @@ -57,6 +57,5 @@ | ||
| 57 | 57 | <p><?php printf( '<a href="%s">Updating your PHP version</a> makes your site faster, more secure and should be easy for your host.', 'http://www.wpupdatephp.com/update/#utm_source=wp-plugin&utm_medium=boxzillas&utm_campaign=activation-notice' ); ?></p> |
| 58 | 58 | </div> |
| 59 | 59 | <?php |
| 60 | 60 | } |
| 61 | - | |
| 62 | 61 | } |