| 1 |
<?php |
| 2 |
|
| 3 |
function osc_theme_deslist($params, $content = null) { |
| 4 |
extract(shortcode_atts(array( |
| 5 |
'class' => '', |
| 6 |
'style' =>'' |
| 7 |
), $params)); |
| 8 |
$content = str_replace("]<br />", ']', $content); |
| 9 |
$content = str_replace("]<br />\n", ']', $content); |
| 10 |
$content = str_replace("<br />\n[", '[', $content); |
| 11 |
return '<dl class="osc-deslist ' . $style . ' '.$class.EBS_CONTAINER_CLASS.'">' . do_shortcode($content) . '</dl>'; |
| 12 |
} |
| 13 |
|
| 14 |
add_shortcode('dl', 'osc_theme_deslist'); |
| 15 |
|
| 16 |
function osc_theme_dlitem($params, $content = null) { |
| 17 |
extract(shortcode_atts(array( |
| 18 |
'heading' => '' |
| 19 |
), $params)); |
| 20 |
$out='<dt>'.do_shortcode($heading).'</dt>'; |
| 21 |
$out.='<dd>'.do_shortcode($content).'</dd>'; |
| 22 |
return $out; |
| 23 |
} |
| 24 |
|
| 25 |
add_shortcode('dlitem', 'osc_theme_dlitem'); |