WordPress.org

Ready to get started?Download WordPress

Codex

Attention Interested in functions, hooks, classes, or methods? Check out the new WordPress Code Reference!

Function Reference/get delete post link

Description

Returns URL to move a post to the trash as string value.

Can be used within the WordPress loop or outside of it. Can be used with pages, posts, attachments, and revisions.

Usage

 <?php echo get_delete_post_link$id ); ?> 

Parameters

id
(integer) (optional) The post ID
Default: None
deprecated
(string) (optional) Not used.
Default:
force_delete
(bool) (optional) Whether to bypass trash and force deletion.
Default: false

Return Value

(string) 
A string containing the permalink.

Changelog

  • Since: 2.9.0

Source File

get_delete_post_link() is located in wp-includes/link-template.php

Related

Edit Link: edit_post_link(), edit_comment_link(), edit_tag_link(), edit_bookmark_link(), get_edit_post_link()

See also index of Function Reference and index of Template Tags.