allow block title to contain $content title
This commit is contained in:
parent
6ab7394565
commit
4e3583ab45
@ -167,12 +167,21 @@ function comanche_block($s, $class = '') {
|
|||||||
dbesc($name)
|
dbesc($name)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
//print_r($r); killme();
|
||||||
|
|
||||||
if($r) {
|
if($r) {
|
||||||
$o .= (($var['wrap'] == 'none') ? '' : '<div class="' . $class . '">');
|
$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']);
|
$o .= prepare_text(get_app()->data['webpage'][0]['body'], get_app()->data['webpage'][0]['mimetype']);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
Reference in New Issue
Block a user