こんにちは、今日はWordPressで投稿、ページ、添付ファイル、カテゴリの管理者アクションについてまとめていきます。
確認環境
WordPress 5.5.1
フック一覧
| フック名 | 説明 |
| post_submitbox_misc_actions | |
| add_attachment | |
| add_category | |
| category_add_form_fields | |
| category_edit_form | |
| clean_post_cache | |
| create_category | |
| delete_attachment | |
| delete_category | |
| wp_trash_post | |
| trashed_post | |
| untrash_post | |
| untrashed_post | |
| before_delete_post | |
| delete_post | |
| deleted_post | |
| edit_attachment | |
| edit_category | |
| edit_post | |
| pre_post_update | |
| post_updated | |
| transition_post_status | |
| (old status)_to_(new status) | |
| (status)_(post_type) | |
| publish_post | |
| publish_page | |
| publish_phone | |
| publish_future_post | |
| save_post | |
| updated_postmeta | |
| wp_insert_post | |
| xmlrpc_publish_post |
リンク
Plugin API/Action Reference « WordPress Codex https://codex.wordpress.org/Plugin_API/Action_Reference