Content last modified Monday 3 September 2018
hop to #bottom
Categories:
Author:
About It:
Get it:
Rate it:
  • Helpful?
  • 0 Yes
  • 0 No
Flag it:

If you'd like to provide updated information and do not have access to directly edit, please contact the site admin; thanks!

rah_function

Rah_function turns every PHP function into a Textpattern tag. That’s right, with rah_function pretty much any PHP function can be used as a Textpattern tag. No need for PHP snippets, ending nor closing PHP tags — only thing you need is a Textpattern’s XML tag.

Need all caps? Can do:

<txp:rah_function call="mb_strtoupper">
	Hello World!
</txp:rah_function>

One might be unsure what the date is:

<txp:rah_function call="safe_strftime">
	%B %d, %Y %H:%M
</txp:rah_function>

Sometimes you might want to pass something to JavaScript. When that day comes, would be nice if that something was valid JavaScript:

<txp:rah_function call="json_encode">
	I want to be a valid JavaScript string.
</txp:rah_function>

More info and downloads

Article Request Count:
Keywords/tags:
Initially released:
2009/11
Posted here:
11 Jan 2010

You know you want to visit the Archives.
Published with Textpattern