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