Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2008-07-16 01:54:00

jm
Plugin Author
From: Missoula, MT
Registered: 2005-11-27
Posts: 1,746
Website

Plugin tip: Variable functions

Thought I’d share this for any plugin devs not on IRC.

Variable functions are awesome. I finally found a good use for them – heredocs!

$gTxt = 'gTxt';
echo <<<EOD
{$gTxt('yes')}!
EOD;

Offline

#2 2008-07-16 05:03:25

net-carver
Archived Plugin Author
Registered: 2006-03-08
Posts: 1,648

Re: Plugin tip: Variable functions

Thanks for sharing that JM!


Steve

Offline

#3 2008-07-16 11:05:08

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,453
Website GitHub

Re: Plugin tip: Variable functions

Way cool, thanks.


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

Board footer

Powered by FluxBB