# easy-bootstrap-shortcodes/4.4/shortcode/iconhead/plugin_shortcode.php

Easy Bootstrap Shortcode, version 4.4. 28 lines.

- Page: https://pluginprobe.com/plugins/easy-bootstrap-shortcodes/4.4/code/shortcode/iconhead/plugin_shortcode.php
- Raw: https://pluginprobe.com/plugins/easy-bootstrap-shortcodes/4.4/raw/shortcode/iconhead/plugin_shortcode.php
- Modified: 2015-05-27T06:08:44+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/easy-bootstrap-shortcodes/4.4/code/shortcode/iconhead/plugin_shortcode.php#L10-L20`.

```php
<?php

function osc_theme_iconhead($params, $content = null) {
    extract(shortcode_atts(array(
                'class' => '',
                'style' => '',
                'type' => 'h1',
        'color'=>''
                    ), $params));
    $out = '';
    if($color!=''){
        $color='style="color:'.$color.';"';
    }
    if ($style != '') {
        $iconcount=explode(' ',$style);
        array_filter($iconcount);
        if(count($iconcount)==1){
            $style= 'glyphicon '.$style;
        }
        $style = ' <span class=" ' . $style . '" '.$color.'></span> ';
    }

    $out = '<' . $type . ' class="' . $class .EBS_CONTAINER_CLASS. '" >' . $style . do_shortcode($content) . '</' . $type . '>';

    return $out;
}

ebs_backward_compatibility_callback('iconheading', 'osc_theme_iconhead');
```
