mirror of
https://codeberg.org/streams/streams.git
synced 2024-09-20 01:35:12 +00:00
allow a block to contain $content
This commit is contained in:
parent
ed284fd4ea
commit
70fa00c014
1 changed files with 8 additions and 1 deletions
|
@ -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>');
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue