WordPressの主なアクションフックの実行順
主なアクションフックの実行順を検証してみました。上から実行されます。
フロント
| after_setup_theme | テーマのロード後 |
| widgets_init | |
| init | ユーザーログイン後。 – テーマやプラグインの初期化処理に使用。 – カスタム投稿の登録 |
| customize_register | |
| wp_loaded | |
| parse_request | |
| send_headers | |
| wp | |
| admin_bar_init | |
| template_redirect | |
| wp_enqueue_scripts | |
| wp_print_scripts | |
| wp_head | |
| wp_footer |
管理画面
| after_setup_theme | |
| widgets_init | |
| init | |
| wp_loaded | |
| admin_menu | |
| admin_bar_init | |
| admin_init | |
| save_post | |
| the_posts | |
| enqueue_block_editor_assets | |
| add_meta_boxes | |
| allowed_block_types_all | |
| admin_enqueue_scripts | |
| wp_print_scripts | |
| admin_notices | |
| wp_print_scripts |
