| @@ -1,14 +1,22 @@ | ||
| 1 | -<?php | |
| 2 | - | |
| 3 | -function osc_theme_iconhead($params, $content = null) { | |
| 4 | - extract(shortcode_atts(array( | |
| 5 | - 'class' => '', | |
| 6 | - ), $params)); | |
| 7 | - $out = ''; | |
| 8 | - $out = '<h3><span class="glyphicon '.$class.'"></span> '.$content.'</h3>'; | |
| 9 | - | |
| 10 | - return $out; | |
| 11 | -} | |
| 12 | - | |
| 13 | -add_shortcode('iconheading', 'osc_theme_iconhead'); | |
| 14 | - | |
| 1 | +<?php | |
| 2 | + | |
| 3 | +function osc_theme_iconhead($params, $content = null) { | |
| 4 | + extract(shortcode_atts(array( | |
| 5 | + 'class' => '', | |
| 6 | + 'style' => '', | |
| 7 | + 'type' => 'h1' | |
| 8 | + ), $params)); | |
| 9 | + $out = ''; | |
| 10 | + if ($style != '') { | |
| 11 | + $style = ' <span class="glyphicon ' . $style . '"></span> '; | |
| 12 | + } | |
| 13 | + if ($class != '') { | |
| 14 | + $class = ' class="' . $class . '"'; | |
| 15 | + } | |
| 16 | + $out = '<' . $type . $class . '>' . $style . do_shortcode($content) . '</' . $type . '>'; | |
| 17 | + | |
| 18 | + return $out; | |
| 19 | +} | |
| 20 | + | |
| 21 | +add_shortcode('iconheading', 'osc_theme_iconhead'); | |
| 22 | + | |