PluginProbe
Easy Bootstrap Shortcode / 3.5
Easy Bootstrap Shortcode v3.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 3.5, at shortcode/lists/plugin_shortcode.php

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