fault values, with a value of false meaning to suppress the attribute.
&$query: the query string to add to the generated URL (the bit after the "?"),
in associative array form, with keys and values unescaped.
-&$options: the options. Can include 'known', 'broken', 'noclasses'.
+&$options: array of options. Can include 'known', 'broken', 'noclasses'.
&$ret: the value to return if your hook returns false.
'LinkEnd': Used when generating internal and interwiki links in Linker::link(),
*/
public function link( $target, $text = null, $customAttribs = array(), $query = array(), $options = array() ) {
wfProfileIn( __METHOD__ );
+ if( !$target instanceof Title ) {
+ return "<!-- ERROR -->$text";
+ }
+ $options = (array)$options;
+
$ret = null;
if( !wfRunHooks( 'LinkBegin', array( $this, $target, &$text,
&$customAttribs, &$query, &$options, &$ret ) ) ) {
return $ret;
}
- if( !$target instanceof Title ) {
- return "<!-- ERROR -->$text";
- }
- $options = (array)$options;
-
# Normalize the Title if it's a special page
$target = $this->normaliseSpecialPage( $target );