aboutsummaryrefslogtreecommitdiff
path: root/h-source/Library/Functions.php
diff options
context:
space:
mode:
authorAntonio Gallo <tonicucoz@gmail.com>2011-07-28 20:27:23 +0000
committerAntonio Gallo <tonicucoz@gmail.com>2011-07-28 20:27:23 +0000
commite7b3717614621f14695ab6ca6dda6dd17ba3d65c (patch)
treec8e6061aef3ff7bad5a17e1aecaf441d35e282cb /h-source/Library/Functions.php
parent0de74c6879d263645770de3d6b3ce7123f5241d6 (diff)
added new easygiant library
Diffstat (limited to 'h-source/Library/Functions.php')
-rwxr-xr-xh-source/Library/Functions.php13
1 files changed, 12 insertions, 1 deletions
diff --git a/h-source/Library/Functions.php b/h-source/Library/Functions.php
index 8384580..705c1c0 100755
--- a/h-source/Library/Functions.php
+++ b/h-source/Library/Functions.php
@@ -207,7 +207,18 @@ function wrap($string,$tag_class) {#wrap the string with the tag and its class
if (is_array($tag_class)) {
foreach ($tag_class as $tag => $class) {
$tag = str_replace('+','',$tag);
- $str_class=isset($class) ? " class=\"".$class."\"" : null;
+ if (!is_array($class))
+ {
+ $str_class=isset($class) ? " class=\"".$class."\"" : null;
+ }
+ else
+ {
+ $str_class = null;
+ foreach ($class as $attr => $val)
+ {
+ $str_class .= " ".$attr."='".$val."' ";
+ }
+ }
$str_front.="<".$tag.$str_class.">\n";
$str_rear.="</".$tag.">\n";
}