includes/render.php
changeset 798 ddfc1b554a08
parent 745 0a3866f74faa
child 800 9cdfe82c56cd
--- a/includes/render.php	Wed Dec 24 10:04:48 2008 -0500
+++ b/includes/render.php	Wed Dec 31 08:40:38 2008 -0500
@@ -286,7 +286,7 @@
       $text = preg_replace('/<nodisplay>(.*?)<\/nodisplay>/is', '', $text);
     }
     
-    preg_match_all('/<lang code="([a-z0-9_-]+)">([\w\W]+?)<\/lang>/', $text, $langmatch);
+    preg_match_all('/<lang (?:code|id)="([a-z0-9_-]+)">([\w\W]+?)<\/lang>/', $text, $langmatch);
     foreach ( $langmatch[0] as $i => $match )
     {
       if ( $langmatch[1][$i] == $lang->lang_code )
@@ -316,6 +316,12 @@
       $text = RenderMan::include_templates($text);
     }
     
+    $code = $plugins->setHook('render_wikiformat_posttemplates');
+    foreach ( $code as $cmd )
+    {
+      eval($cmd);
+    }
+    
     if ( !$plaintext )
     {
       // Process images