aboutsummaryrefslogtreecommitdiff
path: root/h-source/Library/Functions.php
diff options
context:
space:
mode:
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";
}