×

WordPress Hook Order Of Execution

Falcon 2020-01-02 views:
自动摘要

正在生成中……

In order to build anything for WordPress, you know that action and filter hooks are the way to go. But hooks are still a bit of a mystery because we don’t really have any concept of the order in which they are executed. Until now:

Hook Front Page Admin Page
muplugins_loaded X X
registered_taxonomy X X
registered_post_type X X
plugins_loaded X X
sanitize_comment_cookies X X
setup_theme X X
load_textdomain X X
after_setup_theme X X
auth_cookie_malformed X  
auth_cookie_valid X X
set_current_user X X
init X X
widgets_init X X
register_sidebar X X
wp_register_sidebar_widget X X
wp_default_scripts X X
wp_default_styles X X
admin_bar_init X X
add_admin_bar_menus X X
wp_loaded X X
parse_request X  
auth_cookie_valid   X
auth_redirect   X
admin_menu   X
admin_init   X
current_screen   X
send_headers X X
parse_query X  
pre_get_posts X X
posts_selection X X
wp X X
template_redirect X  
get_header X  
wp_enqueue_scripts X  
wp_head X  
wp_print_styles X  
admin_xml_ns   X
admin_enqueue_scripts   X
admin_print_styles   X
admin_print_scripts   X
wp_print_scripts X X
admin_head   X
admin_menu   X
in_admin_header   X
admin_notices   X
all_admin_notices   X
restrict_manage_posts   X
get_search_form X  
loop_start X  
the_post X X
get_template_part_content X  
loop_end X  
get_sidebar X  
dynamic_sidebar X  
pre_get_comments X  
wp_meta X  
get_footer X  
wp_footer X  
wp_print_footer_scripts X  
pre_user_query   X
in_admin_footer   X
admin_footer   X
admin_bar_menu X X
wp_before_admin_bar_render X X
wp_after_admin_bar_render X X
admin_print_footer_scripts   X
shutdown X X
wp_dashboard_setup   X