Skip to content

Commit 21466e7

Browse files
committed
Fix debug-profiling
1 parent 90eb2ef commit 21466e7

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

debug/debug-profiling.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ static function ($hook) {
1313
static function () use ($hook) {
1414
if (
1515
php_sapi_name() === 'cli'
16-
|| (did_action('parse_query') > 0 && is_robots())
1716
|| wp_doing_cron()
1817
|| wp_doing_ajax()
1918
|| wp_is_json_request()
@@ -26,6 +25,9 @@ static function () use ($hook) {
2625
add_action(
2726
'shutdown',
2827
static function () use ($hook, $time, $mem) {
28+
if (is_robots()) {
29+
return;
30+
}
2931
printf(
3032
'%c<!-- Profiling: [%.03f] %s - mem %d MB -->',
3133
10,

0 commit comments

Comments
 (0)