&$archive: PageArchive object
$title: Title object of the page that we're about to undelete
+'UndeletePageToolLinks': Add one or more links to edit page subtitle when a page
+has been previously deleted.
+$context: IContextSource (object)
+$linkRenderer: LinkRenderer instance
+&$links: Array of HTML strings
+
'UndeleteShowRevision': Called when showing a revision in Special:Undelete.
$title: title object related to the revision
$rev: revision (object) that will be viewed
$msg = 'viewdeleted';
}
- return $this->msg( $msg )->rawParams(
+ $subtitle = $this->msg( $msg )->rawParams(
$linkRenderer->makeKnownLink(
SpecialPage::getTitleFor( 'Undelete', $this->getTitle()->getPrefixedDBkey() ),
$this->msg( 'restorelink' )->numParams( $n )->text() )
)->escaped();
+
+ // Allow extensions to add more links
+ $links = [];
+ Hooks::run( 'UndeletePageToolLinks', [ $this->getContext(), $linkRenderer, &$links ] );
+
+ if ( $links ) {
+ $subtitle .= ''
+ . $this->msg( 'word-separator' )->escaped()
+ . $this->msg( 'parentheses' )
+ ->rawParams( $this->getLanguage()->pipeList( $links ) )
+ ->escaped();
+ }
+ return Html::rawElement( 'div', [ 'class' => 'mw-undelete-subtitle' ], $subtitle );
}
}