| @@ -1,44 +1,45 @@ | ||
| 1 | -<?php | |
| 2 | - | |
| 3 | -function osc_theme_panel($atts, $content = null) { | |
| 4 | - extract(shortcode_atts(array( | |
| 5 | - 'class' => '', | |
| 6 | - ), $atts)); | |
| 7 | - $content = str_replace("]<br />", ']', $content); | |
| 8 | - | |
| 9 | - $content = str_replace("<br />\n[", '[', $content); | |
| 10 | - $result = '<div class="panel ' . $class . '">'; | |
| 11 | - $result .= do_shortcode($content); | |
| 12 | - $result .= '</div>'; | |
| 13 | - | |
| 14 | - return $result; | |
| 15 | -} | |
| 16 | - | |
| 17 | -add_shortcode('panel', 'osc_theme_panel'); | |
| 18 | - | |
| 19 | -function osc_theme_panel_footer($atts, $content = null) { | |
| 20 | - $result = '<div class="panel-footer">'; | |
| 21 | - $result .= do_shortcode($content); | |
| 22 | - $result .= '</div>'; | |
| 23 | - return $result; | |
| 24 | -} | |
| 25 | - | |
| 26 | -add_shortcode('panel-footer', 'osc_theme_panel_footer'); | |
| 27 | - | |
| 28 | -function osc_theme_panel_heading($atts, $content = null) { | |
| 29 | - $result = '<div class="panel-heading">'; | |
| 30 | - $result .= do_shortcode($content); | |
| 31 | - $result .= '</div>'; | |
| 32 | - return $result; | |
| 33 | -} | |
| 34 | - | |
| 35 | -add_shortcode('panel-header', 'osc_theme_panel_heading'); | |
| 36 | - | |
| 37 | -function osc_theme_panel_content($atts, $content = null) { | |
| 38 | - $result = '<div class="panel-body">'; | |
| 39 | - $result .= do_shortcode($content); | |
| 40 | - $result .= '</div>'; | |
| 41 | - return $result; | |
| 42 | -} | |
| 43 | - | |
| 1 | +<?php | |
| 2 | + | |
| 3 | +function osc_theme_panel($atts, $content = null) { | |
| 4 | + extract(shortcode_atts(array( | |
| 5 | + 'style' => '', | |
| 6 | + 'class' => '' | |
| 7 | + ), $atts)); | |
| 8 | + $content = str_replace("]<br />", ']', $content); | |
| 9 | + | |
| 10 | + $content = str_replace("<br />\n[", '[', $content); | |
| 11 | + $result = '<div class="panel ' . $style . ' ' . $class . '">'; | |
| 12 | + $result .= do_shortcode($content); | |
| 13 | + $result .= '</div>'; | |
| 14 | + | |
| 15 | + return $result; | |
| 16 | +} | |
| 17 | + | |
| 18 | +add_shortcode('panel', 'osc_theme_panel'); | |
| 19 | + | |
| 20 | +function osc_theme_panel_footer($atts, $content = null) { | |
| 21 | + $result = '<div class="panel-footer">'; | |
| 22 | + $result .= do_shortcode($content); | |
| 23 | + $result .= '</div>'; | |
| 24 | + return $result; | |
| 25 | +} | |
| 26 | + | |
| 27 | +add_shortcode('panel-footer', 'osc_theme_panel_footer'); | |
| 28 | + | |
| 29 | +function osc_theme_panel_heading($atts, $content = null) { | |
| 30 | + $result = '<div class="panel-heading">'; | |
| 31 | + $result .= do_shortcode($content); | |
| 32 | + $result .= '</div>'; | |
| 33 | + return $result; | |
| 34 | +} | |
| 35 | + | |
| 36 | +add_shortcode('panel-header', 'osc_theme_panel_heading'); | |
| 37 | + | |
| 38 | +function osc_theme_panel_content($atts, $content = null) { | |
| 39 | + $result = '<div class="panel-body">'; | |
| 40 | + $result .= do_shortcode($content); | |
| 41 | + $result .= '</div>'; | |
| 42 | + return $result; | |
| 43 | +} | |
| 44 | + | |
| 44 | 45 | add_shortcode('panel-content', 'osc_theme_panel_content'); |