Tutorial by Examples

The most basic application of add_action() is to add custom code to be executed at a certain location in a WordPress installation's source-code - either using actions supplied by the Core of WordPress, or ones created by third-party code such as plugins and themes. To add content to the <head&g...
Any number of functions may be "hooked" to any given action. In some instances it is important for a hooked function to execute before or after others, which is where the third parameter to add_action(), $priority comes into play. If the $priority argument is omitted, the function will be...
PHP Classes are powerful tool for improving code organization and minimizing naming collisions. At some point or another, the question of how to create an action hook for a class method inevitably arises. The $function_to_add argument is often shown as a string containing the function's name, howev...

Page 1 of 1