get_delete_post_link

SummerySummery

Retrieves the delete posts link for post.

Syntax

get_delete_post_link( int|WP_Post $id, string $deprecated = '', bool $force_delete = false )

DescriptionDescription

Can be used within the WordPress loop or outside of it, with any post type.

ParametersParameters

$id

(int|WP_Post) (Optional) Post ID or post object. Default is the global $post.

$deprecated

(string) (Optional) Not used.

Default value: ''

$force_delete

(bool) (Optional) Whether to bypass Trash and force deletion.

Default value: false

ReturnReturn

(string|void) The delete post link URL for the given post.

SourceSource

File: wp-includes/link-template.php


			

ChangelogChangelog

Changelog
Version Description
2.9.0 Introduced.
Scroll to Top