allow a block to contain $content
This commit is contained in:
parent
ed284fd4ea
commit
70fa00c014
@ -166,12 +166,19 @@ function comanche_block($s, $class = '') {
|
|||||||
intval($channel_id),
|
intval($channel_id),
|
||||||
dbesc($name)
|
dbesc($name)
|
||||||
);
|
);
|
||||||
|
|
||||||
if($r) {
|
if($r) {
|
||||||
$o .= (($var['wrap'] == 'none') ? '' : '<div class="' . $class . '">');
|
$o .= (($var['wrap'] == 'none') ? '' : '<div class="' . $class . '">');
|
||||||
if($r[0]['title'])
|
if($r[0]['title'])
|
||||||
$o .= '<h3>' . $r[0]['title'] . '</h3>';
|
$o .= '<h3>' . $r[0]['title'] . '</h3>';
|
||||||
|
|
||||||
|
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 .= prepare_text($r[0]['body'], $r[0]['mimetype']);
|
||||||
|
}
|
||||||
|
|
||||||
$o .= (($var['wrap'] == 'none') ? '' : '</div>');
|
$o .= (($var['wrap'] == 'none') ? '' : '</div>');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user