Possible to send variables to function via add_action?
-
Is it possible to pass extra variables to a function like:
somefunction($post_ID, $other_var) {
}add_action(‘publish_post’, ‘somefunction($post_ID, $some_var)’);
I’ve tried all sorts of iterations, with and without the accepted_args parameter and get nothing.
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Possible to send variables to function via add_action?’ is closed to new replies.