| 1 |
<?php |
| 2 |
|
| 3 |
function osc_theme_list($params, $content = null) { |
| 4 |
extract(shortcode_atts(array( |
| 5 |
'class' => '' |
| 6 |
), $params)); |
| 7 |
$content = str_replace("]<br />", ']', $content); |
| 8 |
$content = str_replace("]<br />\n", ']', $content); |
| 9 |
$content = str_replace("<br />\n[", '[', $content); |
| 10 |
return '<ul class="list-group ' . $class .EBS_CONTAINER_CLASS. '">' . do_shortcode($content) . '</ul>'; |
| 11 |
} |
| 12 |
|
| 13 |
add_shortcode('list', 'osc_theme_list'); |
| 14 |
|
| 15 |
function osc_theme_li($params, $content = null) { |
| 16 |
extract(shortcode_atts(array( |
| 17 |
'type' => '' |
| 18 |
), $params)); |
| 19 |
if ($type != '') { |
| 20 |
$osc_class = '<span class="glyphicon ' . $type . '"></span> '; |
| 21 |
} else { |
| 22 |
$osc_class = ''; |
| 23 |
} |
| 24 |
return '<li class="list-group-item'.EBS_CONTAINER_CLASS.'">' . $osc_class . do_shortcode($content) . '</li>'; |
| 25 |
} |
| 26 |
|
| 27 |
add_shortcode('li', 'osc_theme_li'); |