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()
定义位置
相关方法
user_can_create_postuser_can_edit_postuser_can_delete_post_commentsuser_can_set_post_dateuser_can_edit_post_date
引入
1.5.0
弃用
2.0.0

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

常见问题

FAQs
查看更多 >
闪电侠

(工作日 10:00 - 18:30 为您服务)

2025-12-06 12:33:18

您好,无论是售前、售后、意见建议……均可通过联系工单与我们取得联系。

您也可选择聊天工具与我们即时沟通或点击查看:

您的工单我们已经收到,我们将会尽快跟您联系!
取消
选择聊天工具: