4 this _link_regex_callback() plugin includes the correct css
5 class names into the <a> links generated by ewiki_format()
7 known classes (always lowercase):
8 <a class="wikipage" href="...">
9 <a class="binary" href="...">
10 <b class="notfound">...</b><a class="notfound" href="...">
11 <a class="email" href="...">
12 <a class="anchor" href="...">
13 <a class="http" href="..."> and all others
14 <a class="interwiki" href="...">
15 <a class="meatball" href="..."> and all others
20 $ewiki_plugins["link_final"][] = "ewiki_link_css";
24 function ewiki_link_css(&$html, $type, $href, $title) {
30 $classes = strtolower(implode(" ", $type));
32 if (strpos(">?</a>", $html)) {
33 $html = str_replace("<b ", '<b class="'.$classes.'" ', $html);
36 if (!strpos($type, "image")) {
37 $html = str_replace("<a ", '<a class="'.$classes.'" ', $html);