PluginProbe
Easy Bootstrap Shortcode / 2.5
Easy Bootstrap Shortcode v2.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 / lists / plugin_shortcode.php

plugin_shortcode.php in Easy Bootstrap Shortcode 2.5, at shortcode/lists/plugin_shortcode.php

27 lines 914 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_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');