echo ' emptyPortlet';
}
?>" aria-labelledby="p-variants-label">
- <h3 id="mw-vector-current-variant">
- <?php
- foreach ( $this->data['variant_urls'] as $link ) {
- ?>
- <?php
- if ( stripos( $link['attributes'], 'selected' ) !== false ) {
- ?>
- <?php
- echo htmlspecialchars( $link['text'] )
- ?>
- <?php
- }
- ?>
- <?php
+ <?php
+ // Replace the label with the name of currently chosen variant, if any
+ $variantLabel = $this->getMsg( 'variants' )->text();
+ foreach ( $this->data['variant_urls'] as $link ) {
+ if ( stripos( $link['attributes'], 'selected' ) !== false ) {
+ $variantLabel = $link['text'];
+ break;
}
- ?>
- </h3>
-
- <h3 id="p-variants-label"><span><?php $this->msg( 'variants' ) ?></span><a href="#"></a></h3>
+ }
+ ?>
+ <h3 id="p-variants-label"><span
+ style="display: block;" <?php /* Temporary WMF deployment hack, to be removed before 1.24 release */ ?>
+ ><?php echo htmlspecialchars( $variantLabel ) ?></span><a href="#"></a></h3>
<div class="menu">
<ul>
}
// The "Variants" menu has a really funny structure
+// Temporary WMF deployment hack, to be removed before 1.24 release
div#mw-head div.vectorMenu#p-variants {
#p-variants-label span {
display: none;