WordPress hooks are predefined functions that provide the facility of attaching your custom php code to wordpress. You can change or modify the default behavior wordpress using Hooks. Custom functions are applied into action hooks or filter hooks.

There are two types of wordpress Hooks.

1: Action hooks

2: Filter hooks


wordpress hooks

Action hooks are functions preformed when an event occure. for example if you want to perform an action to remove tool menu from wordpress dashboard , you can apply your custom function wtih predefined action admin_menu with add_action() function.



filter hooks are used to modify the data and return the updated copy of original data. Filter hooks filter your data before displaying on front end or saving on database. for instance, if you want to modify the title of your blog posts, you can associate your function with the_title filter into add_filter() function.



For more details you can visit wordpress codex