Skip to content

Commit

Permalink
Merge pull request #1 from nlemoine/fix-accepted-args
Browse files Browse the repository at this point in the history
Fix $acceptedArgs when passing arguments to add_filter/add_action
  • Loading branch information
gmazzap authored Jan 8, 2024
2 parents 3f48ef2 + 93a0ee3 commit c5bd265
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 c5bd265

Please sign in to comment.