[ad_1]
[ad_2]
I understand they have their purposes, but why do they work interchangeably?
Shouldn't actions like 'wp_login' be excluded from being used in add_filter()?
Are these two functions essentially an alias of one function?
Copyright © 2020 - 2022, Project DMC - WordPress Tutorials for Beginners- All Rights Reserved. Privacy Policy
Asked recently: [https://new.reddit.com/r/Wordpress/comments/1epdhsp/whats_the_difference_between_filters_and_actions/](https://new.reddit.com/r/Wordpress/comments/1epdhsp/whats_the_difference_between_filters_and_actions/)
function add_action( $hook_name, $callback, $priority = 10, $accepted_args = 1 ) {
return add_filter( $hook_name, $callback, $priority, $accepted_args );
}