public function form_publish_delete(FormUI $form)
{
$post = $form->post->value;
if (ACL::access_check($post->get_access(), 'delete')) {
$post->delete();
Session::notice(_t('Deleted the %1$s titled "%2$s".', array(Post::type_name($post->content_type), Utils::htmlspecialchars($post->title))));
}
Utils::redirect(URL::get('display_posts', 'type=' . $post->content_type));
}