@@ -11,7 +11,9 @@ discard block |
||
| 11 | 11 | */ |
| 12 | 12 | |
| 13 | 13 | // disable executing this script directly |
| 14 | -if(!defined('ABSPATH')) exit;
|
|
| 14 | +if(!defined('ABSPATH')) { |
|
| 15 | + exit; |
|
| 16 | +} |
|
| 15 | 17 | |
| 16 | 18 | if(!class_exists('AUTO_MAINTENANCE_MODE'))
|
| 17 | 19 | {
|
@@ -55,11 +57,15 @@ discard block |
||
| 55 | 57 | } |
| 56 | 58 | function plugin_url() |
| 57 | 59 | {
|
| 58 | - if($this->plugin_url) return $this->plugin_url; |
|
| 60 | + if($this->plugin_url) { |
|
| 61 | + return $this->plugin_url; |
|
| 62 | + } |
|
| 59 | 63 | return $this->plugin_url = plugins_url( basename( plugin_dir_path(__FILE__) ), basename( __FILE__ ) ); |
| 60 | 64 | } |
| 61 | 65 | function plugin_path(){
|
| 62 | - if ( $this->plugin_path ) return $this->plugin_path; |
|
| 66 | + if ( $this->plugin_path ) { |
|
| 67 | + return $this->plugin_path; |
|
| 68 | + } |
|
| 63 | 69 | return $this->plugin_path = untrailingslashit( plugin_dir_path( __FILE__ ) ); |
| 64 | 70 | } |
| 65 | 71 | function is_valid_page() {
|
@@ -70,8 +76,7 @@ discard block |
||
| 70 | 76 | if(is_user_logged_in()){
|
| 71 | 77 | //do not display maintenance page |
| 72 | 78 | // $this->amm_create_transient_on_login(); |
| 73 | - } |
|
| 74 | - else |
|
| 79 | + } else |
|
| 75 | 80 | {
|
| 76 | 81 | if( !is_admin() && !$this->is_valid_page()){ //show maintenance page
|
| 77 | 82 | if ( false === ( $tmp_value = get_transient( 'amm_is_any_user_logged_in' ) ) ) {
|
@@ -9,7 +9,10 @@ |
||
| 9 | 9 | * License: GPL |
| 10 | 10 | */ |
| 11 | 11 | |
| 12 | -if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly |
|
| 12 | +if ( ! defined( 'ABSPATH' ) ) { |
|
| 13 | + exit; |
|
| 14 | +} |
|
| 15 | +// Exit if accessed directly |
|
| 13 | 16 | |
| 14 | 17 | // directly from https://wordpress.org/plugins/disable-emojis/ |
| 15 | 18 | |