Action and Filter Hook in WordPress
Step 4
In the precious session we already learned about the Action Hook and Filter Hook of the word press. In this session we will cover the function used in these hooks with their working.
There are 4 functions in Action and Filter Hook as follow:
Action Hook
- do_action ()
- This function is used to create our own hook
- add_action ()
- This function is used to perform an action like CRUD on do_action.
- remove_function ()
- This function is used to remove any created action of hook
- has_action ()
- This function is used to check that exist or not.
Filter Hook
- apply_filters ()
- add_filter ()
- remove_filter ()
- has_filter ()
these works are same as action hook but remember first function is plural and rest are singular.