I am developing custom registration form. Is it possible to get current action (comment adding or user registration) in function? For example i am using:
add_filter('preprocess_comment', 'checkQuestion');
add_filter('registration_errors', 'checkQuestion', 10, 3);
So, from function checkQuestion
i need somehow to know from what action it was called?
2 Answers
You can simply use current_filter()
WordPress function.
http://codex.wordpress.org/Function_Reference/current_filter