kirbytag()
Makes it possible to use any defined Kirbytag as standalone function
kirbytag(array|string $type, ?string $value = null, array $attr = [ ], array $data = [ ]): string
Parameters
Name | Type | Default |
---|---|---|
$type * | array |string |
– |
$value | string |null |
null |
$attr | array |
[ ] |
$data | array |
[ ] |
Return type
string
Example
echo kirbytag([
'link' => 'blog/my-article',
'text' => 'Go to my blog article'
]);
// will manually do the same as
// (link: blog/my-article text: Go to my blog article)
// in KirbyText