Comprehensive List of WordPress Action Hooks

For WordPress Plugin and Theme Developers by Plugin Developer

This contains all the available action hooks (documented as well as undocumented) for WordPress plugin and theme developers. All available documentation on these hooks have been updated from WordPress Codex.

Source file and line number information is provided to allow you to find more details about the hook. Please maximize your browser for better display.

Note: You may also want to refer WordPress 2.x Filters - Comprehensive List for Plugin and Theme Developers.

No. Action Source File Line
No.
Comments
1 wp_logout wp-login.php 25  
2 lost_password wp-login.php 38  
3 retreive_password wp-login.php 100  
4 retrieve_password wp-login.php 101  
5 password_reset wp-login.php 137  
6 wp_authenticate wp-login.php 189  
7 wp_login wp-login.php 201  
8 rss_head wp-rss.php 22  
9 rss_item wp-rss.php 33  
10 template_redirect wp-includes\template-loader.php 3

No
parameter. Executes before the determination of the template file to be used to display
the requested page. Useful for providing additional templates based on request criteria.
Example (pedagogical, not useful): Redirect all requests to the all.php template file
in the current themes' directory.

function all_on_one () {
    include(TEMPLATEPATH
. '/all.php');
    exit;
}
add_action('template_redirect',
'all_on_one');

11 wp_meta wp-includes\template-functions-general.php 59 No
parameter. Executes in the
  • Meta
  • section of the included Theme's
    sidebar.php's. Useful for insertion of additional content in meta section.
    12 mce_options wp-includes\js\tinymce\tiny_mce_gzip.php 144  
    13 tinymce_before_init wp-includes\js\tinymce\tiny_mce_gzip.php 150  
    14 profile_update wp-includes\registration-functions.php 76  
    15 user_register wp-includes\registration-functions.php 78  
    16 private_to_published wp-includes\functions-post.php 175 Receives
    the post ID as a parameter. Executes when a post is moved from private to published
    status.
    17 edit_post wp-includes\functions-post.php 178 Receives
    the post ID as a parameter. Executes every time a post is edited.
    18 publish_post wp-includes\functions-post.php 182 Receives
    the post ID as a parameter. Executes when a post is saved and its status is set to
    "publish", regardless of its prior setting. NOTE: to add a hook to this
    action in 1.2, be sure to specify a priority between 0 and 9. The generic_ping hook
    is buggy and prevents any lesser priority hooks from working.
    19 save_post wp-includes\functions-post.php 206 Receives
    the post ID as a parameter. Executes when a post is saved to the database.
    20 wp_insert_post wp-includes\functions-post.php 207  
    21 edit_attachment wp-includes\functions-post.php 342  
    22 add_attachment wp-includes\functions-post.php 344  
    23 delete_attachment wp-includes\functions-post.php 380  
    24 delete_post wp-includes\functions-post.php 538 Receives
    the post ID as a parameter. Executes whenever a post is deleted.
    25 wp_blacklist_check wp-includes\functions-post.php 642  
    26 parse_query wp-includes\classes.php 86  
    27 parse_query wp-includes\classes.php 238  
    28 pre_get_posts wp-includes\classes.php 262  
    29 loop_start wp-includes\classes.php 699  
    30 loop_end wp-includes\classes.php 706  
    31 generate_rewrite_rules wp-includes\classes.php 1323 No
    parameter. Executes whenever the rewrite rules are recomputed. To modify the computed
    rules, use the filter rewrite_rules_array instead.
    32 comment_post wp-includes\comment-functions.php 52 Receives
    the comment ID as a parameter. Executes when a comment is added through wp-comments.php.
    33 comment_flood_trigger wp-includes\comment-functions.php 126  
    34 edit_comment wp-includes\comment-functions.php 191 Receives
    the comment ID as a parameter. Executes whenever a comment is edited.
    35 delete_comment wp-includes\comment-functions.php 198 Receives
    the comment ID as a parameter. Executes when a comment is deleted.
    36 wp_set_comment_status wp-includes\comment-functions.php 209 Receives
    the comment ID as a parameter. Executes when the comment status changes.
    37 pre_ping wp-includes\comment-functions.php 635  
    38 wp_set_comment_status wp-includes\comment-functions.php 794  
    39 wp_head wp-includes\functions.php 1432 No
    parameter. Template tag. Executes in the section. Useful for insertion
    of additional content like metatags or javascript.
    40 wp_footer wp-includes\functions.php 1436 No
    parameter. Template tag. Executes just before the end of the tag.
    Useful for insertion of additional content or statistics code like Google Analytics.
    41 comment_form wp-content\themes\classic\comments-popup.php 86 Receives
    the comment's post ID as a parameter. Template tag. Executes after displaying the
    comment form for a post that allows comments.
    42 comment_form wp-content\themes\classic\comments.php 67  
    43 comment_form wp-content\themes\default\comments-popup.php 86  
    44 comment_form wp-content\themes\default\comments.php 98  
    45 rdf_ns wp-rdf.php 21  
    46 rdf_header wp-rdf.php 32  
    47 rdf_item wp-rdf.php 54  
    48 comment_id_not_found wp-comments-post.php 11 Receives
    the comment's post ID as a parameter. Executes when attempting to display the comment
    form for a post that does not exist.
    49 comment_closed wp-comments-post.php 14 Receives
    the comment's post ID as a parameter. Executes when attempting to display the comment
    form for a post that has closed comments.
    50 comment_on_draft wp-comments-post.php 17  
    51 pingback_post xmlrpc.php 1236 Receives
    the comment ID as a parameter. Executes when a comment is added via XMLRPC.
    52 publish_phone wp-mail.php 146 Receives
    the post ID as a parameter. Executes when a post is added via wp-mail.php.
    53 rss2_ns wp-rss2.php 19  
    54 rss2_head wp-rss2.php 29  
    55 rss2_item wp-rss2.php 52  
    56 edit_form_advanced wp-admin\edit-form-advanced.php 216 No
    parameter. Executes during the display of the admin panel's advanced editing page,
    just before the
    is closed that contains the post content textarea. Useful
    for inserting additional input fields into the advanced editing form.
    57 admin_menu wp-admin\menu.php 57 No
    parameter. Executes after the basic admin panel menu structure is in place. Useful
    for adding additional menus to the admin panel.
    58 admin_head wp-admin\admin-header.php 312 No
    parameter. Executes in the section of the admin panel. Useful for insertion
    of additional content.
    59 personal_options_update wp-admin\profile-update.php 23  
    60 activate_ wp-admin\plugins.php 14  
    61 deactivate_ wp-admin\plugins.php 21  
    62 manage_posts_custom_column wp-admin\edit.php 218  
    63 delete_comment wp-admin\post.php 232  
    64 check_passwords wp-admin\admin-functions.php 388  
    65 check_admin_referer wp-admin\admin-functions.php 971  
    66 switch_theme wp-admin\admin-functions.php 1126  
    67 switch_theme wp-admin\admin-functions.php 1133  
    68 edit_page_form wp-admin\edit-page-form.php 214 No
    parameter. Executes inside the
    tag on the page editing form. Useful for
    inserting additional input fields in the page editing form.
    69 show_user_profile wp-admin\profile.php 105  
    70 profile_personal_options wp-admin\profile.php 114  
    71 edit_user_profile wp-admin\user-edit.php 168  
    72 activity_box_end wp-admin\index.php 113  
    73 admin_footer wp-admin\bookmarklet.php 101 No
    parameter. Executes at the end of the admin panel inside the body tag. Useful for
    insertion of additional content.
    74 edit_category wp-admin\admin-db.php 123  
    75 create_category wp-admin\admin-db.php 126  
    76 add_category wp-admin\admin-db.php 127  
    77 delete_category wp-admin\admin-db.php 175  
    78 delete_user wp-admin\admin-db.php 238  
    79 edit_link wp-admin\admin-db.php 297  
    80 add_link wp-admin\admin-db.php 299  
    81 delete_link wp-admin\admin-db.php 323  
    82 simple_edit_form wp-admin\edit-form.php 70 No
    parameter. Executes during the display of the admin panel's simple editing page, just
    before the
    is closed that contains the post content textarea. Useful for
    inserting additional input fields into the simple editing form.
    83 admin_footer wp-admin\admin-footer.php 9  
    84 switch_theme wp-admin\themes.php 14 Receives
    the name of the current theme as a parameter. Executes when the blog theme is changed.
    85 trackback_post wp-trackback.php 95 Receives
    the comment ID as a parameter. Executes when a comment is added via trackback.php.
    86 atom_ns wp-atom.php 17  
    87 atom_head wp-atom.php 25  
    88 atom_entry wp-atom.php 42  
    89 core_files_loaded wp-settings.php 164  
    90 plugins_loaded wp-settings.php 187  
    91 shutdown wp-settings.php 222 No
    parameter. Executes when the page output is complete.
    92 init wp-settings.php 227 Executes
    after WordPress has finished loading but before any headers are sent. Useful for intercepting
    $_GET or $_POST triggers.