Escaping Dollar Sign in Live Template

I am attemtping to write a PHP Live Template for use with Advanced Custom Fields WordPress plugin.

I often find my self doing the following

$fieldname = get_field('fieldname');

I'd like to make a template like

$$VAR$ = get_field('$VAR0$');

However, that does not seem to work. Is there a way to escape the dolalr sign character?

Thanks,

1 comment
Comment actions Permalink

Have you tried using "Help" button?

http://www.jetbrains.com/phpstorm/webhelp/live-templates-2.html

If you need a dollar sign ($) in the template text, escape it by duplicating this character ($$).


P.S.
Default PHP Live Templates "fore" and "forek" use it, so you could check them up in case if help was not unavailable for some reason.


$$$VAR$ = get_field('$VAR0$');

0

Please sign in to leave a comment.