user_can_delete_post_comments()
Устарела с версии 2.0.0. Больше не поддерживается и может быть удалена. Используйте current_user_can().
Whether user can delete a post.
Хуков нет.
Возвращает
true|false
. returns true if $user_id can delete $post_id's comments
Использование
user_can_delete_post_comments( $user_id, $post_id, $blog_id );
- $user_id(int) (обязательный)
- -
- $post_id(int) (обязательный)
- -
- $blog_id(int)
- Not Used
По умолчанию: 1
Заметки
- Смотрите: current_user_can()
Список изменений
С версии 1.5.0 | Введена. |
Устарела с 2.0.0 | Use current_user_can() |
Код user_can_delete_post_comments() user can delete post comments WP 6.8
function user_can_delete_post_comments($user_id, $post_id, $blog_id = 1) { _deprecated_function( __FUNCTION__, '2.0.0', 'current_user_can()' ); // Right now if one can edit comments, one can delete comments. return user_can_edit_post_comments($user_id, $post_id, $blog_id); }