get_delete_post_link filter-hookWP 2.9.0

Filters the post delete link.

Usage

add_filter( 'get_delete_post_link', 'wp_kama_get_delete_post_link_filter', 10, 3 );

/**
 * Function for `get_delete_post_link` filter-hook.
 * 
 * @param string $link         The delete link.
 * @param int    $post_id      Post ID.
 * @param bool   $force_delete Whether to bypass the Trash and force deletion.
 *
 * @return string
 */
function wp_kama_get_delete_post_link_filter( $link, $post_id, $force_delete ){

	// filter...
	return $link;
}
$link(string)
The delete link.
$post_id(int)
Post ID.
$force_delete(true|false)
Whether to bypass the Trash and force deletion.
Default: false

Changelog

Since 2.9.0 Introduced.

Where the hook is called

get_delete_post_link()
get_delete_post_link
wp-includes/link-template.php 1580
return apply_filters( 'get_delete_post_link', wp_nonce_url( $delete_link, "$action-post_{$post->ID}" ), $post->ID, $force_delete );

Where the hook is used in WordPress

Usage not found.