@@ -65,7 +65,9 @@ discard block |
||
| 65 | 65 | { |
| 66 | 66 | if( get_current_screen()->id != sprintf( 'settings_page_%s', $this->app->id ) |
| 67 | 67 | || filter_input( INPUT_GET, 'action' ) != 'activate' |
| 68 | - )return; |
|
| 68 | + ) { |
|
| 69 | + return; |
|
| 70 | + } |
|
| 69 | 71 | $plugin = filter_input( INPUT_GET, 'plugin' ); |
| 70 | 72 | check_admin_referer( 'activate-plugin_' . $plugin ); |
| 71 | 73 | $result = activate_plugin( $plugin, null, is_network_admin(), true ); |
@@ -140,7 +142,9 @@ discard block |
||
| 140 | 142 | public function hasPendingDependencies() |
| 141 | 143 | { |
| 142 | 144 | foreach( static::DEPENDENCIES as $plugin => $data ) { |
| 143 | - if( !$this->isPluginDependency( $plugin ))continue; |
|
| 145 | + if( !$this->isPluginDependency( $plugin )) { |
|
| 146 | + continue; |
|
| 147 | + } |
|
| 144 | 148 | $this->isPluginActive( $plugin ); |
| 145 | 149 | $this->isPluginVersionValid( $plugin ); |
| 146 | 150 | } |
@@ -236,7 +240,9 @@ discard block |
||
| 236 | 240 | if( get_current_screen()->id != 'settings_page_pollux' |
| 237 | 241 | || $this->app->config->disable_config |
| 238 | 242 | || !$this->hasPendingDependencies() |
| 239 | - )return; |
|
| 243 | + ) { |
|
| 244 | + return; |
|
| 245 | + } |
|
| 240 | 246 | $message = sprintf( '<strong>%s:</strong> %s', |
| 241 | 247 | __( 'Pollux requires the latest version of the following plugins', 'pollux' ), |
| 242 | 248 | $this->getDependencyLinks() |
@@ -321,7 +327,8 @@ discard block |
||
| 321 | 327 | */ |
| 322 | 328 | protected function getDependencyLinks() |
| 323 | 329 | { |
| 324 | - return array_reduce( array_keys( $this->errors ), function( $carry, $plugin ) { |
|
| 330 | + return array_reduce( array_keys( $this->errors ), function( $carry, $plugin ) |
|
| 331 | + { |
|
| 325 | 332 | return $carry . $this->getPluginLink( $plugin ); |
| 326 | 333 | }); |
| 327 | 334 | } |