Question: what is the difference between action and filter in wordpress?
Answer: WordPress filters have the same idea as actions, but the main difference is that filters are used to modify variables. Unlike actions, filters code must return a value, which is the modified copy of the original value. For example, when WordPress display the title of each post.