How plugins work
WordPress has designated areas that developers can leverage within their plugin; these areas are rightfully named Hooks. Currently, the two types of hooks available are Actions and Filters.
An Action is a hook that's triggered during common blogging events such as creating a post or deleting a comment. For example, the publish_post
action is triggered whenever a post is finally published. Similarly, the wp_insert_comment
is fired each time a website visitor leaves a comment.
A Filter, like an Action, is a hook that plugin developers use to modify various types of data before it's added to your database or displaying it to the end user. For example, the the_content
filter is applied whenever your blog renders a "Posts" content. ...
Get WordPress Top Plugins now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.