Hooks
2,813 hooks were found in the WordPress 7.1.0 source. A hook is an extension point: an action lets you run code at a moment in the request, and a filter lets you change a value as it passes through. Every page below shows the hook's real signature, the arguments your callback receives, and the other hooks that fire around it in the same function, which is what tells you what has already run by the time your callback is called. Hooks whose names core assembles at runtime are listed under the literal part of the name.
2,813 hooks · page 1 of 29
- _admin_menuactionFires before the administration menu loads in the admin.
- _core_updated_successfullyactionFires after WordPress core has been successfully updated.
- _get_page_linkfilterFilters the permalink for a non-page_on_front page.
- _network_admin_menuactionFires before the administration menu loads in the Network Admin.
- _user_admin_menuactionFires before the administration menu loads in the User Admin.
- _wp_post_revision_field_{$field}filterContextually filter a post revision field.
- _wp_post_revision_fieldsfilterFilters the list of fields saved in post revisions.
- _wp_put_post_revisionactionFires once a revision has been saved.
- _wp_relative_upload_pathfilterFilters the relative path to an uploaded file.
- activate_blogactionFires after a network site has its deletion flag removed.
- activate_headeractionFires before the Site Activation page is loaded.
- activate_tinymce_for_media_descriptionfilterFilters the TinyMCE argument for the media description field on the attachment details screen.
- activate_wp_headactionFires within the `` section of the Site Activation page.
- activate_{$plugin}actionFires before a plugin is activated.
- activated_pluginactionFires after a plugin has been activated.
- activity_box_endactionFires at the end of the 'At a Glance' dashboard widget.
- add_admin_bar_menusactionFires after menus are added to the menu bar.
- add_attachmentactionFires once an attachment has been added.
- add_category_form_preaction_deprecateddeprecatedFires before the Add Category form.
- add_inline_dataactionFires after outputting the fields for the inline editor for posts and pages.
- add_linkactionFires after a link was added to the database.
- add_link_category_form_preaction_deprecateddeprecatedFires before the link category form.
- add_menu_classesfilterFilters administration menu array with classes added for top-level items.
- add_meta_boxesactionFires after all built-in meta boxes have been added.
- add_meta_boxes_commentactionFires when comment-specific meta boxes are added.
- add_meta_boxes_linkactionFires when link-specific meta boxes are added.
- add_meta_boxes_{$post_type}actionFires after all built-in meta boxes have been added, contextually for the given post type.
- add_optionactionFires before an option is added.
- add_option_{$option}actionFires after a specific option has been added.
- add_pingfilterFilters the new ping URL to add for the given post.
- add_signup_metafilterFilters the new default site meta variables.
- add_site_optionactionFires after a network option has been successfully added.
- add_site_option_{$option}actionFires after a specific network option has been successfully added.
- add_tag_formaction_deprecateddeprecatedFires at the end of the Add Tag form.
- add_tag_form_fieldsactionFires after the Add Tag form fields for non-hierarchical taxonomies.
- add_tag_form_preaction_deprecateddeprecatedFires before the Add Tag form.
- add_term_relationshipactionFires immediately before an object-term relationship is added.
- add_trashed_suffix_to_trashed_postsfilterFilters whether or not to add a `__trashed` suffix to the name of trashed posts that match the name of the updated post.
- add_user_roleactionFires immediately after the user has been given a new role.
- add_user_to_blogactionFires immediately after a user is added to a site.
- add_{$meta_type}_metaactionFires immediately before meta of a specific type is added.
- add_{$meta_type}_metadatafilterShort-circuits adding metadata of a specific type.
- added_existing_useractionFires immediately after an existing user is added to a site.
- added_optionactionFires after an option has been added.
- added_term_relationshipactionFires immediately after an object-term relationship is added.
- added_usermetaaction
- added_{$meta_type}_metaactionFires immediately after meta of a specific type is added.
- additional_capabilities_displayfilterFilters whether to display additional capabilities for the user.
- admin_action_{$action}actionFires when an 'action' request variable is sent.
- admin_bar_initactionFires after WP_Admin_Bar is initialized.
- admin_bar_menuaction_referenceLoads all necessary admin bar items.
- admin_body_classfilterFilters the CSS classes for the body tag in the admin.
- admin_color_scheme_pickeractionFires in the 'Administration Color Scheme' section of the user editing screen.
- admin_comment_types_dropdownfilterFilters the comment types shown in the drop-down menu on the Comments list table.
- admin_email_check_intervalfilterFilters the interval for redirecting the user to the admin email confirmation screen.
- admin_email_confirmactionFires before the admin email confirm form.
- admin_email_confirm_formactionFires inside the admin-email-confirm-form form tags, before the hidden fields.
- admin_email_remind_intervalfilterFilters the interval for dismissing the admin email confirmation screen.
- admin_enqueue_scriptsactionFires when enqueuing scripts for all admin pages.
- admin_footeractionPrints scripts or data before the default footer scripts.
- admin_footer-widgets.phpaction
- admin_footer-{$hook_suffix}actionPrints scripts or data after the default footer scripts.
- admin_footer_textfilterFilters the "Thank you" text displayed in the admin footer.
- admin_headactionFires in head section for all admin pages.
- admin_head-media-upload-popupactionFires when scripts enqueued for the admin header for the legacy (pre-3.5.0) media upload popup are printed.
- admin_head-{$hook_suffix}actionFires in head section for a specific admin page.
- admin_head_{$content_func}actionFires in the admin header for each specific form tab in the legacy (pre-3.5.0) media upload popup.
- admin_initactionFires as an admin screen or script is being initialized.
- admin_memory_limitfilterFilters the maximum memory limit available for administration screens.
- admin_menuactionFires before the administration menu loads in the admin.
- admin_noticesactionPrints admin screen notices.
- admin_page_access_deniedactionFires when access to an admin page is denied.
- admin_postactionFires on an authenticated admin post request where no action is supplied.
- admin_post_noprivactionFires on a non-authenticated admin post request where no action is supplied.
- admin_post_nopriv_{$action}actionFires on a non-authenticated admin post request for the given action.
- admin_post_thumbnail_htmlfilterFilters the admin post thumbnail HTML markup to return.
- admin_post_thumbnail_sizefilterFilters the size used to display the post thumbnail image in the 'Featured image' meta box.
- admin_post_{$action}actionFires on an authenticated admin post request for the given action.
- admin_print_footer_scriptsactionPrints any scripts and data queued for the footer.
- admin_print_footer_scripts-widgets.phpaction
- admin_print_footer_scripts-{$hook_suffix}actionPrints scripts and data queued for the footer.
- admin_print_scriptsactionFires when scripts are printed for all admin pages.
- admin_print_scripts-media-upload-popupactionFires when admin scripts enqueued for the legacy (pre-3.5.0) media upload popup are printed.
- admin_print_scripts-widgets.phpaction
- admin_print_scripts-{$hook_suffix}actionFires when scripts are printed for a specific admin page based on $hook_suffix.
- admin_print_stylesactionFires when styles are printed for all admin pages.
- admin_print_styles-media-upload-popupactionFires when admin styles enqueued for the legacy (pre-3.5.0) media upload popup are printed.
- admin_print_styles-widgets.phpaction
- admin_print_styles-{$hook_suffix}actionFires when styles are printed for a specific admin page based on $hook_suffix.
- admin_referrer_policyfilterFilters the admin referrer policy header value.
- admin_titlefilterFilters the title tag content for an admin page.
- admin_urlfilterFilters the admin area URL.
- admin_viewport_metafilterFilters the viewport meta in the admin.
- admin_xml_nsactionFires inside the HTML tag in the admin header.
- adminmenuactionFires after the admin menu has been output.
- after-{$taxonomy}-tableactionFires after the taxonomy list table.
- after_core_auto_updates_settingsactionFires after the major core auto-update settings.
- after_db_upgradeactionFires on the next page load after a successful DB upgrade.
- after_delete_postactionFires after a post is deleted, at the conclusion of wp_delete_post().
- after_menu_locations_tableactionFires after the menu locations table is displayed.