Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F6770
variantlangattributes.patch
Public
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Authored By
•
bzimport
Nov 21 2014, 11:06 PM
2014-11-21 23:06:27 (UTC+0)
Size
1 KB
Referenced Files
None
Subscribers
None
variantlangattributes.patch
View Options
Index: skins/Vector.php
===================================================================
--- skins/Vector.php (revision 82013)
+++ skins/Vector.php (working copy)
@@ -350,7 +350,7 @@
<div class="menu">
<ul<?php $this->html('userlangattributes') ?>>
<?php foreach ( $this->data['variant_urls'] as $link ): ?>
- <li<?php echo $link['attributes'] ?>><a href="<?php echo htmlspecialchars( $link['href'] ) ?>" <?php echo $link['key'] ?>><?php echo htmlspecialchars( $link['text'] ) ?></a></li>
+ <li<?php echo $link['attributes'] ?>><a href="<?php echo htmlspecialchars( $link['href'] ) ?>" hreflang="<?php echo htmlspecialchars( $link['hreflang'] ) ?>" link=<?php echo htmlspecialchars( $link['lang'] ) ?>" <?php echo $link['key'] ?>><?php echo htmlspecialchars( $link['text'] ) ?></a></li>
<?php endforeach; ?>
</ul>
</div>
Index: includes/SkinTemplate.php
===================================================================
--- includes/SkinTemplate.php (revision 82013)
+++ includes/SkinTemplate.php (working copy)
@@ -1032,7 +1032,9 @@
$content_navigation['variants'][] = array(
'class' => ( $code == $preferred ) ? 'selected' : false,
'text' => $varname,
- 'href' => $title->getLocalURL( '', $code )
+ 'href' => $title->getLocalURL( '', $code ),
+ 'hreflang' => $code,
+ 'lang' => $code,
);
}
}
File Metadata
Details
Attached
Mime Type
text/x-diff
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
6309
Default Alt Text
variantlangattributes.patch (1 KB)
Attached To
Mode
T26742: Use lang, hreflang and rel="alternate" attributes in variant links
Attached
Detach File
Event Timeline
Log In to Comment