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/wpcolumns/plugin_shortcode.php +61 -34 3.63.7 View file →
@@ -5,10 +5,10 @@
5 5 * ********************************************************* */
6 6
7 7 function osc_theme_row($params, $content = null) {
8 8 extract(shortcode_atts(array(
9 - 'class' => ''
10 - ), $params));
9 + 'class' => ''
10 + ), $params));
11 11 $result = '<div class="row ' . $class . '">';
12 12 //echo '<textarea>'.$content.'</textarea>';
13 13 $content = str_replace("]<br />", ']', $content);
14 14 $content = str_replace("<br />\n[", '[', $content);
@@ -14,9 +14,9 @@
14 14 $content = str_replace("<br />\n[", '[', $content);
15 15 $result .= do_shortcode($content);
16 16 $result .= '</div>';
17 17
18 - return force_balance_tags($result);
18 + return $result;
19 19 }
20 20
21 21 add_shortcode('row', 'osc_theme_row');
22 22 /* * *********************************************************
@@ -22,25 +22,35 @@
22 22 /* * *********************************************************
23 23 * TWO
24 24 * ********************************************************* */
25 25
26 -function osc_theme_column_shortcode($params, $content = null) {
26 +function osc_theme_column($params, $content = null) {
27 27 extract(shortcode_atts(array(
28 - 'md' => '',
29 - 'sm' => '',
30 - 'xs' => '',
31 - 'lg' => '',
32 - 'mdoff' => '',
33 - 'smoff' => '',
34 - 'xsoff' => '',
35 - 'lgoff' => '',
36 - 'off'=>''
37 - ), $params));
28 + 'md' => '',
29 + 'sm' => '',
30 + 'xs' => '',
31 + 'lg' => '',
32 + 'mdoff' => '',
33 + 'smoff' => '',
34 + 'xsoff' => '',
35 + 'lgoff' => '',
36 + 'mdhide' => '',
37 + 'smhide' => '',
38 + 'xshide' => '',
39 + 'lghide' => '',
40 + 'mdclear' => '',
41 + 'smclear' => '',
42 + 'xsclear' => '',
43 + 'lgclear' => '',
44 + 'off'=>''
45 + ), $params));
46 +
47 +
38 48 $arr = array('md', 'xs', 'sm');
39 49 $classes = array();
40 50 foreach ($arr as $k => $aa) {
41 51 if (${$aa} == 12 || ${$aa} == '') {
42 - $classes[] = '';
52 + $classes[] = 'col-' . $aa . '-12';
43 53 } else {
44 54 $classes[] = 'col-' . $aa . '-' . ${$aa};
45 55 }
46 56 }
@@ -47,24 +57,42 @@
47 57 $arr2 = array('mdoff', 'smoff', 'xsoff', 'lgoff');
48 58 foreach ($arr2 as $k => $aa) {
49 59 $nn = str_replace('off', '', $aa);
50 60 if (${$aa} == 0 || ${$aa} == '') {
51 - $classes[] = '';
61 + //$classes[] = '';
52 62 } else {
53 63 $classes[] = 'col-' . $nn . '-offset-' . ${$aa};
54 64 }
55 65 }
66 + $arr2 = array('mdhide', 'smhide', 'xshide', 'lghide');
67 + foreach ($arr2 as $k => $aa) {
68 + $nn = str_replace('hide', '', $aa);
69 + if (${$aa} == 'yes') {
70 + $classes[] = 'hidden-' . $nn;
71 + }
72 + }
73 + $arr2 = array('mdclear', 'smclear', 'xsclear', 'lgclear');
74 + foreach ($arr2 as $k => $aa) {
75 + $nn = str_replace('clear', '', $aa);
76 + if (${$aa} == 'yes') {
77 + $classes[] = 'clear-' . $nn;
78 + }
79 + }
56 80 if ($off != '') {
57 81 $classes[] = 'col-lg-offset-'.$off;
58 82 }
83 +
84 + if ($off != '') {
85 + $classes[] = 'col-lg-offset-'.$off;
86 + }
59 87 $result = '<div class="col-lg-' . $lg . ' ' . implode(' ', $classes) . '">';
60 88 $result .= do_shortcode($content);
61 89 $result .= '</div>';
62 90
63 - return force_balance_tags($result);
91 + return $result;
64 92 }
65 93
66 -add_shortcode('column', 'osc_theme_column_shortcode');
94 +add_shortcode('column', 'osc_theme_column');
67 95
68 96
69 97 function osc_theme_one_half($params, $content = null) {
70 98 extract(shortcode_atts(array(
@@ -91,9 +119,9 @@
91 119 $result = '<div class="col-lg-6 ' . $mds . ' ' . $sms . ' ' . $xss . ' col-lg-offset-' . $off . ' one-half">';
92 120 $result .= do_shortcode($content);
93 121 $result .= '</div>';
94 122
95 - return force_balance_tags($result);
123 + return $result;
96 124 }
97 125
98 126 add_shortcode('one_half', 'osc_theme_one_half');
99 127
@@ -122,9 +150,9 @@
122 150 $result = '<div class="col-lg-6 ' . $mds . ' ' . $sms . ' ' . $xss . ' col-lg-offset-' . $off . ' one-half-last">';
123 151 $result .= do_shortcode($content);
124 152 $result .= '</div>';
125 153
126 - return force_balance_tags($result);
154 + return $result;
127 155 }
128 156
129 157 add_shortcode('one_half_last', 'osc_theme_one_half_last');
130 158
@@ -157,9 +185,9 @@
157 185 $result = '<div class="sc-column col-lg-4 ' . $mds . ' ' . $sms . ' ' . $xss . ' col-lg-offset-' . $off . ' ">'; //one-third
158 186 $result .= do_shortcode($content);
159 187 $result .= '</div>';
160 188
161 - return force_balance_tags($result);
189 + return $result;
162 190 }
163 191
164 192 add_shortcode('one_third', 'osc_theme_one_third');
165 193
@@ -188,9 +216,9 @@
188 216 $result = '<div class="col-lg-4 ' . $mds . ' ' . $sms . ' ' . $xss . ' col-lg-offset-' . $off . ' column-last">'; // one-third-last
189 217 $result .= do_shortcode($content);
190 218 $result .= '</div>';
191 219
192 - return force_balance_tags($result);
220 + return $result;
193 221 }
194 222
195 223 add_shortcode('one_third_last', 'osc_theme_one_third_last');
196 224
@@ -219,9 +247,9 @@
219 247 $result = '<div class=" col-lg-8 ' . $mds . ' ' . $sms . ' ' . $xss . ' col-lg-offset-' . $off . ' ">'; //two-third
220 248 $result .= do_shortcode($content);
221 249 $result .= '</div>';
222 250
223 - return force_balance_tags($result);
251 + return $result;
224 252 }
225 253
226 254 add_shortcode('two_third', 'osc_theme_two_third');
227 255
@@ -250,9 +278,9 @@
250 278 $result = '<div class="col-lg-8 ' . $mds . ' ' . $sms . ' ' . $xss . ' col-lg-offset-' . $off . ' column-last ">'; //two-third-last
251 279 $result .= do_shortcode($content);
252 280 $result .= '</div>';
253 281
254 - return force_balance_tags($result);
282 + return $result;
255 283 }
256 284
257 285 add_shortcode('two_third_last', 'osc_theme_two_third_last');
258 286
@@ -285,9 +313,9 @@
285 313 $result = '<div class="col-lg-3 ' . $mds . ' ' . $sms . ' ' . $xss . ' col-lg-offset-' . $off . ' one-fourth">';
286 314 $result .= do_shortcode($content);
287 315 $result .= '</div>';
288 316
289 - return force_balance_tags($result);
317 + return $result;
290 318 }
291 319
292 320 add_shortcode('one_fourth', 'osc_theme_one_fourth');
293 321
@@ -316,9 +344,9 @@
316 344 $result = '<div class="col-lg-3 ' . $mds . ' ' . $sms . ' ' . $xss . ' col-lg-offset-' . $off . ' column-last one-fourth-last">';
317 345 $result .= do_shortcode($content);
318 346 $result .= '</div>';
319 347
320 - return force_balance_tags($result);
348 + return $result;
321 349 }
322 350
323 351 add_shortcode('one_fourth_last', 'osc_theme_one_fourth_last');
324 352
@@ -347,9 +375,9 @@
347 375 $result = '<div class="col-lg-3 ' . $mds . ' ' . $sms . ' ' . $xss . ' col-lg-offset-' . $off . ' three-fourth">';
348 376 $result .= do_shortcode($content);
349 377 $result .= '</div>';
350 378
351 - return force_balance_tags($result);
379 + return $result;
352 380 }
353 381
354 382 add_shortcode('three_fourth', 'osc_theme_three_fourth');
355 383
@@ -378,9 +406,9 @@
378 406 $result = '<div class="col-lg-6 ' . $mds . ' ' . $sms . ' ' . $xss . ' col-lg-offset-' . $off . ' column-last three-fourth-last">';
379 407 $result .= do_shortcode($content);
380 408 $result .= '</div>';
381 409
382 - return force_balance_tags($result);
410 + return $result;
383 411 }
384 412
385 413 add_shortcode('three_fourth_last', 'osc_theme_three_fourth_last');
386 414
@@ -409,9 +437,9 @@
409 437 $result = '<div class="col-lg-3 ' . $mds . ' ' . $sms . ' ' . $xss . ' col-lg-offset-' . $off . ' one-fourth-second">';
410 438 $result .= do_shortcode($content);
411 439 $result .= '</div>';
412 440
413 - return force_balance_tags($result);
441 + return $result;
414 442 }
415 443
416 444 add_shortcode('one_fourth_second', 'osc_theme_one_fourth_second');
417 445
@@ -441,9 +469,9 @@
441 469 $result = '<div class="col-lg-3 ' . $mds . ' ' . $sms . ' ' . $xss . ' col-lg-offset-' . $off . ' one-fourth-third">';
442 470 $result .= do_shortcode($content);
443 471 $result .= '</div>';
444 472
445 - return force_balance_tags($result);
473 + return $result;
446 474 }
447 475
448 476 add_shortcode('one_fourth_third', 'osc_theme_one_fourth_third');
449 477
@@ -472,9 +500,9 @@
472 500 $result = '<div class="col-lg-6 ' . $mds . ' ' . $sms . ' ' . $xss . ' col-lg-offset-' . $off . ' one-half-second">';
473 501 $result .= do_shortcode($content);
474 502 $result .= '</div>';
475 503
476 - return force_balance_tags($result);
504 + return $result;
477 505 }
478 506
479 507 add_shortcode('one_half_second', 'osc_theme_one_half_second');
480 508
@@ -503,9 +531,9 @@
503 531 $result = '<div class="col-lg-4 ' . $mds . ' ' . $sms . ' ' . $xss . ' col-lg-offset-' . $off . ' one-third-second">';
504 532 $result .= do_shortcode($content);
505 533 $result .= '</div>';
506 534
507 - return force_balance_tags($result);
535 + return $result;
508 536 }
509 537
510 538 add_shortcode('one_third_second', 'osc_theme_one_third_second');
511 539
@@ -534,9 +562,8 @@
534 562 $result = '<div class="col-lg-12 ' . $mds . ' ' . $sms . ' ' . $xss . ' col-lg-offset-' . $off . ' one-column">';
535 563 $result .= do_shortcode($content);
536 564 $result .= '</div>';
537 565
538 - return force_balance_tags($result);
566 + return $result;
539 567 }
540 568
541 569 add_shortcode('one_column', 'osc_theme_one_column');
542 -