5 years ago (2015-05-29)  Hundred Encyclopedias |   First to comment  8 
post score 0 times, average 0.0

Management interface related

Activate_ (plugin file name)

This action function is executed the first time a plugin is activated.See the commonly used function -register_activation_hook.

Activity_box_end

This action function is performed at the end of the active box on the dashboard interface.

Add_category_form_pre

This action function is executed when the added category text box is not displayed on the interface of the management menu.

Admin_head

Perform this action function in the <head> HTML block of the dashboard.

Admin_head-(page_hook) or admin_head-(plguin_page)

This action function is executed in the HTML section <head> of the dashboard of the page generated by the plugin.

Admin_init

Perform this action function before loading the management interface.See wp-admin/admin.php, wp-admin/admin-post.php, and wp-admin/admin-ajax.php.

Admin_footer

This action function is performed at the end of the dashboard in the main tab.

Admin_print_scripts

This action function is executed in the header portion of the HTML to allow the plug-in to add JavaScript scripts to all management interfaces.

Admin_print_styles

This action function is performed in the header portion of the HTML to allow the plug-in to add CSS or style sheets to all management interfaces.

Admin_print_scripts-(page_hook) or admin_print_scripts-(plugin_page)

This action function is executed to input the JavaScript script into the HTML message header portion of a management page generated by the plugin.When you add a plug-in menu option to the admin menu using functions such as add_management_page(), add_options_page(), return (page_hook).Examples are as follows:

Check_passwords

When creating a new user account, execute the action function to verify that the two entered passwords are the same.The parameters received by the function: an array of login names, the first entered password, and the second entered password.

Dbx_page_advanced

This action function is executed at the bottom of the "advanced" section on the page edit screen of the management menu.

Dbx_page_sidebar

This action function is executed at the bottom of the page of the page editor interface of the administration menu.

Dbx_post_advanced

This action function is executed at the bottom of the "advanced" section of the log editing interface of the management menu.

Dbx_post_siderbar

This action function is executed at the bottom of the log editing interface of the management menu.WordPress 2.5 or later [http://www.wordpress.la/codex-%E5%B8%B8%E7%94%A8%E5%87%BD%E6 %95%B0-add_meta_box%28 %29.html add_meta_box()] function.

Deactivate_ (plugin file name)

This action function is executed when the plugin is disabled.

Delete_user

This action function is executed when the user is deleted.Function received parameters: user ID.

Edit_category_form

After adding/editing the classification table displayed on the interface (before the end of the HTML table label), this action function is executed.

Edit_category_form_pre

Editing the classification table displays this action function before the administration menu interface.

Edit_tag_form

After adding/editing the tag table is displayed on the interface (before the end of the HTML table tag), execute this action function.

Edit_tag_form_pre

The edit tag table is displayed before the management menu screen, and this action function is executed.

Edit_form_advanced

This action function is executed before the "advanced" section of the log edit box in the management menu.

Edit_page_form

This action function is executed before the "advanced" section of the page edit box in the administration menu.

Edit_user_profile

This action function is performed in the last part of the user profile in the admin menu.

Load_(page)

This action function is executed when the admin menu page is loaded.This action function cannot be added directly - add a management menu procedure See Custom Plugin Management Menu.If you wish to add this function directly, the values ​​returned by add_options_page and similar functions can give the name of the action function.

Login_form

Perform this action function before the end of the login box.

Login_head

Perform this action function before the end of the HTML header section of the login screen.

Lost_password

The "Retrieve password via email" function is displayed before the login screen.

Lostpassward_form

This action function is executed at the end of the form that retrieves the password via email, allowing the plugin to provide more fields.

Lostpassward_post

This action function is executed when the user requests that the password be retrieved via email so that the plug-in can modify the PHP $_POST variable before retrieving the password.

Manage_link_custom_column

This action function is performed when an unknown column name appears in the back link management interface.Function received parameters: column name, link ID.See [http://www.wordpress.la/codex-%E6%8F%92%E4%BB%B6API%E4%B9%8B %E5%B8%B8%E7%94%A8%E8%BF%87 The filter function manage_links_columns in the %E6%BB%A4%E5%99%A8%E5%87%BD%E6%95%B0.html plug-in API/common filter function], which adds custom columns.

Manage_posts_custom_column

This action function is executed when an unknown column name appears in the log management interface.Function received parameters: column name, log ID.See [http://www.wordpress.la/codex-%E6%8F%92%E4%BB%B6API%E4%B9%8B%E5 %B8%B8%E7%94%A8%E8%BF%87 The filter function manage_posts_columns in the %E6%BB%A4%E5%99%A8%E5%87%BD%E6%95%B0.html Plugin API/Common Filter Functions], which adds custom columns.(See the Scompt's tutorial for specific usage and examples.)

Manage_pages_custom_column

This action function is executed when an unknown column name appears in the page management interface.Function received parameters: column name, page ID.See the filter function manage_pages_columns in the plug-in API/common filter function to add a custom column.

Password_reset

This action function is performed before the user changes the old password to the new password.

Personal_options_update

The user performs this action function when updating settings in the dashboard.

Plugins_loaded

This action function is executed after all plugins are loaded.

Profile_personal_options

This action function is executed at the end of the "About You" section of the user profile iemi.

Profile_update

Perform this action function when updating user profiles.The function combines search parameters: user ID.

Register_form

Perform this action function before the end of the new user registry.

Register_post

Perform this action function before processing a new user registration request.

Restrict_manage_posts

The list of logs that need to be edited is displayed before the administration menu screen. This action function is executed.

Retrieve_password

This action function is performed when retrieving the user password to send a password reminder email.Function received parameters: login name.

Set_current_user

After the default function wp_set_current_user changes the user, this action function is executed.Note: wp_set_current_user is a "plug-in" function, ie the plugin can override this function; see the plugin API.

Show_user_profile

Perform this action function at the end of the user profile editing interface.

Simple_edit_form

This action function is executed at the end of the "simple" log edit box on the dashboard (by default, a simple edit box is used only for the bookmark tool - there is no "Advanced" option).

Update_option_(option_name)

The update_option function updates the WordPress option and executes the action function.The parameters received by the function: the original option value, the new option value.The user needs to add an action function for the option that he wants to update. For example, update "foo" with the function update_option_foo.

Upload_files_(tab)

This action function is executed to display a page on the upload file management interface; "tab" is the name of the custom action function table.Custom tables can be defined with the filter function wp_upload_tabs (see Plug-in API/Common Filter Functions).

User_register

This action function is executed when the user profile is first created.Function received parameters: user ID.

Wp_ajax_(action)

Perform this action function in the admin menu to run an unknown type of AJAX.

Wp_authenticate

When the user logs in, the action function is executed to verify the user's identity.The parameters received by the function: an array of user names and passwords.

Wp_login

This action function is executed when the user logs on.

Wp_logout

This action function is executed when the user logs off.

Advanced action function

This section describes the action functions related to the WordPress query (deciding which post to display), the WordPress main loop, the activation plugin, and the WordPress basic code.
After the menu structure in the admin_menu control panel is displayed correctly, execute this action function.
This action function is executed when the admin_notices management menu is displayed on the page.
This action function is executed when the blog_privacy_selector blog default privacy option is displayed on the page.
Check_admin_referer The system checks the random number after security for the check_admin_referer action hook in the default function check_admin_referrer to force the plugin to stop WordPress from running for security reasons.Note: check_admin_referrer is also an "insert" function, ie the plugin can override this function; see plugin API.
After the check_ajax_referer system successfully authenticates the user's login name and password from cookies, this action function is executed in the default function check_ajax_referer (which is a function called when an AJAX request enters the wp-admin/admin-ajax.php script). Can force WordPress to stop running for security reasons.Note: The check_ajax_referer function is also an "insert" function, ie the plugin can override this function; see the plugin API.
The generate_rewrite_rules rewrite rule is generated and this action function is executed.Function received parameters: WP_Rewrite class variable list.Note: Using the rewrite_rules_array filter function is more convenient than using this action function when modifying rewrite rules.
This action function is executed when initWordPress is loaded but header information has not yet been sent.The function is suitable for parsing $_GET or $_POST triggers.
loop_endWordPress After executing the last log of the main loop, execute this action function.
Loop_start executes this action function before executing the first post in WordPress main loop.
Parse_query executes this action function when the query parsing is completed in the main query or any instance of WP_Query (such as query_posts, get_posts, or get_children).The parameters received by the function: a list of $wp_query object contents.
Parse_request executes the action function after parsing the query request in the main WordPress function wp.The parameters received by the function: An array that references the global variable $wp object.
Pre_get_posts executes this action function before the get_posts function begins to manipulate the query.Parameters received by the function: List of contents of the $wp_query object.
Sanitize_comment_cookies This action function is executed after an HTTP request to read cookies.
Send_headers performs this action function after sending the basic HTTP header in WordPress main function wp.The parameters received by the function: An array that references the global variable $wp object.
After the shutdown page content is output, this action function is executed.
Wp parses the query in WordPress main function wp. After the page is loaded, execute this action function before executing the template.The parameters received by the function: An array that references the global variable $wp object.

 
关注我的微信

关注我的微信,获取文章更新

如果你觉得这篇文章对你有用,可以点击下面的“赞助作者”打赏作者!

转载注明原文出处:Baiyuan's Blog>>https://wangbaiyuan.cn/en/wordpress-function-hook-hook-book-3-2.html

Post comment

Style

No Comment

登录

Forget password?

您也可以使用第三方帐号快捷登录

切换登录

注册

TW