user_can_delete_post

函数


user_can_delete_post ( $user_id, $post_id, $blog_id = 1 )
参数
  • (int)
    $user_id
    Required:
  • (int)
    $post_id
    Required:
  • (int)
    $blog_id
    Not Used
    Required:
    Default: 1
返回值
  • (bool)
相关
  • current_user_can()
定义位置
  • wp-includes/deprecated.php
    , line 270
引入
1.5.0
弃用
2.0.0

Whether user can delete a post.

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);
}