Page Menu
Home
Code
Search
Configure Global Search
Log In
Files
F1142049
modifiercompiler.strip_tags.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
765 B
Subscribers
None
modifiercompiler.strip_tags.php
View Options
<?php
/**
* Smarty plugin
*
* @package Smarty
* @subpackage PluginsModifierCompiler
*/
/**
* Smarty strip_tags modifier plugin
*
* Type: modifier<br>
* Name: strip_tags<br>
* Purpose: strip html tags from text
*
* @link http://www.smarty.net/manual/en/language.modifier.strip.tags.php strip_tags (Smarty online manual)
* @author Uwe Tews
* @param array $params parameters
* @return string with compiled code
*/
function
smarty_modifiercompiler_strip_tags
(
$params
,
$compiler
)
{
if
(!
isset
(
$params
[
1
]))
{
$params
[
1
]
=
true
;
}
if
(
$params
[
1
]
===
true
)
{
return
"preg_replace('!<[^>]*?>!', ' ', {$params[0]})"
;
}
else
{
return
'strip_tags('
.
$params
[
0
]
.
')'
;
}
}
?>
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Fri, Aug 1, 21:45 (1 w, 2 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
25763
Default Alt Text
modifiercompiler.strip_tags.php (765 B)
Attached To
rZEDHG ZedLegacy
Event Timeline
Log In to Comment