Before
------
`{htxt}` guard works with static IDs (`{htxt id="abc"}`)
After
-----
`{htxt}` guard with with variable ID (`{htxt id=$abc}`)
Comments
--------
As discussed in dev/core#4303, one relevant use-case comes from `CustomField.hlp`.
In my copy of universe, there's a similar construction in
`nz.co.fuzion.entitysetting` (`entitysettingscommon.hlp`).
$htxts++;
return sprintf('{if $id == %s}%s', $m[1], $m[0]);
},
+ '/\{htxt id=(\$\w+)}/' => function ($m) use (&$htxts) {
+ $htxts++;
+ return sprintf('{if $id == %s}%s', $m[1], $m[0]);
+ },
';\{/htxt\};' => function($m) use (&$_htxts) {
$_htxts++;
return '{/htxt}{/if}';