wppaste
WordPress

user_can_delete_post( int $user_id, int $post_id, int $blog_id = 1 ): bool

Since
1.5.0
Source
wp-includes/deprecated.php:274
Whether user can delete a post.

Parameters

$user_idint
$post_idint
$blog_idintoptional
Not UsedDefault: 1

Return

bool

Uses · 2

Source

function user_can_delete_post($user_id, $post_id, $blog_id = 1) {	_deprecated_function( __FUNCTION__, '2.0.0', 'current_user_can()' ); 	// Right now if one can edit, one can delete.	return user_can_edit_post($user_id, $post_id, $blog_id);}

History

Introduced in 1.5.0. Unchanged from 6.7.7 through 7.1.0.

  1. 6.7.7
  2. 6.8.8
  3. 6.9.7
  4. 7.0.4
  5. 7.1.0

Signature, return type and hooks compared across 5 parsed releases.

2.0.0
Deprecated. Use current_user_can()from the docblock
1.5.0
Introduced.from the docblock

About this page

Parsed data
Generated from the wordpress-develop 7.0.4 tag, from src/wp-includes/deprecated.php, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.
Corrections
Something wrong on this page? Report it and it gets fixed in the next regeneration.