What is the difference between an action and a filter?

Advertisement

  • 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.
Join our list

Subscribe to our mailing list and get interesting stuff and updates to your email inbox.

Thank you for subscribing.

Something went wrong.

Leave a Comment


Share via
Join our list

Subscribe to our mailing list and get interesting stuff and updates to your email inbox.

Thank you for subscribing.

Something went wrong.

Send this to a friend