changed git call from https to git readonly
[atutor.git] / mods / wiki / plugins / linking / link_target_blank.php
1 <?php
2
3 #  this plugin chains into the url/link generation process and
4 #  adds <a target="_blank"> for external http:// urls, which will
5 #  make (most) browsers open the links in a new window
6
7
8
9 $ewiki_plugins["link_final"][] = "ewiki_link_final_target_blank";
10
11
12 function ewiki_link_final_target_blank(&$str, $type, $href, $title) {
13
14    if (is_array($type) && in_array("url", $type)) {
15       $str = str_replace('<a ', '<a target="_blank" ', $str);
16    }
17 }
18
19
20 ?>