@@ -76,8 +76,8 @@ discard block |
||
76 | 76 | public function shouldDeactivate() |
77 | 77 | { |
78 | 78 | if( !$this->isValid() ) { |
79 | - add_action( 'activated_plugin', array( $this, 'deactivate' )); |
|
80 | - add_action( 'admin_notices', array( $this, 'deactivate' )); |
|
79 | + add_action( 'activated_plugin', array( $this, 'deactivate' ) ); |
|
80 | + add_action( 'admin_notices', array( $this, 'deactivate' ) ); |
|
81 | 81 | return true; |
82 | 82 | } |
83 | 83 | return false; |
@@ -91,7 +91,7 @@ discard block |
||
91 | 91 | return wp_parse_args( $args, array( |
92 | 92 | 'php' => static::MIN_PHP_VERSION, |
93 | 93 | 'wordpress' => static::MIN_WORDPRESS_VERSION, |
94 | - )); |
|
94 | + ) ); |
|
95 | 95 | } |
96 | 96 | |
97 | 97 | /** |
@@ -119,7 +119,7 @@ discard block |
||
119 | 119 | filter_input( INPUT_GET, 'plugin_status' ), |
120 | 120 | filter_input( INPUT_GET, 'paged' ), |
121 | 121 | filter_input( INPUT_GET, 's' ) |
122 | - ))); |
|
122 | + ) ) ); |
|
123 | 123 | exit; |
124 | 124 | } |
125 | 125 |
@@ -60,7 +60,9 @@ |
||
60 | 60 | */ |
61 | 61 | public function deactivate( $plugin ) |
62 | 62 | { |
63 | - if( $this->isValid() )return; |
|
63 | + if( $this->isValid() ) { |
|
64 | + return; |
|
65 | + } |
|
64 | 66 | $pluginSlug = plugin_basename( $this->file ); |
65 | 67 | if( $plugin == $pluginSlug ) { |
66 | 68 | $this->redirect(); //exit |
@@ -18,18 +18,18 @@ |
||
18 | 18 | |
19 | 19 | defined( 'WPINC' ) || die; |
20 | 20 | |
21 | -if( !class_exists( 'GL_Plugin_Check_v3' )) { |
|
21 | +if( !class_exists( 'GL_Plugin_Check_v3' ) ) { |
|
22 | 22 | require_once __DIR__.'/activate.php'; |
23 | 23 | } |
24 | 24 | // @fix fix the bouncer to work if multiple instances exist |
25 | 25 | // $bouncer = new GL_Plugin_Check_v3( __FILE__, array( 'wordpress' => '4.7.0' )); |
26 | -$pluginCheck = new GL_Plugin_Check_v3( __FILE__, array( 'wordpress' => '4.7.0' )); |
|
26 | +$pluginCheck = new GL_Plugin_Check_v3( __FILE__, array( 'wordpress' => '4.7.0' ) ); |
|
27 | 27 | if( !$pluginCheck->shouldDeactivate() )return; |
28 | 28 | require_once __DIR__.'/autoload.php'; |
29 | 29 | require_once __DIR__.'/helpers.php'; |
30 | 30 | |
31 | 31 | $app = new GeminiLabs\SiteReviews\Application; |
32 | 32 | $app->make( 'Provider' )->register( $app ); |
33 | -register_activation_hook( __FILE__, array( $app, 'activate' )); |
|
34 | -register_deactivation_hook( __FILE__, array( $app, 'deactivate' )); |
|
33 | +register_activation_hook( __FILE__, array( $app, 'activate' ) ); |
|
34 | +register_deactivation_hook( __FILE__, array( $app, 'deactivate' ) ); |
|
35 | 35 | $app->init(); |
@@ -24,7 +24,9 @@ |
||
24 | 24 | // @fix fix the bouncer to work if multiple instances exist |
25 | 25 | // $bouncer = new GL_Plugin_Check_v3( __FILE__, array( 'wordpress' => '4.7.0' )); |
26 | 26 | $pluginCheck = new GL_Plugin_Check_v3( __FILE__, array( 'wordpress' => '4.7.0' )); |
27 | -if( !$pluginCheck->shouldDeactivate() )return; |
|
27 | +if( !$pluginCheck->shouldDeactivate() ) { |
|
28 | + return; |
|
29 | +} |
|
28 | 30 | require_once __DIR__.'/autoload.php'; |
29 | 31 | require_once __DIR__.'/helpers.php'; |
30 | 32 |