Popular action hooks in WordPress
Popular action hooks in WordPress
Some of the more common Action hooks are:
- publish_post: Triggered when a new post is published.
- create_category: Triggered when a new category is created.
- switch_theme: Triggered when you switch themes.
- admin_head: Triggered in the <head> section of the admin dashboard.
- wp_head: Triggered in the <head> section of your theme.
- wp_footer: Triggered in the footer section of your theme usually directly before the </body>tag.
- init: Triggered after WordPress has finished loading, but before any headers are sent. A good place to intercept $_GET and $_POST HTML requests
- admin_init: Same as init but only runs on admin dashboard pages.
- user_register: Triggered when a new user is created.
- comment_post: Triggered when a new comment is created.

Post a Comment