allow a block to contain $content

This commit is contained in:
Mario Vavti 2015-05-15 22:20:45 +02:00
parent ed284fd4ea
commit 70fa00c014

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>');
}
}