a932a3f91458a49004b6e3d6db2cb0dfc545ead5
[atutor.git] / mods / wiki / plugins / markup / rendering_null.php
1 <?php
2
3  # this plugin replaces the wiki rendering core with almost nothing, and
4  # thus allows you to put plain HTML into all pages
5  # (WikiWords however, will still render as usual)
6
7
8
9 $ewiki_plugins["render"][0] = "ewiki_format_null";
10
11
12
13 function ewiki_format_null ($content, $scan_links=1, $HTML=1, $HTML=1) {
14
15    global $ewiki_plugins, $ewiki_links;
16
17    $link_regex = "#[!~]?(
18 \[[^<>[\]\n]+\] |
19 \^[-".EWIKI_CHARS_U.EWIKI_CHARS_L."]{3,} |
20 (?:[".EWIKI_CHARS_U."]+[".EWIKI_CHARS_L."]+){2,}[\w\d]*(:[\w\d]{3,})?
21 )#";
22    $link_regex = str_replace(" ", "", strtr($link_regex, "\n", " "));
23    
24    $content = preg_replace_callback($link_regex, "ewiki_link_regex_callback", $content);
25
26    #-- call post processing plugins
27    foreach (@$ewiki_plugins["format_final"] as $pf) $pf($content);
28
29    return($content);
30
31 }
32
33
34 ?>