用户是否可以删除帖子。

原型

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

参数

$user_id (int) (Required)

$post_id (int) (Required)

$blog_id (int) (Optional) 不曾用过

返回值

(bool)  

源文件

路径:wp-includes/deprecated.php

<?php
...
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);
}
...
?>

其他

英文文档:https://developer.wordpress.org/reference/functions/user_can_delete_post/