/** * Attempt to show a custom editing introduction, if supplied * * @return bool */ protected function showCustomIntro() { // Code based on EditPage.php if ($this->editintro) { $title = Title::newFromText($this->editintro); if ($title instanceof Title && $title->exists() && $title->userCan('read')) { $wgOut = new OutputPage(); // Added using template syntax, to take <noinclude>'s into account. $wgOut->addWikiTextTitleTidy('{{:' . $title->getFullText() . '}}', $this->mTitle); // store it $text = $wgOut->getHTML(); $this->mEditPagePreloads['EditPageCustomIntro'] = array('content' => trim($text), 'class' => 'mw-custompreload'); return true; } else { return false; } } else { return false; } }