Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Files
F12944080
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
723 B
Referenced Files
None
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
||
trim
(
$params
[
1
],
'"'
)
==
'true'
)
{
return
"preg_replace('!<[^>]*?>!', ' ', {$params[0]})"
;
}
else
{
return
'strip_tags('
.
$params
[
0
]
.
')'
;
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Tue, Nov 18, 17:04 (15 h, 44 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3156481
Default Alt Text
modifiercompiler.strip_tags.php (723 B)
Attached To
Mode
rOBSIDIAN Obsidian Workspaces
Attached
Detach File
Event Timeline
Log In to Comment