From 091e94b53e71837f5ff3191b7853d8eec4062aa7 Mon Sep 17 00:00:00 2001 From: Daniel Bachhuber Date: Fri, 26 Aug 2016 09:06:49 -0700 Subject: [PATCH] Count all hook calls, regardless of whether we're in a current hook --- inc/class-logger.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inc/class-logger.php b/inc/class-logger.php index 64f30ec..d48eb9c 100644 --- a/inc/class-logger.php +++ b/inc/class-logger.php @@ -69,11 +69,11 @@ class Logger { * Start this logger's hook timer */ public function start_hook_timer() { + $this->hooks['count']++; // Timer already running means a subhook has been called if ( ! is_null( $this->hook_start_time ) ) { $this->hook_depth++; } else { - $this->hooks['count']++; $this->hook_start_time = microtime( true ); } }