Skip to content

Commit

Permalink
Fix $acceptedArgs when passing arguments to add_filter/add_action
Browse files Browse the repository at this point in the history
  • Loading branch information
nlemoine authored Dec 14, 2023
1 parent 3f48ef2 commit 93a0ee3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions wordpress-early-hook.php
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 93a0ee3

Please sign in to comment.