Загрузка...

Порядок выполнения хуков WordPress

wordpress

Памятка. Порядок выполнения основных хуков в WordPress:

Frontend

mu_plugin_loaded
network_plugin_loaded
muplugins_loaded
registered_taxonomy
registered_post_type
plugin_loaded
plugins_loaded
sanitize_comment_cookies
setup_theme
load_textdomain
after_setup_theme
auth_cookie_malformed
auth_cookie_valid
set_current_user
init
widgets_init
register_sidebar
wp_register_sidebar_widget
wp_default_scripts
wp_default_styles
admin_bar_init
add_admin_bar_menus
wp_loaded
parse_request
send_headers
parse_query
pre_get_posts
posts_clauses
posts_selection
wp
template_redirect
get_header
wp_head
wp_enqueue_scripts
wp_print_styles
wp_print_scripts

Зависят от темы:

get_search_form
loop_start
the_post
get_template_part_content
loop_end
get_sidebar
dynamic_sidebar
pre_get_comments
wp_meta

get_footer
wp_footer
wp_print_footer_scripts
admin_bar_menu
wp_before_admin_bar_render
wp_after_admin_bar_render
shutdown

Backend

mu_plugin_loaded
network_plugin_loaded
muplugins_loaded
registered_taxonomy
registered_post_type
plugin_loaded
plugins_loaded
sanitize_comment_cookies
setup_theme
load_textdomain
after_setup_theme
load_textdomain
auth_cookie_valid
set_current_user
init
widgets_init
register_sidebar
wp_register_sidebar_widget
wp_default_scripts
wp_default_styles
admin_bar_init
add_admin_bar_menus
wp_loaded
auth_cookie_valid
auth_redirect
_admin_menu
admin_menu
admin_init
current_screen
load-(page_hook)
send_headers
parse_query
pre_get_posts
posts_clauses
posts_selection
wp
admin_xml_ns
admin_enqueue_scripts
admin_print_styles-(hook_suffix)
admin_print_styles
admin_print_scripts-(hook_suffix)
admin_print_scripts
wp_print_scripts
admin_head-(hook_suffix)
admin_head
adminmenu
in_admin_header
admin_notices
all_admin_notices
(hook)
restrict_manage_posts
the_post
pre_user_query
in_admin_footer
admin_footer
admin_bar_menu
wp_before_admin_bar_render
wp_after_admin_bar_render
admin_print_footer_scripts-(hook_suffix)
admin_print_footer_scripts
admin_footer-(hook_suffix)
shutdown
wp_dashboard_setup