Home Action

    Action

    586

    In WordPress; an Action is a PHP function that is executed at specific points throughout the WordPress Core.

    Developers can create a Custom Action using the Action API to add or remove code from an existing Action by specifying any existing Hook. This process is called “hooking“.

    For example, A developer may want to add code to the footer of a Theme. This could be accomplished by writing a new function, then Hooking it to the wp_footer Action.

    Custom Actions differ from custom Filters because custom Actions allow you to add or remove code from existing Actions. Whereas custom Filters allow you to replace specific data (such as a variable) found within an existing Action.