Manual:Hooks/LinkBegin/ja

詳細
既定の処理をスキップするためには false および $ret を返す. 各パラメータの意味については Linker::link の文書を参照してください.
 * $dummy: used to be a skin, but that eliminated.
 * $target: リンクが指し示すタイトル.
 * &$html
 * &$customAttribs:  タグが持つであろう HTML 属性値 (such as title and class; href is ignored). 連想配列で、キーと値はエスケープされない. このパラメータは初期値にマージされる. 値が false の場合は属性の取消を意味する. Other attributes will replace default attributes.
 * &$query: 生成される URL に付加されるクエリ文字列 ("?" ～). 連想配列で、キーと値はエスケープされない. Query keys and values will be URL-encoded.
 * &$options: オプション値. 'known'、'broken'、'noclasses'、'forcearticlepath'、'http'、'https' を指定できる.
 * &$ret: フックが false を返す場合に返す値.

$options の値

 * 'known': Page is known to exist, so don't check if it does.
 * 'broken': Page is known not to exist, so don't check if it does.
 * 'noclasses': Don't add any classes automatically (includes "new", "stub", "mw-redirect", "extiw"). Only use the class attribute provided, if any, so you get a simple blue link with no funny icons.
 * 'forcearticlepath': Use the article path always, even with a querystring. Has compatibility issues on some setups, so avoid wherever possible.
 * 'http': Force a full URL with http:// as the scheme.
 * 'https': Force a full URL with https:// as the scheme.

例
The following code will show all wikilinks as broken (i.e. as red links) by changing the  class to "new":

Another way to achieve the same result would be to change  instead of   and return , like this:

関連項目

 * Manual:Hooks/LinkEnd