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
9 $ewiki_plugins["link_final"][] = "ewiki_link_final_target_blank";
12 function ewiki_link_final_target_blank(&$str, $type, $href, $title) {
14 if (is_array($type) && in_array("url", $type)) {
15 $str = str_replace('<a ', '<a target="_blank" ', $str);