* * * @deprecated - the frontmatter is no more used to enter metadata. */ class action_plugin_combo_autofrontmatter extends DokuWiki_Action_Plugin { public function register(Doku_Event_Handler $controller) { /** * Called when new page is created * In order to set its content * https://www.dokuwiki.org/devel:event:common_pagetpl_load */ if (false) { $controller->register_hook('COMMON_PAGETPL_LOAD', 'BEFORE', $this, 'handle_new_page', array()); } } public function handle_new_page(Doku_Event $event, $param){ try { $page = MarkupPath::createPageFromExecutingId(); } catch (ExceptionCompile $e) { LogUtility::msg("Unable to handle a new page because the global id is unknown"); } $canonical = $page->getCanonicalOrDefault(); $event->data["tpl"] = <<