galway_lite_show_hide_notice() ){ if( is_multisite() ){ add_action( 'network_admin_notices',array( $this,'galway_lite_admin_notiece' ) ); } else { add_action( 'admin_notices',array( $this,'galway_lite_admin_notiece' ) ); } } add_action( 'wp_ajax_galway_lite_notice_dismiss', array( $this, 'galway_lite_notice_dismiss' ) ); add_action( 'switch_theme', array( $this, 'galway_lite_notice_clear_cache' ) ); } public static function galway_lite_show_hide_notice( $status = false ){ if( $status ){ if( (class_exists( 'Booster_Extension_Class' ) ) || get_option('twp_galway_lite_admin_notice') ){ return false; }else{ return true; } } // Check If current Page if ( isset( $_GET['page'] ) && $_GET['page'] == 'galway-lite-about' ) { return false; } // Hide if dismiss notice if( get_option('twp_galway_lite_admin_notice') ){ return false; } // Hide if all plugin active if ( class_exists( 'Booster_Extension_Class' ) ) { return false; } // Hide On TGMPA pages if ( ! empty( $_GET['tgmpa-nonce'] ) ) { return false; } // Hide if user can't access if ( current_user_can( 'manage_options' ) ) { return true; } } // Define Global Value public static function galway_lite_admin_notiece(){ ?>