| @@ -1,25 +1,27 @@ | ||
| 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 | - | |
| 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 . '">' . 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">' . $osc_class . do_shortcode($content) . '</li>'; | |
| 25 | +} | |
| 26 | + | |
| 25 | 27 | add_shortcode('li', 'osc_theme_li'); |