Passing Parameters to Functions via Action Hooks

If you are using WordPress action hooks and want to pass some parameters to the function being called, this is the way to do it:
do_action( ‘name-of-action’, $arg1, $arg2 );
For example:
If you enjoyed this post, make sure to subscribe to WP Mayor’s RSS feed.

About Jean Galea

Jean Galea is a WordPress developer, entrepreneur and padel player. He is the founder of WP Mayor, the plugins WP RSS Aggregator and EDD Bookings, as well as the podcast. His personal blog can be found at

Related Articles

Leave a Reply