Yaml file:
- name: hero-block
title: Hero Block
description: A Hero Block Section block
category: landing-pages
icon: welcome-view-site
example:
attributes:
mode: preview
data:
headline: !php/const LIPSUM
subheadline: !php/const LIPSUM
custom: !my_tag echo 1
Php file
function yaml_parse($relname) {
return Yaml::parse(
file_get_contents(get_template_directory() . '/flat_data/' .$relname. '.yaml'),
Yaml::PARSE_CONSTANT); // PARSE_CUSTOM_TAGS
}
Flag for parse is of type Int. Can't think of any way to achieve desired output. Any tip is much appreciated.