- Added an event manager. Also, fixed some more bugs within Block and Section tokens

This commit is contained in:
mcndave committed 2023-01-26 13:32:52 +00:00
1 parent 58f73d914b
commit 08211282c2
14 files changed
+164 -18

No files matched your search

+7 -1
View File
@@ -16,7 +16,13 @@ class TitleExtension implements Extension, FunctionExtension {
}
public function parse(\Picea\Compiler\Context &$context, ?string $arguments, string $token) {
return "<?php echo title($arguments) ?>";
return <<<PHP
<?php
if ( null !== \$title = title($arguments) ) {
echo \$title;
}
?>
PHP;
}
public function handleTitle(? string $set = null, ...$arguments) : ? string