allow block title to contain $content title

This commit is contained in:
Mario Vavti 2015-05-18 22:18:01 +02:00
parent 6ab7394565
commit 4e3583ab45

View file

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