@@ -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 |
@@ -4,7 +4,7 @@ |
||
| 4 | 4 | |
| 5 | 5 | require_once __DIR__.'/site-reviews.php'; |
| 6 | 6 | |
| 7 | -if( !(new GL_Plugin_Check_v3( __FILE__, array( 'wordpress' => '4.7.0' )))->isValid() )return; |
|
| 7 | +if( !(new GL_Plugin_Check_v3( __FILE__, array( 'wordpress' => '4.7.0' ) ))->isValid() )return; |
|
| 8 | 8 | |
| 9 | 9 | delete_option( GeminiLabs\SiteReviews\Database\OptionManager::databaseKey() ); |
| 10 | 10 | delete_option( 'widget_'.glsr()->id.'_site-reviews' ); |
@@ -4,7 +4,9 @@ |
||
| 4 | 4 | |
| 5 | 5 | require_once __DIR__.'/site-reviews.php'; |
| 6 | 6 | |
| 7 | -if( !(new GL_Plugin_Check_v3( __FILE__, array( 'wordpress' => '4.7.0' )))->isValid() )return; |
|
| 7 | +if( !(new GL_Plugin_Check_v3( __FILE__, array( 'wordpress' => '4.7.0' )))->isValid() ) { |
|
| 8 | + return; |
|
| 9 | +} |
|
| 8 | 10 | |
| 9 | 11 | delete_option( GeminiLabs\SiteReviews\Database\OptionManager::databaseKey() ); |
| 10 | 12 | delete_option( 'widget_'.glsr()->id.'_site-reviews' ); |
@@ -18,15 +18,15 @@ |
||
| 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 | -if( (new GL_Plugin_Check_v3( __FILE__, array( 'wordpress' => '4.7.0' )))->shouldDeactivate() )return; |
|
| 24 | +if( (new GL_Plugin_Check_v3( __FILE__, array( 'wordpress' => '4.7.0' ) ))->shouldDeactivate() )return; |
|
| 25 | 25 | require_once __DIR__.'/autoload.php'; |
| 26 | 26 | require_once __DIR__.'/helpers.php'; |
| 27 | 27 | |
| 28 | 28 | $app = new GeminiLabs\SiteReviews\Application; |
| 29 | 29 | $app->make( 'Provider' )->register( $app ); |
| 30 | -register_activation_hook( __FILE__, array( $app, 'activate' )); |
|
| 31 | -register_deactivation_hook( __FILE__, array( $app, 'deactivate' )); |
|
| 30 | +register_activation_hook( __FILE__, array( $app, 'activate' ) ); |
|
| 31 | +register_deactivation_hook( __FILE__, array( $app, 'deactivate' ) ); |
|
| 32 | 32 | $app->init(); |
@@ -21,7 +21,9 @@ |
||
| 21 | 21 | if( !class_exists( 'GL_Plugin_Check_v3' )) { |
| 22 | 22 | require_once __DIR__.'/activate.php'; |
| 23 | 23 | } |
| 24 | -if( (new GL_Plugin_Check_v3( __FILE__, array( 'wordpress' => '4.7.0' )))->shouldDeactivate() )return; |
|
| 24 | +if( (new GL_Plugin_Check_v3( __FILE__, array( 'wordpress' => '4.7.0' )))->shouldDeactivate() ) { |
|
| 25 | + return; |
|
| 26 | +} |
|
| 25 | 27 | require_once __DIR__.'/autoload.php'; |
| 26 | 28 | require_once __DIR__.'/helpers.php'; |
| 27 | 29 | |