| @@ -10,9 +10,9 @@ | ||
| 10 | 10 | $content = str_replace("<br />\n[", '[', $content); |
| 11 | 11 | if ($dropup != 'dropup') { |
| 12 | 12 | $dropup = ''; |
| 13 | 13 | } |
| 14 | - $out = '<div class="btn-group ' . $dropup . ' ' . $class .EBS_CONTAINER_CLASS. '">' . do_shortcode($content) . '</div>'; | |
| 14 | + $out = '<div class="btn-group ' . $dropup . ' ' . $class . '">' . do_shortcode($content) . '</div>'; | |
| 15 | 15 | $out .= " |
| 16 | 16 | <script> |
| 17 | 17 | jQuery(document).ready(function(){ |
| 18 | 18 | jQuery('.dropdown-toggle').dropdown(); |
| @@ -21,9 +21,9 @@ | ||
| 21 | 21 | "; |
| 22 | 22 | return $out; |
| 23 | 23 | } |
| 24 | 24 | |
| 25 | -ebs_backward_compatibility_callback('dropdown', 'osc_theme_dropdown'); | |
| 25 | +add_shortcode('dropdown', 'osc_theme_dropdown'); | |
| 26 | 26 | |
| 27 | 27 | function osc_theme_dropdown_head($params, $content = null) { |
| 28 | 28 | extract(shortcode_atts(array( |
| 29 | 29 | 'size' => '', |
| @@ -30,31 +30,31 @@ | ||
| 30 | 30 | 'style' => '', |
| 31 | 31 | 'split' => ''), $params)); |
| 32 | 32 | $out = ''; |
| 33 | 33 | if ($split == "split") { |
| 34 | - $out = '<button type="button" class="btn ' . $size . ' ' . $style .EBS_CONTAINER_CLASS. '">' . $content . '</button>'; | |
| 34 | + $out = '<button type="button" class="btn ' . $size . ' ' . $style . '">' . $content . '</button>'; | |
| 35 | 35 | |
| 36 | - $out .= '<button type="button" class="btn ' . $size . ' ' . $style .EBS_CONTAINER_CLASS. ' dropdown-toggle" data-toggle="dropdown">'; | |
| 37 | - $out .= '<span class="caret'.EBS_CONTAINER_CLASS.'"></span></button>'; | |
| 36 | + $out .= '<button type="button" class="btn ' . $size . ' ' . $style . ' dropdown-toggle" data-toggle="dropdown">'; | |
| 37 | + $out .= '<span class="caret"></span></button>'; | |
| 38 | 38 | } else { |
| 39 | - $out = ' <button type="button" class="btn ' . $size . ' ' . $style .EBS_CONTAINER_CLASS. ' dropdown-toggle" data-toggle="dropdown">'; | |
| 40 | - $out .= $content . ' <span class="caret'.EBS_CONTAINER_CLASS.'"></span> </button>'; | |
| 39 | + $out = ' <button type="button" class="btn ' . $size . ' ' . $style . ' dropdown-toggle" data-toggle="dropdown">'; | |
| 40 | + $out .= $content . ' <span class="caret"></span> </button>'; | |
| 41 | 41 | } |
| 42 | 42 | |
| 43 | 43 | return $out; |
| 44 | 44 | } |
| 45 | 45 | |
| 46 | -ebs_backward_compatibility_callback('dropdownhead', 'osc_theme_dropdown_head'); | |
| 46 | +add_shortcode('dropdownhead', 'osc_theme_dropdown_head'); | |
| 47 | 47 | |
| 48 | 48 | function osc_theme_dropdown_body($params, $content = null) { |
| 49 | 49 | $content = str_replace("]<br />", ']', $content); |
| 50 | 50 | $content = str_replace("]<br />\n", ']', $content); |
| 51 | 51 | $content = str_replace("<br />\n[", '[', $content); |
| 52 | - $out = '<ul class="dropdown-menu'.EBS_CONTAINER_CLASS.'" role="menu">' . do_shortcode($content) . '</ul>'; | |
| 52 | + $out = '<ul class="dropdown-menu" role="menu">' . do_shortcode($content) . '</ul>'; | |
| 53 | 53 | return $out; |
| 54 | 54 | } |
| 55 | 55 | |
| 56 | -ebs_backward_compatibility_callback('dropdownbody', 'osc_theme_dropdown_body'); | |
| 56 | +add_shortcode('dropdownbody', 'osc_theme_dropdown_body'); | |
| 57 | 57 | |
| 58 | 58 | function osc_theme_dropdown_items($params, $content = null) { |
| 59 | 59 | extract(shortcode_atts(array( |
| 60 | 60 | 'type' => '', |
| @@ -60,18 +60,18 @@ | ||
| 60 | 60 | 'type' => '', |
| 61 | 61 | 'link' => '', |
| 62 | 62 | 'disabled' => ''), $params)); |
| 63 | 63 | $out = ''; |
| 64 | - $out = ''; | |
| 65 | 64 | if ($type == "divider") { |
| 66 | - $out = '<li class="divider'.EBS_CONTAINER_CLASS.'"></li>'; | |
| 65 | + $out = '<li class="divider"></li>'; | |
| 67 | 66 | } elseif ($type == "menuitem") { |
| 68 | 67 | if ($disabled == 'disabled') { |
| 69 | - $out = '<li class="disabled'.EBS_CONTAINER_CLASS.'"><a class="'.EBS_CONTAINER_CLASS.'" href="' . $link . '">' . do_shortcode($content) . '</a></li>'; | |
| 68 | + $out = '<li class="disabled"><a href="' . $link . '">' . do_shortcode($content) . '</a></li>'; | |
| 70 | 69 | } else { |
| 71 | - $out = '<li><a class="'.EBS_CONTAINER_CLASS.'" href="' . $link . '">' . do_shortcode($content) . '</a></li>'; | |
| 70 | + $out = '<li><a href="' . $link . '">' . do_shortcode($content) . '</a></li>'; | |
| 72 | 71 | } |
| 73 | 72 | } |
| 74 | 73 | return $out; |
| 75 | 74 | } |
| 76 | 75 | |
| 77 | -ebs_backward_compatibility_callback('dropdownitem', 'osc_theme_dropdown_items'); | |
| 76 | +add_shortcode('dropdownitem', 'osc_theme_dropdown_items'); | |
| 77 | +?> | |