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
← All changes | shortcode/tabs/plugin_shortcode.php +4 -3 3.63.7 View file →
@@ -23,9 +23,8 @@
23 23 } else {
24 24 return "";
25 25 }
26 26 }
27 -
28 27 add_shortcode('tabs', 'osc_theme_tabs');
29 28
30 29 function osc_theme_tab($params, $content = null) {
31 30 global $_oscitas_tabs;
@@ -34,9 +33,12 @@
34 33 'active' => '',
35 34 ), $params));
36 35
37 36 $index = count($_oscitas_tabs) - 1;
38 - $pane_id = 'pane-' . $index . '-' . count($_oscitas_tabs[$index]['tabs']);
37 + if (!isset($_oscitas_tabs[$index]['tabs'])) {
38 + $_oscitas_tabs[$index]['tabs'] = array();
39 + }
40 + $pane_id = 'pane-' . $index . '-' . count($_oscitas_tabs[$index]['tabs']);
39 41 $_oscitas_tabs[$index]['tabs'][] = '<li class="' . $active . '"><a href="#' . $pane_id . '" data-toggle="tab">' . $title
40 42 . '</a></li>';
41 43 $_oscitas_tabs[$index]['panes'][] = '<div class="tab-pane ' . $active . '" id="'
42 44 . $pane_id . '">'
@@ -42,6 +44,5 @@
42 44 . $pane_id . '">'
43 45 . do_shortcode
44 46 (trim($content)) . '</div>';
45 47 }
46 -
47 48 add_shortcode('tab', 'osc_theme_tab');