'EditPageGetCheckboxesDefinition', or 'EditPage::showStandardInputs:options'
if you don't actually care about checkboxes and just want to add some HTML
to the page.
+* Selflinks are now rendered as href-less <a> tags with the class mw-selflink
+ rather than <strong> tags. The old class name, "selflink", was deprecated
+ and will be removed in a future release. (T160480)
== Compatibility ==
}
/**
- * Make appropriate markup for a link to the current article. This is
- * currently rendered as the bold link text. The calling sequence is the
- * same as the other make*LinkObj static functions, despite $query not
- * being used.
+ * Make appropriate markup for a link to the current article. This is since
+ * MediaWiki 1.29.0 rendered as an <a> tag without an href and with a class
+ * showing the link text. The calling sequence is the same as for the other
+ * make*LinkObj static functions, but $query is not used.
*
* @since 1.16.3
* @param Title $nt
* @return string
*/
public static function makeSelfLinkObj( $nt, $html = '', $query = '', $trail = '', $prefix = '' ) {
- $ret = "<strong class=\"selflink\">{$prefix}{$html}</strong>{$trail}";
+ $ret = "<a class=\"mw-selflink selflink\">{$prefix}{$html}</a>{$trail}";
if ( !Hooks::run( 'SelfLinkBegin', [ $nt, &$html, &$trail, &$prefix, &$ret ] ) ) {
return $ret;
}
$html = htmlspecialchars( $nt->getPrefixedText() );
}
list( $inside, $trail ) = self::splitTrail( $trail );
- return "<strong class=\"selflink\">{$prefix}{$html}{$inside}</strong>{$trail}";
+ return "<a class=\"mw-selflink selflink\">{$prefix}{$html}{$inside}</a>{$trail}";
}
/**
color: #ba0000;
}
+/* self links */
+a.mw-selflink {
+ color: inherit;
+ font-weight: bold;
+ text-decoration: inherit;
+}
+a.mw-selflink:hover {
+ cursor: inherit;
+ text-decoration: inherit;
+}
+
/* Plainlinks - this can be used to switch
* off special external link styling */
.plainlinks a.external {
!! wikitext
[[Bug462]] [[Bug462]]
!! html/php
-<p><strong class="selflink">Bug462</strong> <strong class="selflink">Bug462</strong>
+<p><a class="mw-selflink selflink">Bug462</a> <a class="mw-selflink selflink">Bug462</a>
</p>
!! html/php+tidy
-<p><strong class="selflink">Bug462</strong> <strong class="selflink">Bug462</strong></p>
+<p><a class="mw-selflink selflink">Bug462</a> <a class="mw-selflink selflink">Bug462</a></p>
!! html/parsoid
<p><a rel="mw:WikiLink" href="./Bug462" title="Bug462">Bug462</a> <a rel="mw:WikiLink" href="./Bug462" title="Bug462">Bug462</a></p>
!! end
!! wikitext
[[0]]
!! html
-<p><strong class="selflink">0</strong>
+<p><a class="mw-selflink selflink">0</a>
</p>
!!end
!! wikitext
[[local:Main Page]]
!! html/php
-<p><strong class="selflink">local:Main Page</strong>
+<p><a class="mw-selflink selflink">local:Main Page</a>
</p>
!! html/parsoid
<p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">local:Main Page</a></p>
!! wikitext
Both [[Dunav]] and [[Дунав]] are names for this river.
!! html
-<p>Both <strong class="selflink">Dunav</strong> and <strong class="selflink">Дунав</strong> are names for this river.
+<p>Both <a class="mw-selflink selflink">Dunav</a> and <a class="mw-selflink selflink">Дунав</a> are names for this river.
</p>
!!end
!! wikitext
[[Дуна]] is not a self-link while [[Duna]] and [[Dуна]] are still self-links.
!! html
-<p><a href="/wiki/%D0%94%D1%83%D0%BD%D0%B0" title="Дуна">Дуна</a> is not a self-link while <strong class="selflink">Duna</strong> and <strong class="selflink">Dуна</strong> are still self-links.
+<p><a href="/wiki/%D0%94%D1%83%D0%BD%D0%B0" title="Дуна">Дуна</a> is not a self-link while <a class="mw-selflink selflink">Duna</a> and <a class="mw-selflink selflink">Dуна</a> are still self-links.
</p>
!! end
!! wikitext
[[Dуна]] is a self-link while [[Dunа#Foo]] and [[Dуна#Foo]] are not self-links.
!! html
-<p><strong class="selflink">Dуна</strong> is a self-link while <a href="/wiki/%D0%94%D1%83%D0%BD%D0%B0" title="Дуна">Dunа#Foo</a> and <a href="/wiki/%D0%94%D1%83%D0%BD%D0%B0" title="Дуна">Dуна#Foo</a> are not self-links.
+<p><a class="mw-selflink selflink">Dуна</a> is a self-link while <a href="/wiki/%D0%94%D1%83%D0%BD%D0%B0" title="Дуна">Dunа#Foo</a> and <a href="/wiki/%D0%94%D1%83%D0%BD%D0%B0" title="Дуна">Dуна#Foo</a> are not self-links.
</p>
!! end