PluginProbe
Easy Bootstrap Shortcode / 4.5
Easy Bootstrap Shortcode v4.5
trunk 2.4.0 2.5 3.4 3.5 3.6 3.7 4.0.0 4.4 4.5 4.5.4 5.0.0 5.0.1 5.0.2
easy-bootstrap-shortcodes / shortcode / iconhead / plugin_shortcode.php

plugin_shortcode.php in Easy Bootstrap Shortcode 4.5, at shortcode/iconhead/plugin_shortcode.php

28 lines 814 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 function osc_theme_iconhead($params, $content = null) {
4 extract(shortcode_atts(array(
5 'class' => '',
6 'style' => '',
7 'type' => 'h1',
8 'color'=>''
9 ), $params));
10 $out = '';
11 if($color!=''){
12 $color='style="color:'.$color.';"';
13 }
14 if ($style != '') {
15 $iconcount=explode(' ',$style);
16 array_filter($iconcount);
17 if(count($iconcount)==1){
18 $style= 'glyphicon '.$style;
19 }
20 $style = ' <span class=" ' . $style . '" '.$color.'></span> ';
21 }
22
23 $out = '<' . $type . ' class="' . $class .EBS_CONTAINER_CLASS. '" >' . $style . do_shortcode($content) . '</' . $type . '>';
24
25 return $out;
26 }
27
28 ebs_backward_compatibility_callback('iconheading', 'osc_theme_iconhead');