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 +127 -176 trunk3.7 View file →
@@ -1,9 +1,5 @@
1 1 <?php
2 -if ( ! defined( 'ABSPATH' ) ) {
3 - exit;
4 -}
5 -use EBS\Security\Sanitizer;
6 2
7 3 /* * *********************************************************
8 4 * Row
9 5 * ********************************************************* */
@@ -8,13 +4,13 @@
8 4 * Row
9 5 * ********************************************************* */
10 6
11 7 function osc_theme_row($params, $content = null) {
12 - $atts = shortcode_atts(array(
8 + extract(shortcode_atts(array(
13 9 'class' => ''
14 - ), $params);
15 - $class = Sanitizer::class_list( $atts['class'] );
16 - $result = '<div class="row ' . $class . EBS_CONTAINER_CLASS . '">';
10 + ), $params));
11 + $result = '<div class="row ' . $class . '">';
12 + //echo '<textarea>'.$content.'</textarea>';
17 13 $content = str_replace("]<br />", ']', $content);
18 14 $content = str_replace("<br />\n[", '[', $content);
19 15 $result .= do_shortcode($content);
20 16 $result .= '</div>';
@@ -21,15 +17,15 @@
21 17
22 18 return $result;
23 19 }
24 20
25 -ebs_backward_compatibility_callback('row', 'osc_theme_row');
21 +add_shortcode('row', 'osc_theme_row');
26 22 /* * *********************************************************
27 23 * TWO
28 24 * ********************************************************* */
29 25
30 26 function osc_theme_column($params, $content = null) {
31 - $atts = shortcode_atts(array(
27 + extract(shortcode_atts(array(
32 28 'md' => '',
33 29 'sm' => '',
34 30 'xs' => '',
35 31 'lg' => '',
@@ -44,35 +40,34 @@
44 40 'mdclear' => '',
45 41 'smclear' => '',
46 42 'xsclear' => '',
47 43 'lgclear' => '',
48 - 'off' => ''
49 - ), $params);
44 + 'off'=>''
45 + ), $params));
50 46
47 +
51 48 $arr = array('md', 'xs', 'sm');
52 49 $classes = array();
53 50 foreach ($arr as $k => $aa) {
54 - $val = $atts[$aa];
55 - if ($val == 12 || $val == '') {
51 + if (${$aa} == 12 || ${$aa} == '') {
56 52 $classes[] = 'col-' . $aa . '-12';
57 53 } else {
58 - $classes[] = 'col-' . $aa . '-' . Sanitizer::int( $val );
54 + $classes[] = 'col-' . $aa . '-' . ${$aa};
59 55 }
60 56 }
61 57 $arr2 = array('mdoff', 'smoff', 'xsoff', 'lgoff');
62 58 foreach ($arr2 as $k => $aa) {
63 59 $nn = str_replace('off', '', $aa);
64 - $val = $atts[$aa];
65 - if ($val == 0 || $val == '') {
60 + if (${$aa} == 0 || ${$aa} == '') {
66 61 //$classes[] = '';
67 62 } else {
68 - $classes[] = 'col-' . $nn . '-offset-' . Sanitizer::int( $val );
63 + $classes[] = 'col-' . $nn . '-offset-' . ${$aa};
69 64 }
70 65 }
71 66 $arr2 = array('mdhide', 'smhide', 'xshide', 'lghide');
72 67 foreach ($arr2 as $k => $aa) {
73 68 $nn = str_replace('hide', '', $aa);
74 - if ($atts[$aa] == 'yes') {
69 + if (${$aa} == 'yes') {
75 70 $classes[] = 'hidden-' . $nn;
76 71 }
77 72 }
78 73 $arr2 = array('mdclear', 'smclear', 'xsclear', 'lgclear');
@@ -77,19 +72,20 @@
77 72 }
78 73 $arr2 = array('mdclear', 'smclear', 'xsclear', 'lgclear');
79 74 foreach ($arr2 as $k => $aa) {
80 75 $nn = str_replace('clear', '', $aa);
81 - if ($atts[$aa] == 'yes') {
76 + if (${$aa} == 'yes') {
82 77 $classes[] = 'clear-' . $nn;
83 78 }
84 79 }
85 - $off = Sanitizer::int( $atts['off'] );
86 - if ($off !== 0) {
87 - $classes[] = 'col-lg-offset-' . $off;
80 + if ($off != '') {
81 + $classes[] = 'col-lg-offset-'.$off;
88 82 }
89 83
90 - $lg = Sanitizer::int( $atts['lg'] );
91 - $result = '<div class="col-lg-' . $lg . ' ' . implode(' ', $classes) . EBS_CONTAINER_CLASS . '">';
84 + if ($off != '') {
85 + $classes[] = 'col-lg-offset-'.$off;
86 + }
87 + $result = '<div class="col-lg-' . $lg . ' ' . implode(' ', $classes) . '">';
92 88 $result .= do_shortcode($content);
93 89 $result .= '</div>';
94 90
95 91 return $result;
@@ -94,37 +90,34 @@
94 90
95 91 return $result;
96 92 }
97 93
98 -ebs_backward_compatibility_callback('column', 'osc_theme_column');
94 +add_shortcode('column', 'osc_theme_column');
99 95
100 96
101 97 function osc_theme_one_half($params, $content = null) {
102 - $atts = shortcode_atts(array(
98 + extract(shortcode_atts(array(
103 99 'md' => '',
104 100 'sm' => '',
105 101 'xs' => '',
106 102 'off' => ''
107 - ), $params);
108 - $md = $atts['md'];
109 - $sm = $atts['sm'];
110 - $xs = $atts['xs'];
103 + ), $params));
111 104 if ($md == 12) {
112 105 $mds = '';
113 106 } else {
114 - $mds = 'col-md-' . Sanitizer::int( $md );
107 + $mds = 'col-md-' . $md;
115 108 }
116 109 if ($sm == 12) {
117 110 $sms = '';
118 111 } else {
119 - $sms = 'col-sm-' . Sanitizer::int( $sm );
112 + $sms = 'col-sm-' . $sm;
120 113 }
121 114 if ($xs == 12) {
122 115 $xss = '';
123 116 } else {
124 - $xss = 'col-xs-' . Sanitizer::int( $xs );
117 + $xss = 'col-xs-' . $xs;
125 118 }
126 - $result = '<div class="col-lg-6 ' . $mds . ' ' . $sms . ' ' . $xss . ' col-lg-offset-' . Sanitizer::int( $atts['off'] ) . EBS_CONTAINER_CLASS . ' one-half">';
119 + $result = '<div class="col-lg-6 ' . $mds . ' ' . $sms . ' ' . $xss . ' col-lg-offset-' . $off . ' one-half">';
127 120 $result .= do_shortcode($content);
128 121 $result .= '</div>';
129 122
130 123 return $result;
@@ -129,36 +122,33 @@
129 122
130 123 return $result;
131 124 }
132 125
133 -ebs_backward_compatibility_callback('one_half', 'osc_theme_one_half');
126 +add_shortcode('one_half', 'osc_theme_one_half');
134 127
135 128 function osc_theme_one_half_last($params, $content = null) {
136 - $atts = shortcode_atts(array(
129 + extract(shortcode_atts(array(
137 130 'md' => '',
138 131 'sm' => '',
139 132 'xs' => '',
140 133 'off' => ''
141 - ), $params);
142 - $md = $atts['md'];
143 - $sm = $atts['sm'];
144 - $xs = $atts['xs'];
134 + ), $params));
145 135 if ($md == 12) {
146 136 $mds = '';
147 137 } else {
148 - $mds = 'col-md-' . Sanitizer::int( $md );
138 + $mds = 'col-md-' . $md;
149 139 }
150 140 if ($sm == 12) {
151 141 $sms = '';
152 142 } else {
153 - $sms = 'col-sm-' . Sanitizer::int( $sm );
143 + $sms = 'col-sm-' . $sm;
154 144 }
155 145 if ($xs == 12) {
156 146 $xss = '';
157 147 } else {
158 - $xss = 'col-xs-' . Sanitizer::int( $xs );
148 + $xss = 'col-xs-' . $xs;
159 149 }
160 - $result = '<div class="col-lg-6 ' . $mds . ' ' . $sms . ' ' . $xss . ' col-lg-offset-' . Sanitizer::int( $atts['off'] ) . EBS_CONTAINER_CLASS . ' one-half-last">';
150 + $result = '<div class="col-lg-6 ' . $mds . ' ' . $sms . ' ' . $xss . ' col-lg-offset-' . $off . ' one-half-last">';
161 151 $result .= do_shortcode($content);
162 152 $result .= '</div>';
163 153
164 154 return $result;
@@ -163,9 +153,9 @@
163 153
164 154 return $result;
165 155 }
166 156
167 -ebs_backward_compatibility_callback('one_half_last', 'osc_theme_one_half_last');
157 +add_shortcode('one_half_last', 'osc_theme_one_half_last');
168 158
169 159 /* * *********************************************************
170 160 * THIRD
171 161 * ********************************************************* */
@@ -170,33 +160,30 @@
170 160 * THIRD
171 161 * ********************************************************* */
172 162
173 163 function osc_theme_one_third($params, $content = null) {
174 - $atts = shortcode_atts(array(
164 + extract(shortcode_atts(array(
175 165 'md' => '',
176 166 'sm' => '',
177 167 'xs' => '',
178 168 'off' => ''
179 - ), $params);
180 - $md = $atts['md'];
181 - $sm = $atts['sm'];
182 - $xs = $atts['xs'];
169 + ), $params));
183 170 if ($md == 12) {
184 171 $mds = '';
185 172 } else {
186 - $mds = 'col-md-' . Sanitizer::int( $md );
173 + $mds = 'col-md-' . $md;
187 174 }
188 175 if ($sm == 12) {
189 176 $sms = '';
190 177 } else {
191 - $sms = 'col-sm-' . Sanitizer::int( $sm );
178 + $sms = 'col-sm-' . $sm;
192 179 }
193 180 if ($xs == 12) {
194 181 $xss = '';
195 182 } else {
196 - $xss = 'col-xs-' . Sanitizer::int( $xs );
183 + $xss = 'col-xs-' . $xs;
197 184 }
198 - $result = '<div class="sc-column col-lg-4 ' . $mds . ' ' . $sms . ' ' . $xss . ' col-lg-offset-' . Sanitizer::int( $atts['off'] ) . EBS_CONTAINER_CLASS . ' ">';
185 + $result = '<div class="sc-column col-lg-4 ' . $mds . ' ' . $sms . ' ' . $xss . ' col-lg-offset-' . $off . ' ">'; //one-third
199 186 $result .= do_shortcode($content);
200 187 $result .= '</div>';
201 188
202 189 return $result;
@@ -201,36 +188,33 @@
201 188
202 189 return $result;
203 190 }
204 191
205 -ebs_backward_compatibility_callback('one_third', 'osc_theme_one_third');
192 +add_shortcode('one_third', 'osc_theme_one_third');
206 193
207 194 function osc_theme_one_third_last($params, $content = null) {
208 - $atts = shortcode_atts(array(
195 + extract(shortcode_atts(array(
209 196 'md' => '',
210 197 'sm' => '',
211 198 'xs' => '',
212 199 'off' => ''
213 - ), $params);
214 - $md = $atts['md'];
215 - $sm = $atts['sm'];
216 - $xs = $atts['xs'];
200 + ), $params));
217 201 if ($md == 12) {
218 202 $mds = '';
219 203 } else {
220 - $mds = 'col-md-' . Sanitizer::int( $md );
204 + $mds = 'col-md-' . $md;
221 205 }
222 206 if ($sm == 12) {
223 207 $sms = '';
224 208 } else {
225 - $sms = 'col-sm-' . Sanitizer::int( $sm );
209 + $sms = 'col-sm-' . $sm;
226 210 }
227 211 if ($xs == 12) {
228 212 $xss = '';
229 213 } else {
230 - $xss = 'col-xs-' . Sanitizer::int( $xs );
214 + $xss = 'col-xs-' . $xs;
231 215 }
232 - $result = '<div class="col-lg-4 ' . $mds . ' ' . $sms . ' ' . $xss . ' col-lg-offset-' . Sanitizer::int( $atts['off'] ) . EBS_CONTAINER_CLASS . ' column-last">';
216 + $result = '<div class="col-lg-4 ' . $mds . ' ' . $sms . ' ' . $xss . ' col-lg-offset-' . $off . ' column-last">'; // one-third-last
233 217 $result .= do_shortcode($content);
234 218 $result .= '</div>';
235 219
236 220 return $result;
@@ -235,36 +219,33 @@
235 219
236 220 return $result;
237 221 }
238 222
239 -ebs_backward_compatibility_callback('one_third_last', 'osc_theme_one_third_last');
223 +add_shortcode('one_third_last', 'osc_theme_one_third_last');
240 224
241 225 function osc_theme_two_third($params, $content = null) {
242 - $atts = shortcode_atts(array(
226 + extract(shortcode_atts(array(
243 227 'md' => '',
244 228 'sm' => '',
245 229 'xs' => '',
246 230 'off' => ''
247 - ), $params);
248 - $md = $atts['md'];
249 - $sm = $atts['sm'];
250 - $xs = $atts['xs'];
231 + ), $params));
251 232 if ($md == 12) {
252 233 $mds = '';
253 234 } else {
254 - $mds = 'col-md-' . Sanitizer::int( $md );
235 + $mds = 'col-md-' . $md;
255 236 }
256 237 if ($sm == 12) {
257 238 $sms = '';
258 239 } else {
259 - $sms = 'col-sm-' . Sanitizer::int( $sm );
240 + $sms = 'col-sm-' . $sm;
260 241 }
261 242 if ($xs == 12) {
262 243 $xss = '';
263 244 } else {
264 - $xss = 'col-xs-' . Sanitizer::int( $xs );
245 + $xss = 'col-xs-' . $xs;
265 246 }
266 - $result = '<div class=" col-lg-8 ' . $mds . ' ' . $sms . ' ' . $xss . ' col-lg-offset-' . Sanitizer::int( $atts['off'] ) . EBS_CONTAINER_CLASS . ' ">';
247 + $result = '<div class=" col-lg-8 ' . $mds . ' ' . $sms . ' ' . $xss . ' col-lg-offset-' . $off . ' ">'; //two-third
267 248 $result .= do_shortcode($content);
268 249 $result .= '</div>';
269 250
270 251 return $result;
@@ -269,36 +250,33 @@
269 250
270 251 return $result;
271 252 }
272 253
273 -ebs_backward_compatibility_callback('two_third', 'osc_theme_two_third');
254 +add_shortcode('two_third', 'osc_theme_two_third');
274 255
275 256 function osc_theme_two_third_last($params, $content = null) {
276 - $atts = shortcode_atts(array(
257 + extract(shortcode_atts(array(
277 258 'md' => '',
278 259 'sm' => '',
279 260 'xs' => '',
280 261 'off' => ''
281 - ), $params);
282 - $md = $atts['md'];
283 - $sm = $atts['sm'];
284 - $xs = $atts['xs'];
262 + ), $params));
285 263 if ($md == 12) {
286 264 $mds = '';
287 265 } else {
288 - $mds = 'col-md-' . Sanitizer::int( $md );
266 + $mds = 'col-md-' . $md;
289 267 }
290 268 if ($sm == 12) {
291 269 $sms = '';
292 270 } else {
293 - $sms = 'col-sm-' . Sanitizer::int( $sm );
271 + $sms = 'col-sm-' . $sm;
294 272 }
295 273 if ($xs == 12) {
296 274 $xss = '';
297 275 } else {
298 - $xss = 'col-xs-' . Sanitizer::int( $xs );
276 + $xss = 'col-xs-' . $xs;
299 277 }
300 - $result = '<div class="col-lg-8 ' . $mds . ' ' . $sms . ' ' . $xss . ' col-lg-offset-' . Sanitizer::int( $atts['off'] ) . EBS_CONTAINER_CLASS . ' column-last ">';
278 + $result = '<div class="col-lg-8 ' . $mds . ' ' . $sms . ' ' . $xss . ' col-lg-offset-' . $off . ' column-last ">'; //two-third-last
301 279 $result .= do_shortcode($content);
302 280 $result .= '</div>';
303 281
304 282 return $result;
@@ -303,9 +281,9 @@
303 281
304 282 return $result;
305 283 }
306 284
307 -ebs_backward_compatibility_callback('two_third_last', 'osc_theme_two_third_last');
285 +add_shortcode('two_third_last', 'osc_theme_two_third_last');
308 286
309 287 /* * *********************************************************
310 288 * FOURTH
311 289 * ********************************************************* */
@@ -310,33 +288,30 @@
310 288 * FOURTH
311 289 * ********************************************************* */
312 290
313 291 function osc_theme_one_fourth($params, $content = null) {
314 - $atts = shortcode_atts(array(
292 + extract(shortcode_atts(array(
315 293 'md' => '',
316 294 'sm' => '',
317 295 'xs' => '',
318 296 'off' => ''
319 - ), $params);
320 - $md = $atts['md'];
321 - $sm = $atts['sm'];
322 - $xs = $atts['xs'];
297 + ), $params));
323 298 if ($md == 12) {
324 299 $mds = '';
325 300 } else {
326 - $mds = 'col-md-' . Sanitizer::int( $md );
301 + $mds = 'col-md-' . $md;
327 302 }
328 303 if ($sm == 12) {
329 304 $sms = '';
330 305 } else {
331 - $sms = 'col-sm-' . Sanitizer::int( $sm );
306 + $sms = 'col-sm-' . $sm;
332 307 }
333 308 if ($xs == 12) {
334 309 $xss = '';
335 310 } else {
336 - $xss = 'col-xs-' . Sanitizer::int( $xs );
311 + $xss = 'col-xs-' . $xs;
337 312 }
338 - $result = '<div class="col-lg-3 ' . $mds . ' ' . $sms . ' ' . $xss . ' col-lg-offset-' . Sanitizer::int( $atts['off'] ) . EBS_CONTAINER_CLASS . ' one-fourth">';
313 + $result = '<div class="col-lg-3 ' . $mds . ' ' . $sms . ' ' . $xss . ' col-lg-offset-' . $off . ' one-fourth">';
339 314 $result .= do_shortcode($content);
340 315 $result .= '</div>';
341 316
342 317 return $result;
@@ -341,36 +316,33 @@
341 316
342 317 return $result;
343 318 }
344 319
345 -ebs_backward_compatibility_callback('one_fourth', 'osc_theme_one_fourth');
320 +add_shortcode('one_fourth', 'osc_theme_one_fourth');
346 321
347 322 function osc_theme_one_fourth_last($params, $content = null) {
348 - $atts = shortcode_atts(array(
323 + extract(shortcode_atts(array(
349 324 'md' => '',
350 325 'sm' => '',
351 326 'xs' => '',
352 327 'off' => ''
353 - ), $params);
354 - $md = $atts['md'];
355 - $sm = $atts['sm'];
356 - $xs = $atts['xs'];
328 + ), $params));
357 329 if ($md == 12) {
358 330 $mds = '';
359 331 } else {
360 - $mds = 'col-md-' . Sanitizer::int( $md );
332 + $mds = 'col-md-' . $md;
361 333 }
362 334 if ($sm == 12) {
363 335 $sms = '';
364 336 } else {
365 - $sms = 'col-sm-' . Sanitizer::int( $sm );
337 + $sms = 'col-sm-' . $sm;
366 338 }
367 339 if ($xs == 12) {
368 340 $xss = '';
369 341 } else {
370 - $xss = 'col-xs-' . Sanitizer::int( $xs );
342 + $xss = 'col-xs-' . $xs;
371 343 }
372 - $result = '<div class="col-lg-3 ' . $mds . ' ' . $sms . ' ' . $xss . ' col-lg-offset-' . Sanitizer::int( $atts['off'] ) . EBS_CONTAINER_CLASS . ' column-last one-fourth-last">';
344 + $result = '<div class="col-lg-3 ' . $mds . ' ' . $sms . ' ' . $xss . ' col-lg-offset-' . $off . ' column-last one-fourth-last">';
373 345 $result .= do_shortcode($content);
374 346 $result .= '</div>';
375 347
376 348 return $result;
@@ -375,36 +347,33 @@
375 347
376 348 return $result;
377 349 }
378 350
379 -ebs_backward_compatibility_callback('one_fourth_last', 'osc_theme_one_fourth_last');
351 +add_shortcode('one_fourth_last', 'osc_theme_one_fourth_last');
380 352
381 353 function osc_theme_three_fourth($params, $content = null) {
382 - $atts = shortcode_atts(array(
354 + extract(shortcode_atts(array(
383 355 'md' => '',
384 356 'sm' => '',
385 357 'xs' => '',
386 358 'off' => ''
387 - ), $params);
388 - $md = $atts['md'];
389 - $sm = $atts['sm'];
390 - $xs = $atts['xs'];
359 + ), $params));
391 360 if ($md == 12) {
392 361 $mds = '';
393 362 } else {
394 - $mds = 'col-md-' . Sanitizer::int( $md );
363 + $mds = 'col-md-' . $md;
395 364 }
396 365 if ($sm == 12) {
397 366 $sms = '';
398 367 } else {
399 - $sms = 'col-sm-' . Sanitizer::int( $sm );
368 + $sms = 'col-sm-' . $sm;
400 369 }
401 370 if ($xs == 12) {
402 371 $xss = '';
403 372 } else {
404 - $xss = 'col-xs-' . Sanitizer::int( $xs );
373 + $xss = 'col-xs-' . $xs;
405 374 }
406 - $result = '<div class="col-lg-3 ' . $mds . ' ' . $sms . ' ' . $xss . ' col-lg-offset-' . Sanitizer::int( $atts['off'] ) . EBS_CONTAINER_CLASS . ' three-fourth">';
375 + $result = '<div class="col-lg-3 ' . $mds . ' ' . $sms . ' ' . $xss . ' col-lg-offset-' . $off . ' three-fourth">';
407 376 $result .= do_shortcode($content);
408 377 $result .= '</div>';
409 378
410 379 return $result;
@@ -409,36 +378,33 @@
409 378
410 379 return $result;
411 380 }
412 381
413 -ebs_backward_compatibility_callback('three_fourth', 'osc_theme_three_fourth');
382 +add_shortcode('three_fourth', 'osc_theme_three_fourth');
414 383
415 384 function osc_theme_three_fourth_last($params, $content = null) {
416 - $atts = shortcode_atts(array(
385 + extract(shortcode_atts(array(
417 386 'md' => '',
418 387 'sm' => '',
419 388 'xs' => '',
420 389 'off' => ''
421 - ), $params);
422 - $md = $atts['md'];
423 - $sm = $atts['sm'];
424 - $xs = $atts['xs'];
390 + ), $params));
425 391 if ($md == 12) {
426 392 $mds = '';
427 393 } else {
428 - $mds = 'col-md-' . Sanitizer::int( $md );
394 + $mds = 'col-md-' . $md;
429 395 }
430 396 if ($sm == 12) {
431 397 $sms = '';
432 398 } else {
433 - $sms = 'col-sm-' . Sanitizer::int( $sm );
399 + $sms = 'col-sm-' . $sm;
434 400 }
435 401 if ($xs == 12) {
436 402 $xss = '';
437 403 } else {
438 - $xss = 'col-xs-' . Sanitizer::int( $xs );
404 + $xss = 'col-xs-' . $xs;
439 405 }
440 - $result = '<div class="col-lg-6 ' . $mds . ' ' . $sms . ' ' . $xss . ' col-lg-offset-' . Sanitizer::int( $atts['off'] ) . EBS_CONTAINER_CLASS . ' column-last three-fourth-last">';
406 + $result = '<div class="col-lg-6 ' . $mds . ' ' . $sms . ' ' . $xss . ' col-lg-offset-' . $off . ' column-last three-fourth-last">';
441 407 $result .= do_shortcode($content);
442 408 $result .= '</div>';
443 409
444 410 return $result;
@@ -443,36 +409,33 @@
443 409
444 410 return $result;
445 411 }
446 412
447 -ebs_backward_compatibility_callback('three_fourth_last', 'osc_theme_three_fourth_last');
413 +add_shortcode('three_fourth_last', 'osc_theme_three_fourth_last');
448 414
449 415 function osc_theme_one_fourth_second($params, $content = null) {
450 - $atts = shortcode_atts(array(
416 + extract(shortcode_atts(array(
451 417 'md' => '',
452 418 'sm' => '',
453 419 'xs' => '',
454 420 'off' => ''
455 - ), $params);
456 - $md = $atts['md'];
457 - $sm = $atts['sm'];
458 - $xs = $atts['xs'];
421 + ), $params));
459 422 if ($md == 12) {
460 423 $mds = '';
461 424 } else {
462 - $mds = 'col-md-' . Sanitizer::int( $md );
425 + $mds = 'col-md-' . $md;
463 426 }
464 427 if ($sm == 12) {
465 428 $sms = '';
466 429 } else {
467 - $sms = 'col-sm-' . Sanitizer::int( $sm );
430 + $sms = 'col-sm-' . $sm;
468 431 }
469 432 if ($xs == 12) {
470 433 $xss = '';
471 434 } else {
472 - $xss = 'col-xs-' . Sanitizer::int( $xs );
435 + $xss = 'col-xs-' . $xs;
473 436 }
474 - $result = '<div class="col-lg-3 ' . $mds . ' ' . $sms . ' ' . $xss . ' col-lg-offset-' . Sanitizer::int( $atts['off'] ) . EBS_CONTAINER_CLASS . ' one-fourth-second">';
437 + $result = '<div class="col-lg-3 ' . $mds . ' ' . $sms . ' ' . $xss . ' col-lg-offset-' . $off . ' one-fourth-second">';
475 438 $result .= do_shortcode($content);
476 439 $result .= '</div>';
477 440
478 441 return $result;
@@ -477,37 +440,34 @@
477 440
478 441 return $result;
479 442 }
480 443
481 -ebs_backward_compatibility_callback('one_fourth_second', 'osc_theme_one_fourth_second');
444 +add_shortcode('one_fourth_second', 'osc_theme_one_fourth_second');
482 445
483 446 function osc_theme_one_fourth_third($params, $content = null) {
484 - $atts = shortcode_atts(array(
447 + extract(shortcode_atts(array(
485 448 'md' => '',
486 449 'sm' => '',
487 450 'xs' => '',
488 451 'off' => ''
489 - ), $params);
490 - $md = $atts['md'];
491 - $sm = $atts['sm'];
492 - $xs = $atts['xs'];
452 + ), $params));
493 453 if ($md == 12) {
494 454 $mds = '';
495 455 } else {
496 - $mds = 'col-md-' . Sanitizer::int( $md );
456 + $mds = 'col-md-' . $md;
497 457 }
498 458 if ($sm == 12) {
499 459 $sms = '';
500 460 } else {
501 - $sms = 'col-sm-' . Sanitizer::int( $sm );
461 + $sms = 'col-sm-' . $sm;
502 462 }
503 463 if ($xs == 12) {
504 464 $xss = '';
505 465 } else {
506 - $xss = 'col-xs-' . Sanitizer::int( $xs );
466 + $xss = 'col-xs-' . $xs;
507 467 }
508 468
509 - $result = '<div class="col-lg-3 ' . $mds . ' ' . $sms . ' ' . $xss . ' col-lg-offset-' . Sanitizer::int( $atts['off'] ) . EBS_CONTAINER_CLASS . ' one-fourth-third">';
469 + $result = '<div class="col-lg-3 ' . $mds . ' ' . $sms . ' ' . $xss . ' col-lg-offset-' . $off . ' one-fourth-third">';
510 470 $result .= do_shortcode($content);
511 471 $result .= '</div>';
512 472
513 473 return $result;
@@ -512,36 +472,33 @@
512 472
513 473 return $result;
514 474 }
515 475
516 -ebs_backward_compatibility_callback('one_fourth_third', 'osc_theme_one_fourth_third');
476 +add_shortcode('one_fourth_third', 'osc_theme_one_fourth_third');
517 477
518 478 function osc_theme_one_half_second($params, $content = null) {
519 - $atts = shortcode_atts(array(
479 + extract(shortcode_atts(array(
520 480 'md' => '',
521 481 'sm' => '',
522 482 'xs' => '',
523 483 'off' => ''
524 - ), $params);
525 - $md = $atts['md'];
526 - $sm = $atts['sm'];
527 - $xs = $atts['xs'];
484 + ), $params));
528 485 if ($md == 12) {
529 486 $mds = '';
530 487 } else {
531 - $mds = 'col-md-' . Sanitizer::int( $md );
488 + $mds = 'col-md-' . $md;
532 489 }
533 490 if ($sm == 12) {
534 491 $sms = '';
535 492 } else {
536 - $sms = 'col-sm-' . Sanitizer::int( $sm );
493 + $sms = 'col-sm-' . $sm;
537 494 }
538 495 if ($xs == 12) {
539 496 $xss = '';
540 497 } else {
541 - $xss = 'col-xs-' . Sanitizer::int( $xs );
498 + $xss = 'col-xs-' . $xs;
542 499 }
543 - $result = '<div class="col-lg-6 ' . $mds . ' ' . $sms . ' ' . $xss . ' col-lg-offset-' . Sanitizer::int( $atts['off'] ) . EBS_CONTAINER_CLASS . ' one-half-second">';
500 + $result = '<div class="col-lg-6 ' . $mds . ' ' . $sms . ' ' . $xss . ' col-lg-offset-' . $off . ' one-half-second">';
544 501 $result .= do_shortcode($content);
545 502 $result .= '</div>';
546 503
547 504 return $result;
@@ -546,36 +503,33 @@
546 503
547 504 return $result;
548 505 }
549 506
550 -ebs_backward_compatibility_callback('one_half_second', 'osc_theme_one_half_second');
507 +add_shortcode('one_half_second', 'osc_theme_one_half_second');
551 508
552 509 function osc_theme_one_third_second($params, $content = null) {
553 - $atts = shortcode_atts(array(
510 + extract(shortcode_atts(array(
554 511 'md' => '',
555 512 'sm' => '',
556 513 'xs' => '',
557 514 'off' => ''
558 - ), $params);
559 - $md = $atts['md'];
560 - $sm = $atts['sm'];
561 - $xs = $atts['xs'];
515 + ), $params));
562 516 if ($md == 12) {
563 517 $mds = '';
564 518 } else {
565 - $mds = 'col-md-' . Sanitizer::int( $md );
519 + $mds = 'col-md-' . $md;
566 520 }
567 521 if ($sm == 12) {
568 522 $sms = '';
569 523 } else {
570 - $sms = 'col-sm-' . Sanitizer::int( $sm );
524 + $sms = 'col-sm-' . $sm;
571 525 }
572 526 if ($xs == 12) {
573 527 $xss = '';
574 528 } else {
575 - $xss = 'col-xs-' . Sanitizer::int( $xs );
529 + $xss = 'col-xs-' . $xs;
576 530 }
577 - $result = '<div class="col-lg-4 ' . $mds . ' ' . $sms . ' ' . $xss . ' col-lg-offset-' . Sanitizer::int( $atts['off'] ) . EBS_CONTAINER_CLASS . ' one-third-second">';
531 + $result = '<div class="col-lg-4 ' . $mds . ' ' . $sms . ' ' . $xss . ' col-lg-offset-' . $off . ' one-third-second">';
578 532 $result .= do_shortcode($content);
579 533 $result .= '</div>';
580 534
581 535 return $result;
@@ -580,36 +534,33 @@
580 534
581 535 return $result;
582 536 }
583 537
584 -ebs_backward_compatibility_callback('one_third_second', 'osc_theme_one_third_second');
538 +add_shortcode('one_third_second', 'osc_theme_one_third_second');
585 539
586 540 function osc_theme_one_column($params, $content = null) {
587 - $atts = shortcode_atts(array(
541 + extract(shortcode_atts(array(
588 542 'md' => '',
589 543 'sm' => '',
590 544 'xs' => '',
591 545 'off' => ''
592 - ), $params);
593 - $md = $atts['md'];
594 - $sm = $atts['sm'];
595 - $xs = $atts['xs'];
546 + ), $params));
596 547 if ($md == 12) {
597 548 $mds = '';
598 549 } else {
599 - $mds = 'col-md-' . Sanitizer::int( $md );
550 + $mds = 'col-md-' . $md;
600 551 }
601 552 if ($sm == 12) {
602 553 $sms = '';
603 554 } else {
604 - $sms = 'col-sm-' . Sanitizer::int( $sm );
555 + $sms = 'col-sm-' . $sm;
605 556 }
606 557 if ($xs == 12) {
607 558 $xss = '';
608 559 } else {
609 - $xss = 'col-xs-' . Sanitizer::int( $xs );
560 + $xss = 'col-xs-' . $xs;
610 561 }
611 - $result = '<div class="col-lg-12 ' . $mds . ' ' . $sms . ' ' . $xss . ' col-lg-offset-' . Sanitizer::int( $atts['off'] ) . EBS_CONTAINER_CLASS . ' one-column">';
562 + $result = '<div class="col-lg-12 ' . $mds . ' ' . $sms . ' ' . $xss . ' col-lg-offset-' . $off . ' one-column">';
612 563 $result .= do_shortcode($content);
613 564 $result .= '</div>';
614 565
615 566 return $result;
@@ -614,5 +565,5 @@
614 565
615 566 return $result;
616 567 }
617 568
618 -ebs_backward_compatibility_callback('one_column', 'osc_theme_one_column');
569 +add_shortcode('one_column', 'osc_theme_one_column');