- if ( $showActions ) { // we've already checked that the user had the requisite userright
- $actionLinks = array();
-
- // delete
- if ( ChangeTags::canDeleteTag( $tag )->isOK() ) {
- $actionLinks[] = Linker::linkKnown( $this->getPageTitle( 'delete' ),
- $this->msg( 'tags-delete' )->escaped(),
- array(),
- array( 'tag' => $tag ) );
- }
+ $actionLinks = [];
+
+ // delete
+ if ( $showDeleteActions && ChangeTags::canDeleteTag( $tag )->isOK() ) {
+ $actionLinks[] = $linkRenderer->makeKnownLink(
+ $this->getPageTitle( 'delete' ),
+ $this->msg( 'tags-delete' )->text(),
+ [],
+ [ 'tag' => $tag ] );
+ }
+
+ if ( $showManageActions ) { // we've already checked that the user had the requisite userright