diff --git a/plugins/kodrs.php b/plugins/kodrs.php index 6d3a115..385e606 100644 --- a/plugins/kodrs.php +++ b/plugins/kodrs.php @@ -18,12 +18,17 @@ class kodrs extends plugins { function source_code_beautifier() { global $rows; - - $text = $rows[0]['Body']; - $result = preg_replace_callback("/(.*)<\/code>/siU", - array('kodrs', 'replace_with_geshi'), - $text); - $rows[0]['Body'] = $result; + foreach($rows as $key=>$post){ + // Si no es tipo 'post' entonces no tiene 'Body' :) + if($post["postType"]=="post"){ + $text = $rows[$key]['Body']; + $result = preg_replace_callback("/(.*)<\/code>/siU", + array('kodrs', 'replace_with_geshi'), + $text + ); + $rows[$key]['Body'] = $result; + } + } } static function replace_with_geshi($matches) {