Yoast\WP\SEO\Bulk_Editor\Infrastructure\Updates

Post_Access_Checker::can_edit │ public │ Yoast 1.0

Whether the current user is allowed to edit the post.

Метод класса: Post_Access_Checker{}

Хуков нет.

Возвращает

bool. Whether the current user is allowed to edit the post.

Использование

$Post_Access_Checker = new Post_Access_Checker();
$Post_Access_Checker->can_edit( $post_id ): bool;
$post_id(int) (обязательный)
The ID of the post.

Код Post_Access_Checker::can_edit() Yoast 28.9

public function can_edit( int $post_id ): bool {
	return \current_user_can( 'edit_post', $post_id );
}