0) { $deleted = (new \Plugi\Extensions\Blog\PostsRepository())->destroy((int) $_POST['id']); } } catch (\Throwable) { $deleted = false; } phpb_redirect(phpb_url('website_manager', ['tab' => 'ext--blog', 'action' => 'posts']), [ 'message-type' => $deleted ? 'success' : 'error', 'message' => $deleted ? 'Post deleted.' : 'The post could not be deleted.', ]);