Manual:$wgExternalLinkTarget
Appearance
| 構文解析: $wgExternalLinkTarget | |
|---|---|
| 外部リンクの既定のターゲットを設定する。 |
|
| 導入されたバージョン: | 1.14.0 (r41333) |
| 除去されたバージョン: | 使用中 |
| 許容される値: | (文字列) または false |
| 既定値: | false |
| その他の設定: アルファベット順 | 機能順 | |
詳細
外部リンクの既定のターゲットを設定します。
If set to e.g. "_blank", this will also set the "noreferrer" and "noopener" link rel to prevent the attack described at https://mathiasbynens.github.io/rel-noopener/.
Some older browsers may not support these link attributes, hence setting $wgExternalLinkTarget to _blank may represent a security risk to some of your users.
外部リンクを新しいウィンドウ (またはタブ) で開くには、LocalSettings.php に以下の行を追加します。
$wgExternalLinkTarget = '_blank';
値を false に設定すると、外部リンクに target 属性を設定しません (これは _self と同じ挙動です)。
値を変更した場合は、設定を反映させるためにページ キャッシュを更新してください。