another fix
parent
6236f57500
commit
7f28472b77
|
|
@ -18,15 +18,17 @@ class kodrs extends plugins {
|
||||||
|
|
||||||
function source_code_beautifier() {
|
function source_code_beautifier() {
|
||||||
global $rows;
|
global $rows;
|
||||||
foreach($rows as $key=>$post){
|
if(count($rows)>0){
|
||||||
// Si no es tipo 'post' entonces no tiene 'Body' :)
|
foreach($rows as $key=>$post){
|
||||||
if($post["postType"]=="post"){
|
// Si no es tipo 'post' entonces no tiene 'Body' :)
|
||||||
$text = $rows[$key]['Body'];
|
if($post["postType"]=="post"){
|
||||||
$result = preg_replace_callback("/<code\s+.*lang\s*=\"(.*)\">(.*)<\/code>/siU",
|
$text = $rows[$key]['Body'];
|
||||||
array('kodrs', 'replace_with_geshi'),
|
$result = preg_replace_callback("/<code\s+.*lang\s*=\"(.*)\">(.*)<\/code>/siU",
|
||||||
$text
|
array('kodrs', 'replace_with_geshi'),
|
||||||
);
|
$text
|
||||||
$rows[$key]['Body'] = $result;
|
);
|
||||||
|
$rows[$key]['Body'] = $result;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue