From 61762b569167b1939e13b6240381ebad8dcecf59 Mon Sep 17 00:00:00 2001 From: Chandra Patel Date: Wed, 18 Dec 2019 21:13:11 +0530 Subject: [PATCH] Don't add Nginx timestamp on WP login page --- admin/class-nginx-helper-admin.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/admin/class-nginx-helper-admin.php b/admin/class-nginx-helper-admin.php index 2ba4ecfd..2ef8571d 100644 --- a/admin/class-nginx-helper-admin.php +++ b/admin/class-nginx-helper-admin.php @@ -421,10 +421,16 @@ public function nginx_helper_get_feeds() { */ public function add_timestamps() { + global $pagenow; + if ( is_admin() || (int) $this->options['enable_purge'] !== 1 || (int) $this->options['enable_stamp'] !== 1 ) { return; } + if ( ! empty( $pagenow ) && 'wp-login.php' === $pagenow ) { + return; + } + foreach ( headers_list() as $header ) { list( $key, $value ) = explode( ':', $header, 2 ); $key = strtolower( $key );