PluginProbe
Easy Bootstrap Shortcode / 4.5
Easy Bootstrap Shortcode v4.5
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 / tables / plugin_shortcode.php

plugin_shortcode.php in Easy Bootstrap Shortcode 4.5, at shortcode/tables/plugin_shortcode.php

62 lines 2.0 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 /* * *********************************************************
4 * TABLES
5 * ********************************************************* */
6
7 function osc_theme_os_table($params, $content = null) {
8 extract(shortcode_atts(array(
9 'width' => '100%',
10 'style' => '',
11 'responsive' => 'false',
12 'class' => '',
13 //'style'=>''
14 ), $params));
15 $content = str_replace("]<br />", ']', $content);
16 $out = '<table width="' . $width . '" class="table '.$class.EBS_CONTAINER_CLASS.'" style="' . $style . '">' . do_shortcode($content) . '</table>';
17 $out = strtolower($responsive) == 'true' ? '<div class="table-responsive'.EBS_CONTAINER_CLASS.'">' . $out . '</div>' : $out;
18 return $out;
19 }
20
21 ebs_backward_compatibility_callback('table', 'osc_theme_os_table');
22
23 function osc_theme_os_table_head($params, $content = null) {
24 $out = '<thead><tr>' . do_shortcode($content) . '</tr></thead>';
25 return $out;
26 }
27
28 ebs_backward_compatibility_callback('table_head', 'osc_theme_os_table_head');
29
30 function osc_theme_os_table_body($params, $content = null) {
31 $out = '<tbody>' . do_shortcode($content) . '</tbody>';
32 return $out;
33 }
34
35 ebs_backward_compatibility_callback('table_body', 'osc_theme_os_table_body');
36
37 function osc_theme_os_table_row($params, $content = null) {
38 $out = '<tr>';
39 $out .= do_shortcode($content);
40 $out .= '</tr>';
41 return $out;
42 }
43
44 ebs_backward_compatibility_callback('table_row', 'osc_theme_os_table_row');
45
46 function osc_theme_os_row_column($params, $content = null) {
47 $out = '<td>';
48 $out .= do_shortcode($content);
49 $out .= '</td>';
50 return $out;
51 }
52
53 ebs_backward_compatibility_callback('row_column', 'osc_theme_os_row_column');
54
55 function osc_theme_os_th_column($params, $content = null) {
56 $out = '<th>';
57 $out .= do_shortcode($content);
58 $out .= '</th>';
59 return $out;
60 }
61
62 ebs_backward_compatibility_callback('th_column', 'osc_theme_os_th_column');