Skip to content

Commit b86fa97

Browse files
committed
fix: clarify debug comment suppression messages
1 parent 18753eb commit b86fa97

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

wp-cache-phase2.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2210,7 +2210,7 @@ function wp_cache_append_tag( &$buffer ) {
22102210
$msg = "Live page served on $timestamp";
22112211
}
22122212

2213-
// Don't output debug message if we aren't handling a normal HTML response.
2213+
// Don't append debug HTML comments to non-HTML responses (REST, Ajax, etc.).
22142214
if (
22152215
strpos( $buffer, '<html' ) === false ||
22162216
( defined( 'REST_REQUEST' ) && REST_REQUEST ) ||
@@ -2236,7 +2236,7 @@ function wp_cache_add_to_buffer( &$buffer, $text ) {
22362236
return false;
22372237
}
22382238

2239-
// Don't output debug message if we aren't handling a normal HTML response.
2239+
// Don't append debug HTML comments to non-HTML responses (REST, Ajax, etc.).
22402240
if (
22412241
strpos( $buffer, '<html' ) === false ||
22422242
( defined( 'REST_REQUEST' ) && REST_REQUEST ) ||

0 commit comments

Comments
 (0)