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
easy-bootstrap-shortcodes / shortcode / thumbnail / plugin_shortcode.php

plugin_shortcode.php in Easy Bootstrap Shortcode 3.7, at shortcode/thumbnail/plugin_shortcode.php

38 lines 998 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 /* * *********************************************************
4 * BUTTONS
5 * ********************************************************* */
6
7 function osc_theme_oscitasthumbnail($params, $content = 'Label') {
8 extract(shortcode_atts(array(
9 'src' => '',
10 'class' => '',
11 'link' => '',
12 'border'=>''
13 ), $params));
14 $out = '';
15 $borderClass = '';
16 $imageBorderClass = 'img-responsive';
17 if ($border != '') {
18 $borderClass = 'img-thumbnail ';
19 }
20
21 $out = ' <div class="' . $borderClass.$class . '">';
22
23 //$out = ' <div class="img-thumbnail ' . $class . '">';
24 if ($link != '') {
25 $out .='<a href="' . $link . '">';
26 }
27 $out .= '<img src="' . $src . '" '.($imageBorderClass? ' class="'.$imageBorderClass.'"':'').'>';
28 if ($link != '') {
29 $out .='</a>';
30 }
31
32 $out .= '</div>';
33 return $out;
34 }
35
36 add_shortcode('thumbnail', 'osc_theme_oscitasthumbnail');
37
38