Add wiki_preprocess hook and documentation

This commit is contained in:
M.Dent
2018-10-10 22:46:00 -04:00
parent 802ccdff4a
commit bad4ea6e65
4 changed files with 19 additions and 1 deletions

View File

@@ -619,7 +619,7 @@ class NativeWikiPage {
$s = str_replace('[observer.webname]', '', $s);
$s = str_replace('[observer.photo]', '', $s);
}
return $s;
}

View File

@@ -331,6 +331,10 @@ class Wiki extends Controller {
$sampleContent = t('New page');
$content = (($p['content'] == '') ? $sampleContent : $p['content']);
$hookinfo = ['content' => $content, 'mimetype' => $mimeType];
call_hooks('wiki_preprocess',$hookinfo);
$content = $hookinfo['content'];
// Render the Markdown-formatted page content in HTML
if($mimeType == 'text/bbcode') {