From 93a0ee36825a5c9c7f2f4a67a4e43aa52b47a7c8 Mon Sep 17 00:00:00 2001 From: Nicolas Lemoine Date: Thu, 14 Dec 2023 10:12:50 +0100 Subject: [PATCH] Fix $acceptedArgs when passing arguments to add_filter/add_action --- wordpress-early-hook.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wordpress-early-hook.php b/wordpress-early-hook.php index fbbda12..671102e 100644 --- a/wordpress-early-hook.php +++ b/wordpress-early-hook.php @@ -52,8 +52,8 @@ function earlyAddHook( } return $isFilter - ? add_filter($hook, $callback, $priority) - : add_action($hook, $callback, $priority); + ? add_filter($hook, $callback, $priority, $acceptedArgs) + : add_action($hook, $callback, $priority, $acceptedArgs); } /** * If here, this function is called very early, probably _too_ early,