Comprehensive List of WordPress Action Hooks综合清单WordPress的行动钩

For WordPress Plugin and Theme Developers by为wordpress插件和主题,由发展商 Plugin Developer插件开发

This contains all the available action hooks (documented as well as undocumented) for WordPress plugin and theme developers.这包含了所有可用的行动钩(记录以及无证) wordpress插件和主题发展。 All available documentation on these hooks have been updated from WordPress Codex.所有可用的文件,这些弯钩已更新由WordPress所法典。

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 在WordPress 2.x的过滤器-全面名单插件和主题发展 .

No.否。 Action行动 Source File源文件 Line线
No.否。
Comments评论
1 wp_logout wp-login.php 可湿性粉剂- login.php 25 25
2 lost_password wp-login.php 可湿性粉剂- login.php 38 38
3 retreive_password wp-login.php 可湿性粉剂- login.php 100 100
4 retrieve_password wp-login.php 可湿性粉剂- login.php 101 101
5 password_reset wp-login.php 可湿性粉剂- login.php 137 137
6 wp_authenticate wp-login.php 可湿性粉剂- login.php 189 189
7 wp_login wp-login.php 可湿性粉剂- login.php 201 201
8八月 rss_head wp-rss.php 可湿性粉剂- rss.php 22 22
9 rss_item wp-rss.php 可湿性粉剂- rss.php 33 33
10 10月 template_redirect wp-includes\template-loader.php 可湿性粉剂-包括\模板loader.php 3 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例如(教学,而不是有用的) :所有请求重定向到向all.php模板文件
in the current themes’ directory.在目前的主题'目录。

function all_on_one () {功能all_on_one ( ) (
include(TEMPLATEPATH包括: ( templatepath
. ‘/all.php’); ' / all.php ' ) ;
exit;退出;
}
add_action(’template_redirect’, add_action ( ' template_redirect ' ,
‘all_on_one’); ' all_on_one ' ) ;

11 11月 wp_meta wp-includes\template-functions-general.php 可湿性粉剂-包括\模板功能- general.php 59 59 No
parameter.参数。 Executes in the执行,在
  • Meta中继
  • section of the included Theme’s一节所包含的主题的
    sidebar.php’s. sidebar.php '第 Useful for insertion of additional content in meta section.有用的插入额外的内容在Meta一节。

    12 12月 mce_options wp-includes\js\tinymce\tiny_mce_gzip.php 可湿性粉剂-包括\ js \ tinymce \ tiny_mce_gzip.php 144 144
    13 13日 tinymce_before_init wp-includes\js\tinymce\tiny_mce_gzip.php 可湿性粉剂-包括\ js \ tinymce \ tiny_mce_gzip.php 150 150
    14 14日 profile_update wp-includes\registration-functions.php 可湿性粉剂-包括\登记functions.php 76 76
    15 15日 user_register wp-includes\registration-functions.php 可湿性粉剂-包括\登记functions.php 78 78
    16 16日 private_to_published wp-includes\functions-post.php 可湿性粉剂-包括\职能- post.php 175 175 Receives收到
    the post ID as a parameter.邮政ID作为一个参数。 Executes when a post is moved from private to published执行时,一个职位是由私人出版
    status.身份。
    17 17日 edit_post wp-includes\functions-post.php 可湿性粉剂-包括\职能- post.php 178 178 Receives收到
    the post ID as a parameter.邮政ID作为一个参数。 Executes every time a post is edited.每一次执行后是编辑。
    18 18日 publish_post wp-includes\functions-post.php 可湿性粉剂-包括\职能- post.php 182 182 Receives收到
    the post ID as a parameter.邮政ID作为一个参数。 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.行动在1.2 ,一定要指定一个优先介于0和9 。 The generic_ping hook该generic_ping钩
    is buggy and prevents any lesser priority hooks from working.是漏洞百出,并防止任何较轻的优先钩从工作。
    19 19日 save_post wp-includes\functions-post.php 可湿性粉剂-包括\职能- post.php 206 206 Receives收到
    the post ID as a parameter.邮政ID作为一个参数。 Executes when a post is saved to the database.执行时,后保存到数据库中。
    20 20日 wp_insert_post wp-includes\functions-post.php 可湿性粉剂-包括\职能- post.php 207 207
    21 21日 edit_attachment wp-includes\functions-post.php 可湿性粉剂-包括\职能- post.php 342 342
    22 22日 add_attachment wp-includes\functions-post.php 可湿性粉剂-包括\职能- post.php 344 344
    23 23日 delete_attachment wp-includes\functions-post.php 可湿性粉剂-包括\职能- post.php 380 380
    24 24日 delete_post wp-includes\functions-post.php 可湿性粉剂-包括\职能- post.php 538 538 Receives收到
    the post ID as a parameter.邮政ID作为一个参数。 Executes whenever a post is deleted.每当执行后删除。
    25 25日 wp_blacklist_check wp-includes\functions-post.php 可湿性粉剂-包括\职能- post.php 642 642
    26 26日 parse_query wp-includes\classes.php 可湿性粉剂-包括\ classes.php 86 86
    27 27日 parse_query wp-includes\classes.php 可湿性粉剂-包括\ classes.php 238 238
    28 28日 pre_get_posts wp-includes\classes.php 可湿性粉剂-包括\ classes.php 262 262
    29 29日 loop_start wp-includes\classes.php 可湿性粉剂-包括\ classes.php 699 699
    30 30日 loop_end wp-includes\classes.php 可湿性粉剂-包括\ classes.php 706 706
    31 31日 generate_rewrite_rules wp-includes\classes.php 可湿性粉剂-包括\ classes.php 1323 1323 No
    parameter.参数。 Executes whenever the rewrite rules are recomputed.执行时,重写规则是重新。 To modify the computed修改电脑
    rules, use the filter rewrite_rules_array instead.规则,使用过滤器rewrite_rules_array不是。
    32 comment_post wp-includes\comment-functions.php 可湿性粉剂-包括\评论- functions.php 52 52 Receives收到
    the comment ID as a parameter.评论ID作为一个参数。 Executes when a comment is added through wp-comments.php.执行时的评论是补充,通过可湿性粉剂- comments.php 。
    33 comment_flood_trigger wp-includes\comment-functions.php 可湿性粉剂-包括\评论- functions.php 126 126
    34 edit_comment wp-includes\comment-functions.php 可湿性粉剂-包括\评论- functions.php 191 191 Receives收到
    the comment ID as a parameter.评论ID作为一个参数。 Executes whenever a comment is edited.执行时的评论是编辑。
    35 delete_comment wp-includes\comment-functions.php 可湿性粉剂-包括\评论- functions.php 198 198 Receives收到
    the comment ID as a parameter.评论ID作为一个参数。 Executes when a comment is deleted.执行时,评论被删除。
    36 wp_set_comment_status wp-includes\comment-functions.php 可湿性粉剂-包括\评论- functions.php 209 209 Receives收到
    the comment ID as a parameter.评论ID作为一个参数。 Executes when the comment status changes.执行时,评论的地位的变化。
    37 pre_ping wp-includes\comment-functions.php 可湿性粉剂-包括\评论- functions.php 635 635
    38 wp_set_comment_status wp-includes\comment-functions.php 可湿性粉剂-包括\评论- functions.php 794 794
    39 wp_head wp-includes\functions.php 可湿性粉剂-包括\ functions.php 1432 1432 No
    parameter. Template tag. Executes in the参数。 模板标记。执行,在 section.一节。 Useful for insertion有用的插入
    of additional content like metatags or javascript.其他内容一样,中继或JavaScript 。
    40 wp_footer wp-includes\functions.php 可湿性粉剂-包括\ functions.php 1436 1436 No
    parameter. Template tag. Executes just before the end of the <body> tag.参数。 模板标记。执行只是年底前的<BODY>标记。
    Useful for insertion of additional content or statistics code like Google Analytics.有用的插入额外的内容或统计代码,像Google分析。
    41 comment_form wp-content\themes\classic\comments-popup.php 可湿性粉剂内容\主题\经典\评论- popup.php 86 86 Receives收到
    the comment’s post ID as a parameter.评论后的ID作为一个参数。 Template tag.模板标记。 Executes after displaying the执行后,显示
    comment form for a post that allows comments.评论形式的一个职位,允许评论。
    42 comment_form wp-content\themes\classic\comments.php 可湿性粉剂内容\主题\经典\ comments.php 67 67
    43 comment_form wp-content\themes\default\comments-popup.php 可湿性粉剂内容\主题\默认\评论- popup.php 86 86
    44 comment_form wp-content\themes\default\comments.php 可湿性粉剂内容\主题\默认\ comments.php 98 98
    45 rdf_ns wp-rdf.php 可湿性粉剂- rdf.php 21 21
    46 rdf_header wp-rdf.php 可湿性粉剂- rdf.php 32 32
    47 rdf_item wp-rdf.php 可湿性粉剂- rdf.php 54 54
    48 comment_id_not_found wp-comments-post.php 可湿性粉剂-评论- post.php 11 11 Receives收到
    the comment’s post ID as a parameter.评论后的ID作为一个参数。 Executes when attempting to display the comment执行时,企图以显示评论
    form for a post that does not exist.表格后不存在。
    49 comment_closed wp-comments-post.php 可湿性粉剂-评论- post.php 14 14 Receives收到
    the comment’s post ID as a parameter.评论后的ID作为一个参数。 Executes when attempting to display the comment执行时,企图以显示评论
    form for a post that has closed comments.形式的帖子已关闭的意见。
    50 comment_on_draft wp-comments-post.php 可湿性粉剂-评论- post.php 17 17
    51 pingback_post xmlrpc.php xmlrpc.php 1236 1236 Receives收到
    the comment ID as a parameter.评论ID作为一个参数。 Executes when a comment is added via XMLRPC.执行时的评论是补充,通过xmlrpc的。
    52 publish_phone wp-mail.php 可湿性粉剂- mail.php 146 146 Receives收到
    the post ID as a parameter.邮政ID作为一个参数。 Executes when a post is added via wp-mail.php.执行时,一个职位是补充,通过可湿性粉剂- mail.php 。
    53 rss2_ns wp-rss2.php 可湿性粉剂- rss2.php 19 19
    54 rss2_head wp-rss2.php 可湿性粉剂- rss2.php 29 29
    55 rss2_item wp-rss2.php 可湿性粉剂- rss2.php 52 52
    56 edit_form_advanced wp-admin\edit-form-advanced.php 可湿性粉剂管理员\编辑形式- advanced.php 216 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 可湿性粉剂管理员\ menu.php 57 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 可湿性粉剂管理员\管理- header.php 312 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 可湿性粉剂管理员\简介- update.php 23 23
    60 activate_ wp-admin\plugins.php 可湿性粉剂管理员\ plugins.php 14 14
    61 deactivate_ wp-admin\plugins.php 可湿性粉剂管理员\ plugins.php 21 21
    62 manage_posts_custom_column wp-admin\edit.php 可湿性粉剂管理员\ edit.php 218 218
    63 delete_comment wp-admin\post.php 可湿性粉剂管理员\ post.php 232 232
    64 check_passwords wp-admin\admin-functions.php 可湿性粉剂管理员\管理- functions.php 388 388
    65 check_admin_referer wp-admin\admin-functions.php 可湿性粉剂管理员\管理- functions.php 971 971
    66 switch_theme wp-admin\admin-functions.php 可湿性粉剂管理员\管理- functions.php 1126 1126
    67 switch_theme wp-admin\admin-functions.php 可湿性粉剂管理员\管理- functions.php 1133 1133
    68 edit_page_form wp-admin\edit-page-form.php 可湿性粉剂管理员\编辑页form.php 214 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 可湿性粉剂管理员\ profile.php 105 105
    70 profile_personal_options wp-admin\profile.php 可湿性粉剂管理员\ profile.php 114 114
    71 edit_user_profile wp-admin\user-edit.php 可湿性粉剂管理员\用户edit.php 168 168
    72 activity_box_end wp-admin\index.php 可湿性粉剂管理员\的index.php 113 113
    73 admin_footer wp-admin\bookmarklet.php 可湿性粉剂管理员\ bookmarklet.php 101 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 可湿性粉剂管理员\管理- db.php 123 123
    75 create_category wp-admin\admin-db.php 可湿性粉剂管理员\管理- db.php 126 126
    76 add_category wp-admin\admin-db.php 可湿性粉剂管理员\管理- db.php 127 127
    77 delete_category wp-admin\admin-db.php 可湿性粉剂管理员\管理- db.php 175 175
    78 delete_user wp-admin\admin-db.php 可湿性粉剂管理员\管理- db.php 238 238
    79 edit_link wp-admin\admin-db.php 可湿性粉剂管理员\管理- db.php 297 297
    80 add_link wp-admin\admin-db.php 可湿性粉剂管理员\管理- db.php 299 299
    81 delete_link wp-admin\admin-db.php 可湿性粉剂管理员\管理- db.php 323 323
    82 simple_edit_form wp-admin\edit-form.php 可湿性粉剂管理员\编辑form.php 70 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 可湿性粉剂管理员\管理- footer.php 9 9
    84 switch_theme wp-admin\themes.php 可湿性粉剂管理员\ themes.php 14 14 Receives收到
    the name of the current theme as a parameter.的名称,目前的主题作为一个参数。 Executes when the blog theme is changed.执行时,博客的主题是变化。
    85 trackback_post wp-trackback.php 可湿性粉剂- trackback.php 95 95 Receives收到
    the comment ID as a parameter.评论ID作为一个参数。 Executes when a comment is added via trackback.php.执行时的评论是补充,通过trackback.php 。
    86 atom_ns wp-atom.php 可湿性粉剂- atom.php 17 17
    87 atom_head wp-atom.php 可湿性粉剂- atom.php 25 25
    88 atom_entry wp-atom.php 可湿性粉剂- atom.php 42 42
    89 core_files_loaded wp-settings.php 可湿性粉剂- settings.php 164 164
    90 plugins_loaded wp-settings.php 可湿性粉剂- settings.php 187 187
    91 shutdown关机 wp-settings.php 可湿性粉剂- settings.php 222 222 No
    parameter.参数。 Executes when the page output is complete.执行时,页面输出是完成。
    92 init init的 wp-settings.php 可湿性粉剂- settings.php 227 227 Executes执行
    after WordPress has finished loading but before any headers are sent.后的WordPress已完成加载,但之前的任何头发送。 Useful for intercepting有用的拦截
    $_GET or $_POST triggers.元_get或全局变量$ _POST诱因。