5. Action Hooks
• Used to stick a new function
• Add or remove elements
• Launches when specific events occur such as
publishing a post, changing themes, or displaying a
page of the admin panel.
• do_action( "hook_name" )
Filter Hooks
• Replaces or changes an existing function
• Change how elements are presented
• Launches to modify text of various types before
adding it to the database or sending it to the
browser screen.
• apply_filters( "hook_name", "what_to_filter" )
Arguably the base of WordPress development, forming a large part of the core functionalityA “hook” is just place holders or a certain location in the WordPress code which allows you to attach or run your own code and execute your own functions.No change in core WordPress code.Changes will not be lost on WordPress update.