CARVIEW |
Select Language
HTTP/2 200
content-encoding: gzip
vary: Accept-Encoding,User-Agent
set-cookie: lfuser=null; expires=Mon, 15-Sep-2025 02:31:24 GMT; Max-Age=0; path=/; secure
set-cookie: lfpass=null; expires=Mon, 15-Sep-2025 02:31:24 GMT; Max-Age=0; path=/; secure
cache-control: max-age=600
expires: Wed, 15 Oct 2025 02:41:24 GMT
content-type: text/html; charset=UTF-8
date: Wed, 15 Oct 2025 02:31:24 GMT
server: Apache
delete_post Wordpress hook details -- Adam Brown, BYU Political Science
WordPress hook directory
WP hooks navigation: Home/browse • Actions index • Filters index
WordPress hook directory
delete_post
Description
Runs when a post or page is about to be deleted. Comments, attachments and metadata are already deleted. Action function arguments: post or page ID.
This description was scraped automatically from the WordPress filter reference or action reference. If it looks like this is the wrong description, please tell me so I can fix my code.
WordPress version history for delete_post
This database has information for all major versions from WP 1.2.1 through 6.7.
Version | File | Line | Type | |
---|---|---|---|---|
1.2.1 | wp-admin/post.php | 929 | View in context | action |
1.5.2 | wp-admin/post.php | 470 | View in context | action |
2.0 | wp-includes/functions-post.php | 538 | View in context | action |
2.0.11 | wp-includes/functions-post.php | 546 | View in context | action |
2.1 | wp-includes/post.php | 414 | View in context | action |
2.2 | wp-includes/post.php | 407 | View in context | action |
2.3 | wp-includes/post.php | 515 | View in context | action |
2.5 | wp-includes/post.php | 975 | View in context | action |
2.6 | wp-includes/post.php | 1032 | View in context | action |
2.7 | wp-includes/post.php | 1105 | View in context | action |
2.8 | wp-includes/post.php | 1146 | View in context | action |
2.9 | wp-includes/post.php | 1184 | View in context | action |
2.9 | wp-includes/post.php | 1239 | View in context | action |
2.9 | wp-includes/post.php | 2875 | View in context | action |
3.0 | wp-includes/post.php | 1728 | View in context | action |
3.0 | wp-includes/post.php | 1783 | View in context | action |
3.0 | wp-includes/post.php | 3481 | View in context | action |
3.1 | wp-includes/post.php | 1955 | View in context | action |
3.1 | wp-includes/post.php | 2010 | View in context | action |
3.1 | wp-includes/post.php | 3723 | View in context | action |
3.2 | wp-includes/post.php | 2041 | View in context | action |
3.2 | wp-includes/post.php | 3808 | View in context | action |
3.3 | wp-includes/post.php | 2033 | View in context | action |
3.3 | wp-includes/post.php | 3805 | View in context | action |
3.4 | wp-includes/post.php | 2083 | View in context | action |
3.4 | wp-includes/post.php | 3850 | View in context | action |
3.5 | wp-includes/post.php | 2366 | View in context | action |
3.5 | wp-includes/post.php | 4106 | View in context | action |
3.6 | wp-includes/post.php | 2294 | View in context | action |
3.6 | wp-includes/post.php | 4087 | View in context | action |
3.7 | wp-includes/post.php | 2337 | View in context | action |
3.7 | wp-includes/post.php | 4183 | View in context | action |
3.8 | wp-includes/post.php | 2341 | View in context | action |
3.8 | wp-includes/post.php | 4190 | View in context | action |
3.9 | wp-includes/post.php | 2483 | View in context | action |
3.9 | wp-includes/post.php | 4671 | View in context | action |
4.0 | wp-includes/post.php | 2629 | View in context | action |
4.0 | wp-includes/post.php | 4802 | View in context | action |
4.1 | wp-includes/post.php | 2629 | View in context | action |
4.1 | wp-includes/post.php | 4800 | View in context | action |
4.2 | wp-includes/post.php | 2648 | View in context | action |
4.2 | wp-includes/post.php | 4848 | View in context | action |
4.3 | wp-includes/post.php | 2678 | View in context | action |
4.3 | wp-includes/post.php | 4926 | View in context | action |
4.4 | wp-includes/post.php | 2441 | View in context | action |
4.4 | wp-includes/post.php | 4739 | View in context | action |
4.5 | wp-includes/post.php | 2559 | View in context | action |
4.5 | wp-includes/post.php | 4890 | View in context | action |
4.6 | wp-includes/post.php | 2414 | View in context | action |
4.6 | wp-includes/post.php | 4792 | View in context | action |
4.7 | wp-includes/post.php | 2508 | View in context | action |
4.7 | wp-includes/post.php | 4909 | View in context | action |
4.8 | wp-includes/post.php | 2508 | View in context | action |
4.8 | wp-includes/post.php | 4914 | View in context | action |
4.9 | wp-includes/post.php | 2546 | View in context | action |
4.9 | wp-includes/post.php | 4992 | View in context | action |
5.0 | wp-includes/post.php | 2705 | View in context | action |
5.0 | wp-includes/post.php | 5162 | View in context | action |
5.1 | wp-includes/post.php | 2864 | View in context | action |
5.1 | wp-includes/post.php | 5442 | View in context | action |
5.2 | wp-includes/post.php | 2864 | View in context | action |
5.2 | wp-includes/post.php | 5442 | View in context | action |
5.3 | wp-includes/post.php | 3025 | View in context | action |
5.3 | wp-includes/post.php | 5625 | View in context | action |
5.4 | wp-includes/post.php | 3036 | View in context | action |
5.4 | wp-includes/post.php | 5664 | View in context | action |
5.5 | wp-includes/post.php | 3078 | View in context | action |
5.5 | wp-includes/post.php | 5838 | View in context | action |
5.6 | wp-includes/post.php | 3090 | View in context | action |
5.6 | wp-includes/post.php | 5963 | View in context | action |
5.7 | wp-includes/post.php | 3177 | View in context | action |
5.7 | wp-includes/post.php | 6077 | View in context | action |
5.8 | wp-includes/post.php | 3259 | View in context | action |
5.8 | wp-includes/post.php | 6182 | View in context | action |
5.9 | wp-includes/post.php | 3460 | View in context | action |
5.9 | wp-includes/post.php | 6412 | View in context | action |
6.0 | wp-includes/post.php | 3443 | View in context | action |
6.0 | wp-includes/post.php | 6399 | View in context | action |
6.1 | wp-includes/post.php | 3459 | View in context | action |
6.1 | wp-includes/post.php | 6427 | View in context | action |
6.2 | wp-includes/post.php | 3461 | View in context | action |
6.2 | wp-includes/post.php | 6383 | View in context | action |
6.3 | wp-includes/post.php | 3486 | View in context | action |
6.3 | wp-includes/post.php | 6302 | View in context | action |
6.4 | wp-includes/post.php | 3496 | View in context | action |
6.4 | wp-includes/post.php | 6325 | View in context | action |
6.5 | wp-includes/post.php | 3564 | View in context | action |
6.5 | wp-includes/post.php | 6393 | View in context | action |
6.6 | wp-includes/post.php | 3614 | View in context | action |
6.6 | wp-includes/post.php | 6456 | View in context | action |
6.7 | wp-includes/post.php | 3783 | View in context | action |
6.7 | wp-includes/post.php | 6625 | View in context | action |
Related Hooks
We find related hooks using word stems. delete_post has 2 significant word stem(s): delete
, post
. Note that some of the hooks below may not appear in all versions of WP.
- Hooks with 2 identical stems
- Hooks with 1 identical stem
- _wp_post_revision_field_{$field}
- _wp_post_revision_fields
- _wp_put_post_revision
- add_meta_boxes_{$post_type}
- admin_post
- admin_post_nopriv
- admin_post_nopriv_{$action}
- admin_post_thumbnail_html
- admin_post_thumbnail_size
- admin_post_{$action}
- akismet_batch_delete_count
- akismet_delete_comment_batch
- akismet_delete_comment_interval
- akismet_delete_comment_limit
- akismet_delete_commentmeta_batch
- akismet_delete_commentmeta_interval
- app_publish_post
- atompub_create_post
- atompub_put_post
- auth_post_meta_{$meta_key}
- auth_post_{$post_type}_meta_{$meta_key}
- begin_fetch_post_thumbnail_html
- bulk_post_updated_messages
- clean_post_cache
- close_comments_for_post_types
- comment_post
- comment_post_redirect
- customize_post_value_set
- customize_post_value_set_{$setting_id}
- dbx_post_advanced
- dbx_post_sidebar
- default_category_post_types
- delete_attachment
- delete_blog
- delete_category
- delete_comment
- delete_commentmeta
- delete_link
- delete_option
- delete_option_{$option}
- delete_plugin
- delete_postmeta
- delete_site_email_content
- delete_site_option
- delete_site_option_{$key}
- delete_site_option_{$option}
- delete_site_transient_{$transient}
- delete_term
- delete_term_relationships
- delete_term_taxonomy
- delete_theme
- delete_transient_{$transient}
- delete_user
- delete_user_form
- delete_usermeta
- delete_widget
- delete_{$meta_type}_meta
- delete_{$meta_type}_metadata
- delete_{$meta_type}_metadata_by_mid
- delete_{$meta_type}meta
- delete_{$taxonomy}
- deleted_post
- deleted_post_{$post->post_type}
- display_post_states
- edit_post
- edit_post_link
- edit_post_{$field}
- edit_post_{$post->post_type}
- edit_{$post_type}_per_page
- enable_post_by_email_configuration
- end_fetch_post_thumbnail_html
- feed_links_extra_show_post_comments_feed
- feed_links_extra_show_post_type_archive_feed
- format_to_post
- get_edit_post_link
- get_next_post_join
- get_next_post_sort
- get_next_post_where
- get_post_galleries
- get_post_gallery
- get_post_modified_time
- get_post_status
- get_post_time
- get_previous_post_join
- get_previous_post_sort
- get_previous_post_where
- get_the_post_type_description
- get_{$adjacent}_post_excluded_terms
- get_{$adjacent}_post_join
- get_{$adjacent}_post_sort
- get_{$adjacent}_post_where
- has_post_thumbnail
- hierarchical_post_types
- http_transport_post_debug
- import_post_added
- import_post_meta
- import_post_meta_key
- is_post_status_viewable
- is_post_type_viewable
- lostpassword_post
- make_delete_blog
- manage_taxonomies_for_{$post_type}_columns
- manage_{$post->post_type}_posts_custom_column
- manage_{$post_type}_posts_columns
- nav_menu_items_{$post_type_name}
- nav_menu_items_{$post_type_name}_recent
- notify_post_author
- oembed_request_post_id
- old_slug_redirect_post_id
- override_post_lock
- parent_post_rel_link
- pingback_post
- post-flash-upload-ui
- post-html-upload-ui
- post-plupload-upload-ui
- post-upload-ui
- post_action_{$action}
- post_class
- post_class_taxonomies
- post_column_taxonomy_links
- post_comment_status_meta_box-options
- post_comment_text
- post_comments_feed_link
- post_comments_feed_link_html
- post_comments_link
- post_date_column_status
- post_date_column_time
- post_edit_category_parent_dropdown_args
- post_edit_form_tag
- post_embed_url
- post_format_rewrite_base
- post_gallery
- post_limits
- post_limits_request
- post_link
- post_link_category
- post_lock_lost_dialog
- post_locked_dialog
- post_mime_type_pre
- post_mime_types
- post_password_expires
- post_password_required
- post_playlist
- post_relatedlinks_list
- post_rewrite_rules
- post_row_actions
- post_search_columns
- post_stati
- post_stuck
- post_submitbox_minor_actions
- post_submitbox_misc_actions
- post_submitbox_start
- post_thumbnail_html
- post_thumbnail_id
- post_thumbnail_size
- post_thumbnail_url
- post_type_archive_feed_link
- post_type_archive_link
- post_type_archive_title
- post_type_labels_{$post_type}
- post_type_link
- post_unstuck
- post_updated
- post_updated_messages
- post_{$field}
- pre_comment_on_post
- pre_delete_attachment
- pre_delete_site_option_{$option}
- pre_delete_term
- pre_get_available_post_mime_types
- pre_post_link
- pre_post_update
- pre_post_{$field}
- pre_trackback_post
- pre_trash_post
- pre_untrash_post
- pre_wp_list_authors_post_counts_query
- pre_wp_unique_post_slug
- press_this_save_post
- preview_post_link
- publish_post
- quick_edit_enabled_for_post_type
- redirect_post_location
- register_post
- register_post_type_args
- register_{$post_type}_post_type_args
- registered_post_type
- registered_post_type_{$post_type}
- render_block_core_template_part_post
- rest_after_insert_{$this->post_type}
- rest_delete_comment
- rest_delete_nav_menu_item
- rest_delete_revision
- rest_delete_user
- rest_delete_widget
- rest_delete_{$this->taxonomy}
- rest_insert_{$this->post_type}
- rest_post_dispatch
- rest_post_format_search_query
- rest_post_search_query
- rest_pre_insert_{$this->post_type}
- rest_prepare_post_type
- rest_prepare_{$this->post_type}
- rest_route_for_post
- rest_route_for_post_type_items
- rest_{$this->post_type}_collection_params
- rest_{$this->post_type}_item_schema
- rest_{$this->post_type}_query
- rest_{$this->post_type}_trashable
- save_post
- save_post_{$post->post_type}
- show_post_locked_dialog
- single_post_title
- swfupload_post_params
- the_post
- the_post_thumbnail_caption
- theme_{$post_type}_templates
- trackback_post
- transition_post_status
- trash_post
- trash_post_comments
- trashed_post
- trashed_post_comments
- twenty_twenty_one_can_show_post_thumbnail
- twentynineteen_can_show_post_thumbnail
- twentytwenty_disallowed_post_types_for_meta_output
- twentytwenty_end_of_post_meta_list
- twentytwenty_post_meta_location_single_bottom
- twentytwenty_post_meta_location_single_top
- twentytwenty_start_of_post_meta_list
- unregistered_post_type
- untrash_post
- untrash_post_comments
- untrashed_post
- untrashed_post_comments
- update_post_term_count_statuses
- upgrader_post_install
- upload_post_params
- use_block_editor_for_post
- use_block_editor_for_post_type
- view_mode_post_types
- wp_after_insert_post
- wp_check_post_lock_window
- wp_delete_application_password
- wp_delete_file
- wp_delete_nav_menu
- wp_delete_site
- wp_insert_post
- wp_insert_post_data
- wp_insert_post_empty_content
- wp_insert_post_parent
- wp_list_table_show_post_checkbox
- wp_post_revision_meta_keys
- wp_post_revision_title_expanded
- wp_restore_post_revision
- wp_save_post_revision_check_for_changes
- wp_save_post_revision_post_has_changed
- wp_save_post_revision_revisions_before_deletion
- wp_sitemaps_post_types
- wp_trash_post
- wp_unique_post_slug
- wp_unique_post_slug_is_bad_attachment_slug
- wp_unique_post_slug_is_bad_flat_slug
- wp_unique_post_slug_is_bad_hierarchical_slug
- wp_untrash_post_status
- wp_{$post->post_type}_revisions_to_keep
- wpmu_delete_blog_upload_dir
- wpmu_delete_user
- xmlrpc_default_post_fields
- xmlrpc_prepare_post
- xmlrpc_prepare_post_type
- xmlrpc_publish_post
- xmlrpc_wp_insert_post_data
- {$adjacent}_post_link
- {$adjacent}_post_rel_link
- {$boundary}_post_rel_link
- {$new_status}_{$post->post_type}