set_title("Adding posts from csv"); $page->set_heading("Adding posts from csv"); $page->add_block(new NavBlock()); foreach ($this->messages as $block) { $page->add_block($block); } } /* * Add a section to the admin page. This should contain a form which * links to bulk_add_csv with POST[csv] set to the name of a server-side * csv file */ public function display_admin_block(): void { global $page; $html = " Add posts from a csv. Posts will be tagged and have their source and rating set (if \"Post Ratings\" is enabled)
Specify the absolute or relative path to a local .csv file. Check here for the expected format.

".make_form(make_link("bulk_add_csv"))."
CSV
"; $page->add_block(new Block("Bulk Add CSV", $html)); } public function add_status(string $title, string $body): void { $this->messages[] = new Block($title, $body); } }