New plugin hooks in WordPress 5.0

Important! Some WordPress hooks get applied in multiple PHP files. If you are trying to figure out what a specific WordPress hook does, sort the table by "hook" and make sure you are looking in all the files where it occurs.

  • To sort the table, click on a column title.
  • Click a hook name to see details about the hook.
  • Click a file name to see only hooks used in that file.
Hook Type New? Instances
1 add_inline_data action YES 1
2 akismet_batch_delete_count action YES 1
3 akismet_comment_form_privacy_notice filter YES 1
4 akismet_comment_form_privacy_notice_markup filter YES 1
5 akismet_comment_form_privacy_notice_url_display filter YES 1
6 akismet_comment_form_privacy_notice_url_hide filter YES 1
7 allowed_block_types filter YES 1
8 auth_{$object_type}_meta_{$meta_key}_for_{$object_subtype} note filter YES 1
9 block_categories filter YES 1
10 block_editor_meta_box_hidden_fields action YES 1
11 block_editor_preload_paths filter YES 1
12 block_editor_settings filter YES 1
13 block_parser_class filter YES 1
14 delete_{$meta_type}_metadata_by_mid note filter YES 1
15 determine_locale filter YES 1
16 enqueue_block_assets action YES 1
17 enqueue_block_editor_assets action YES 1
18 excerpt_allowed_blocks filter YES 1
19 filter_block_editor_meta_boxes filter YES 1
20 get_object_subtype_{$object_type} note filter YES 1
21 get_{$meta_type}_metadata_by_mid note filter YES 1
22 old_slug_redirect_post_id filter YES 1
23 pre_determine_locale filter YES 1
24 privacy_policy_url filter YES 1
25 render_block filter YES 1
26 rest_after_insert_attachment action YES 1
27 rest_after_insert_comment action YES 1
28 rest_after_insert_user action YES 1
29 rest_after_insert_{$this->post_type} note action YES 1
30 rest_after_insert_{$this->taxonomy} note action YES 1
31 rest_prepare_autosave filter YES 1
32 rest_prepare_theme filter YES 1
33 rest_revision_query filter YES 1
34 rest_themes_collection_params filter YES 1
35 sanitize_{$object_type}_meta_{$meta_key}_for_{$object_subtype} note filter YES 1
36 theme_templates filter YES 1
37 the_privacy_policy_link filter YES 1
38 twentynineteen_attachment_size filter YES 1
39 twentynineteen_can_show_post_thumbnail filter YES 1
40 twentynineteen_content_width filter YES 1
41 twentynineteen_custom_colors_css filter YES 1
42 twentynineteen_custom_colors_lightness filter YES 1
43 twentynineteen_custom_colors_lightness_hover filter YES 1
44 twentynineteen_custom_colors_lightness_selection filter YES 1
45 twentynineteen_custom_colors_saturation filter YES 1
46 twentynineteen_custom_colors_saturation_selection filter YES 1
47 update_{$meta_type}_metadata_by_mid note filter YES 1
48 update_{$meta_type}_metadata_cache note filter YES 1
49 user_confirmed_action_email_content filter YES 1
50 user_erasure_complete_email_subject filter YES 1
51 user_erasure_fulfillment_email_to filter YES 1
52 user_request_action_confirmed action YES 1
53 user_request_action_confirmed_message filter YES 1
54 user_request_action_description filter YES 1
55 user_request_action_email_content filter YES 1
56 user_request_action_email_subject filter YES 1
57 user_request_confirmed_email_subject filter YES 1
58 user_request_confirmed_email_to filter YES 1
59 user_request_key_expiration filter YES 1
60 use_block_editor_for_post filter YES 1
61 use_block_editor_for_post_type filter YES 1
62 wp_anonymize_comment filter YES 1
63 wp_get_default_privacy_policy_content filter YES 1
64 wp_privacy_anonymize_data filter YES 1
65 wp_privacy_exports_dir filter YES 1
66 wp_privacy_exports_url filter YES 1
67 wp_privacy_export_expiration filter YES 1
68 wp_privacy_personal_data_email_content filter YES 1
69 wp_privacy_personal_data_erased action YES 1
70 wp_privacy_personal_data_erasers filter YES 1
71 wp_privacy_personal_data_erasure_page filter YES 1
72 wp_privacy_personal_data_exporters filter YES 1
73 wp_privacy_personal_data_export_file action YES 1
74 wp_privacy_personal_data_export_file_created action YES 1
75 wp_privacy_personal_data_export_page filter YES 1
76 wp_rest_search_handlers filter YES 1
77 write_your_story filter YES 1

Important warning about variable hooks

Some hooks have variables in their names. For example, pre_${taxonomy}_$field and admin_head- both have variable names. In general, any hook that ends (or begins) with - or _, or contains a $, has a variable name. Since the syntax with which these variables are defined may change from version to version, this page may think that a hook is deprecated (or new) even if it is not. You can usually catch this sort of thing by comparing this hook to the list of "related hooks" below.