PluginProbe
Easy Bootstrap Shortcode / 3.7
Easy Bootstrap Shortcode v3.7
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 / btngrp / plugin_shortcode.php

plugin_shortcode.php in Easy Bootstrap Shortcode 3.7, at shortcode/btngrp/plugin_shortcode.php

25 lines 819 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_btngrp($params, $content = null) {
4 extract(shortcode_atts(array(
5 'style' => '',
6 'class' => ''
7 ), $params));
8 $content = str_replace("]<br />", ']', $content);
9 $content = str_replace("]<br />\n", ']', $content);
10 $content = str_replace("<br />\n[", '[', $content);
11 if ($style =='vertical') {
12 $out = '<div class="btn-group-vertical ' . $class . '">' . do_shortcode($content) . '</div>';
13 } elseif ($style =='justified') {
14 $out = '<div class="btn-group btn-group-justified ' . $class . '">' . do_shortcode($content) . '</div>';
15 }else{
16 $out = '<div class="btn-group ' . $class . '">' . do_shortcode($content) . '</div>';
17 }
18
19
20 return $out;
21 }
22
23 add_shortcode('buttongroup', 'osc_theme_btngrp');
24
25 ?>