PluginProbe
Easy Bootstrap Shortcode / 3.6
Easy Bootstrap Shortcode v3.6
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 / buttons / plugin_shortcode.php

plugin_shortcode.php in Easy Bootstrap Shortcode 3.6, at shortcode/buttons/plugin_shortcode.php

38 lines 1.1 KB
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_button($params, $content = null) {
8 extract(shortcode_atts(array(
9 'title' => 'osCitas',
10 'link' => '',
11 'type' => 'link',
12 'style' => '',
13 'align' => '',
14 'target' => '',
15 'icon' => '',
16 'class' => ''
17 ), $params));
18 $out = '';
19 if($icon!=''){
20 if($align=='right'){
21 $value=$title.' <i class="glyphicon '.$icon.'"></i>';
22 } else{
23 $value='<i class="glyphicon '.$icon.'"></i> '.$title;
24 }
25 }else{
26 $value=$title;
27 }
28 if ($type == 'link') {
29 $out = '<a class="btn ' . $style . ' ' . $class . '" href="' . $link . '" target="' . ($target) . '">' . $value . '</a>';
30 } elseif ($type == 'button') {
31 $out = '<button class="btn ' . $style . ' ' . $class . '" >' . $value . '</button>';
32 }
33 return $out;
34 }
35
36 add_shortcode('button', 'osc_theme_button');
37
38