| 1 |
<?php |
| 2 |
|
| 3 |
function osc_theme_notification($atts, $content = null) { |
| 4 |
extract(shortcode_atts(array( |
| 5 |
'type' => '', |
| 6 |
'close' => 'false', |
| 7 |
'class' => '' |
| 8 |
), $atts)); |
| 9 |
$type = ($close == 'true' ? $type . ' alert-dismissable' : $type); |
| 10 |
|
| 11 |
|
| 12 |
$result = '<div class = "alert ' . $type . ' ' . $class .EBS_CONTAINER_CLASS. '">'; |
| 13 |
if ($close == 'true') { |
| 14 |
$result .= '<button type = "button" class = "close'.EBS_CONTAINER_CLASS.'" data-dismiss = "alert" aria-hidden = "true">× |
| 15 |
</button>'; |
| 16 |
} |
| 17 |
$result .= do_shortcode($content); |
| 18 |
$result .= '</div>'; |
| 19 |
|
| 20 |
return $result; |
| 21 |
} |
| 22 |
|
| 23 |
ebs_backward_compatibility_callback('notification', 'osc_theme_notification'); |
| 24 |
|
| 25 |
|
| 26 |
|
| 27 |
|