What is the difference between an action and a filter?

Share on facebook
Share on twitter
Share on linkedin
Share on pinterest
  • Actions are used to add custom functions and remove WordPress functions. Filters are used to make strings translatable for localization.
  • Actions are used to add or remove code at runtime. Filters are used to modify data before it is either displayed in the browser or saved to the database.
  • Actions are used to assign values to variables at runtime. Filters are used to extract data from actions and display it in the browser.
  • Actions are used to add user-inputted data to the database. Filters are used to validate user-inputted data prior to adding it to the database.
0/5 (0 Reviews)

Like this article?

Share on facebook
Share on twitter
Share on linkedin
Share on pinterest

Related Posts