Add support for 'link' objects in templates (with conditions)

.. to simplify conditional <link> tags injection while nested 'if' objects do not work
pull/5838/head
Aleksander Machniak 8 years ago
parent 71ff264b02
commit f03839b24b

@ -1221,6 +1221,17 @@ EOF;
return $hook['content'];
// return <link> element
case 'link':
if ($attrib['condition'] && !$this->check_condition($attrib['condition'])) {
break;
}
unset($attrib['condition']);
return html::tag('link', $attrib);
// return code for a specified eval expression
case 'exp':
return html::quote($this->eval_expression($attrib['expression']));

Loading…
Cancel
Save