The question I often get is:
If I only need a couple of the arguments that a filter or action makes available, do I have to specify all of them in the callback function for add_filter()
and add_action()
.
For example, if a filter, such as shortcode_atts_{$shortcode}
has 4 arguments, but I only need 3, do I have to wire it up for all 4? In this video, Tonya explains why you have control over what you want to receive by looking into WordPress core at apply_filters()
.
Did you learn something new? Share your thoughts.