@@ -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__ ))->canProceed() )return; |
|
| 24 | +if( !(new GL_Plugin_Check_v3( __FILE__ ))->canProceed() ) { |
|
| 25 | + return; |
|
| 26 | +} |
|
| 25 | 27 | require_once __DIR__.'/autoload.php'; |
| 26 | 28 | require_once __DIR__.'/compatibility.php'; |
| 27 | 29 | require_once __DIR__.'/helpers.php'; |
@@ -16,7 +16,9 @@ discard block |
||
| 16 | 16 | public function routeAdminPostRequest() |
| 17 | 17 | { |
| 18 | 18 | $request = $this->getRequest(); |
| 19 | - if( !$this->isValidPostRequest( $request ))return; |
|
| 19 | + if( !$this->isValidPostRequest( $request )) { |
|
| 20 | + return; |
|
| 21 | + } |
|
| 20 | 22 | check_admin_referer( $request['action'] ); |
| 21 | 23 | $this->routeRequest( 'admin', $request['action'], $request ); |
| 22 | 24 | } |
@@ -38,10 +40,16 @@ discard block |
||
| 38 | 40 | */ |
| 39 | 41 | public function routePublicPostRequest() |
| 40 | 42 | { |
| 41 | - if( is_admin() )return; |
|
| 43 | + if( is_admin() ) { |
|
| 44 | + return; |
|
| 45 | + } |
|
| 42 | 46 | $request = $this->getRequest(); |
| 43 | - if( !$this->isValidPostRequest( $request ))return; |
|
| 44 | - if( !$this->isValidPublicNonce( $request ))return; |
|
| 47 | + if( !$this->isValidPostRequest( $request )) { |
|
| 48 | + return; |
|
| 49 | + } |
|
| 50 | + if( !$this->isValidPublicNonce( $request )) { |
|
| 51 | + return; |
|
| 52 | + } |
|
| 45 | 53 | $this->routeRequest( 'public', $request['action'], $request ); |
| 46 | 54 | } |
| 47 | 55 | |
@@ -50,7 +58,9 @@ discard block |
||
| 50 | 58 | */ |
| 51 | 59 | protected function checkAjaxNonce( array $request ) |
| 52 | 60 | { |
| 53 | - if( !is_user_logged_in() )return; |
|
| 61 | + if( !is_user_logged_in() ) { |
|
| 62 | + return; |
|
| 63 | + } |
|
| 54 | 64 | if( !isset( $request['nonce'] )) { |
| 55 | 65 | $this->sendAjaxError( 'The request is missing a nonce', $request ); |
| 56 | 66 | } |