CARVIEW |
Select Language
HTTP/2 200
content-encoding: gzip
vary: Accept-Encoding,User-Agent
set-cookie: lfuser=null; expires=Mon, 15-Sep-2025 19:02:01 GMT; Max-Age=0; path=/; secure
set-cookie: lfpass=null; expires=Mon, 15-Sep-2025 19:02:01 GMT; Max-Age=0; path=/; secure
cache-control: max-age=600
expires: Wed, 15 Oct 2025 19:12:01 GMT
content-type: text/html; charset=UTF-8
date: Wed, 15 Oct 2025 19:02:01 GMT
server: Apache
trash_post Wordpress hook details -- Adam Brown, BYU Political Science
WordPress hook directory
WP hooks navigation: Home/browse • Actions index • Filters index
WordPress hook directory
trash_post
WordPress version history for trash_post
This database has information for all major versions from WP 1.2.1 through 6.7.
Version | File | Line | Type | |
---|---|---|---|---|
2.9 | wp-includes/post.php | 1281 | View in context | action |
3.0 | wp-includes/post.php | 1828 | View in context | action |
3.1 | wp-includes/post.php | 2055 | View in context | action |
3.2 | wp-includes/post.php | 2086 | View in context | action |
Important warning!
This hook does not occur in the most recent version of WordPress (6.7). Do not use it. It is deprecated. You should look at the list of "related hooks" below to see if you can figure out what replaced it.
Related Hooks
We find related hooks using word stems. trash_post has 2 significant word stem(s): trash
, 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}
- after_delete_post
- app_publish_post
- atompub_create_post
- atompub_put_post
- auth_post_meta_{$meta_key}
- auth_post_{$post_type}_meta_{$meta_key}
- before_delete_post
- begin_fetch_post_thumbnail_html
- bulk_post_updated_messages
- clean_post_cache
- close_comments_for_post_types
- comment_on_trash
- 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_post
- delete_post_{$post->post_type}
- 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_delete_post_link
- 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
- 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_types_to_delete_with_user
- post_unstuck
- post_updated
- post_updated_messages
- post_{$field}
- pre_comment_on_post
- pre_delete_post
- pre_get_available_post_mime_types
- pre_post_link
- pre_post_update
- pre_post_{$field}
- pre_trackback_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_{$this->post_type}
- 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_comment
- 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_post_revision
- 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_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
- 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}