This commit is contained in:
redmatrix
2015-05-17 16:35:17 -07:00
6 changed files with 34 additions and 25 deletions

View File

@@ -166,12 +166,19 @@ function comanche_block($s, $class = '') {
intval($channel_id),
dbesc($name)
);
if($r) {
$o .= (($var['wrap'] == 'none') ? '' : '<div class="' . $class . '">');
if($r[0]['title'])
$o .= '<h3>' . $r[0]['title'] . '</h3>';
$o .= prepare_text($r[0]['body'], $r[0]['mimetype']);
if($r[0]['body'] === '$content') {
$o .= prepare_text(get_app()->data['webpage'][0]['body'], get_app()->data['webpage'][0]['mimetype']);
}
else {
$o .= prepare_text($r[0]['body'], $r[0]['mimetype']);
}
$o .= (($var['wrap'] == 'none') ? '' : '</div>');
}
}