*/
$wgUseCombinedLoginLink = false;
+/**
+ * Appearance of user page and talk page labels in personal tools.
+ * - true = combine links into a single label
+ * - false = keep links in separate labels
+ */
+$wgVectorCombineUserTalk = false;
+
/**
* Search form look for Vector skin only.
* - true = use an icon search button
$attrs['class'] .= ' active';
$attrs['class'] = trim( $attrs['class'] );
}
-
- // A special case for the talk link in personal tools.
- // See bug 41672 and 42337.
- if ( $key === 'mytalk' ) {
- $html = $this->getMsg( 'parentheses' )->rawParams( $html )->escaped();
- }
-
return Html::rawElement( isset( $options['tag'] ) ? $options['tag'] : 'li', $attrs, $html );
}
* @param $elements array
*/
protected function renderNavigation( $elements ) {
- global $wgVectorUseSimpleSearch;
+ global $wgVectorUseSimpleSearch, $wgVectorCombineUserTalk;
// If only one element was given, wrap it in an array, allowing more
// flexible arguments
<ul<?php $this->html( 'userlangattributes' ) ?>>
<?php
$personalTools = $this->getPersonalTools();
+ if ( $wgVectorCombineUserTalk && isset( $personalTools['userpage'] ) ) {
+?>
+ <li>
+<?php
+ echo $this->makeListItem( 'userpage', $personalTools['userpage'], array( 'tag' => 'span' ) );
+?> <?php
+ $personalTools['mytalk']['links'][0]['text'] = $this->getMsg( 'mytalk-parenthetical' )->text();
+ $talkItem = $this->makeListItem( 'mytalk', $personalTools['mytalk'], array( 'tag' => 'span' ) );
+ echo $this->getMsg( 'parentheses' )->rawParams( $talkItem )->escaped();
+ unset( $personalTools['userpage'], $personalTools['mytalk'] );
+?>
+ </li>
+<?php
+ }
foreach ( $personalTools as $key => $item ) {
echo $this->makeListItem( $key, $item );
}