0
|
1 |
<?php |
|
2 |
|
|
3 |
function filter_shortcode($content) { |
|
4 |
|
|
5 |
return do_shortcode(strip_tags($content, "<h1><h2><h3><h4><h5><h6><a><img><div><ul><li><ol><table><td><th><span><p><br>")); |
|
6 |
|
|
7 |
} |
|
8 |
|
|
9 |
add_shortcode('feedburner','vp_feedburner'); |
|
10 |
|
|
11 |
function vp_feedburner($atts, $content = null){ |
|
12 |
|
|
13 |
extract(shortcode_atts(array( |
|
14 |
|
|
15 |
"name" => '' |
|
16 |
|
|
17 |
), $atts)); |
|
18 |
|
|
19 |
if($name !== '') |
|
20 |
|
|
21 |
{ |
|
22 |
|
|
23 |
$output = '<div style="margin: 5px; display: inline">'; |
|
24 |
|
|
25 |
$output .= "<a href='" . esc_url( "http://feeds.feedburner.com/{$name}" ) . "'> |
|
26 |
|
|
27 |
<img src='" . esc_url( "http://feeds.feedburner.com/~fc/{$name}?bg=99CCFF&fg=444444&anim=0" ) . "' height='26' width='88' style='border:0' alt='' /> |
|
28 |
|
|
29 |
</a>"; |
|
30 |
|
|
31 |
$output .= '</div>'; |
|
32 |
|
|
33 |
} |
|
34 |
|
|
35 |
else $output = ''; |
|
36 |
|
|
37 |
return $output; |
|
38 |
|
|
39 |
} |
|
40 |
|
|
41 |
add_shortcode('twitter','vp_twitter'); |
|
42 |
|
|
43 |
function vp_twitter($atts, $content = null){ |
|
44 |
|
|
45 |
extract(shortcode_atts(array( |
|
46 |
|
|
47 |
"variation" => 1, |
|
48 |
|
|
49 |
"username" => '' |
|
50 |
|
|
51 |
), $atts)); |
|
52 |
|
|
53 |
if($username !== '') |
|
54 |
|
|
55 |
{ |
|
56 |
|
|
57 |
$output = '<div style="margin: 5px; display: inline">'; |
|
58 |
|
|
59 |
switch($variation) { |
|
60 |
|
|
61 |
case 1: |
|
62 |
|
|
63 |
$output .= '<a href="http://twitter.com/' . esc_html($username) . '"><img alt="twitter" src="http://button.twittercounter.com/animated/' . esc_html($username) . '/ffffff/00ACED" /></a>'; |
|
64 |
|
|
65 |
break; |
|
66 |
|
|
67 |
case 2: |
|
68 |
|
|
69 |
$output .= '<a href="http://twitter.com/' . esc_html($username) . '"><img alt="twitter" src="http://button.twittercounter.com/avatar/?u=' . esc_html($username) . '" /></a>'; |
|
70 |
|
|
71 |
break; |
|
72 |
|
|
73 |
case 3: |
|
74 |
|
|
75 |
$output .= '<a href="http://twitter.com/' . esc_html($username) . '"><img alt="twitter" src="http://button.twittercounter.com/bird/?u=' . esc_html($username) . '" /></a>'; |
|
76 |
|
|
77 |
break; |
|
78 |
|
|
79 |
} |
|
80 |
|
|
81 |
$output .= '</div>'; |
|
82 |
|
|
83 |
} |
|
84 |
|
|
85 |
else $output = ''; |
|
86 |
|
|
87 |
return $output; |
|
88 |
|
|
89 |
} |
|
90 |
|
|
91 |
add_shortcode('digg','vp_digg'); |
|
92 |
|
|
93 |
function vp_digg($atts, $content = null){ |
|
94 |
|
|
95 |
extract(shortcode_atts(array( |
|
96 |
|
|
97 |
"variation" => 1 |
|
98 |
|
|
99 |
), $atts)); |
|
100 |
|
|
101 |
$output = '<script type="text/javascript"> |
|
102 |
|
|
103 |
(function() { |
|
104 |
|
|
105 |
var s = document.createElement("SCRIPT"), s1 = document.getElementsByTagName("SCRIPT")[0]; |
|
106 |
|
|
107 |
s.type = "text/javascript"; |
|
108 |
|
|
109 |
s.async = true; |
|
110 |
|
|
111 |
s.src = "http://widgets.digg.com/buttons.js"; |
|
112 |
|
|
113 |
s1.parentNode.insertBefore(s, s1); |
|
114 |
|
|
115 |
})(); |
|
116 |
|
|
117 |
</script>'; |
|
118 |
|
|
119 |
$output .= '<div style="margin: 5px; display: inline">'; |
|
120 |
|
|
121 |
switch($variation) { |
|
122 |
|
|
123 |
case 1: |
|
124 |
|
|
125 |
$output .= '<a class="DiggThisButton DiggWide"></a>'; |
|
126 |
|
|
127 |
break; |
|
128 |
|
|
129 |
case 2: |
|
130 |
|
|
131 |
$output .= '<a class="DiggThisButton DiggMedium"></a>'; |
|
132 |
|
|
133 |
break; |
|
134 |
|
|
135 |
case 3: |
|
136 |
|
|
137 |
$output .= '<a class="DiggThisButton DiggCompact"></a>'; |
|
138 |
|
|
139 |
break; |
|
140 |
|
|
141 |
case 4: |
|
142 |
|
|
143 |
$output .= '<a class="DiggThisButton DiggIcon"></a>'; |
|
144 |
|
|
145 |
break; |
|
146 |
|
|
147 |
} |
|
148 |
|
|
149 |
$output .= '</div>'; |
|
150 |
|
|
151 |
return $output; |
|
152 |
|
|
153 |
} |
|
154 |
|
|
155 |
|
|
156 |
|
|
157 |
add_shortcode('facebook','vp_facebook'); |
|
158 |
|
|
159 |
function vp_facebook($atts, $content = null) { |
|
160 |
|
|
161 |
$output = '<div style="margin: 5px; display: inline">'; |
|
162 |
|
|
163 |
$output .= '<a name="fb_share"></a> |
|
164 |
|
|
165 |
<script src="http://static.ak.fbcdn.net/connect.php/js/FB.Share" |
|
166 |
|
|
167 |
type="text/javascript"> |
|
168 |
|
|
169 |
</script>'; |
|
170 |
|
|
171 |
$output .= '</div>'; |
|
172 |
|
|
173 |
return $output; |
|
174 |
|
|
175 |
} |
|
176 |
|
|
177 |
|
|
178 |
|
|
179 |
add_shortcode('stumble','vp_stumble'); |
|
180 |
|
|
181 |
function vp_stumble($atts, $content = null) { |
|
182 |
|
|
183 |
extract(shortcode_atts(array( |
|
184 |
|
|
185 |
"variation" => 5 |
|
186 |
|
|
187 |
), $atts)); |
|
188 |
|
|
189 |
$output = '<div style="margin: 5px; display: inline">'; |
|
190 |
|
|
191 |
$output .= '<su:badge layout="' . (int)$variation . '"></su:badge> |
|
192 |
|
|
193 |
|
|
194 |
|
|
195 |
<script type="text/javascript"> |
|
196 |
|
|
197 |
(function() { |
|
198 |
|
|
199 |
var li = document.createElement("script"); li.type = "text/javascript"; li.async = true; |
|
200 |
|
|
201 |
li.src = "https://platform.stumbleupon.com/1/widgets.js"; |
|
202 |
|
|
203 |
var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(li, s); |
|
204 |
|
|
205 |
})(); |
|
206 |
|
|
207 |
</script>'; |
|
208 |
|
|
209 |
$output .= '</div>'; |
|
210 |
|
|
211 |
return $output; |
|
212 |
|
|
213 |
} |
|
214 |
|
|
215 |
|
|
216 |
|
|
217 |
add_shortcode('retweet','vp_retweet'); |
|
218 |
|
|
219 |
function vp_retweet($atts, $content = null) { |
|
220 |
|
|
221 |
$output = '<div style="margin: 5px; display: inline">'; |
|
222 |
|
|
223 |
$output .= "<a href='http://twitter.com/share' class='twitter-share-button' data-count='vertical'>Tweet</a><script type='text/javascript' src='http://platform.twitter.com/widgets.js'></script>"; |
|
224 |
|
|
225 |
$output .= '</div>'; |
|
226 |
|
|
227 |
return $output; |
|
228 |
|
|
229 |
} |
|
230 |
|
|
231 |
|
|
232 |
|
|
233 |
add_shortcode('pinterest','vp_pinterest'); |
|
234 |
|
|
235 |
function vp_pinterest($atts, $content = null){ |
|
236 |
|
|
237 |
extract(shortcode_atts(array( |
|
238 |
|
|
239 |
"variation" => 1, |
|
240 |
|
|
241 |
"username" => '' |
|
242 |
|
|
243 |
), $atts)); |
|
244 |
|
|
245 |
if($username !== '') |
|
246 |
|
|
247 |
{ |
|
248 |
|
|
249 |
$output = '<div style="margin: 5px; display: inline">'; |
|
250 |
|
|
251 |
switch($variation) { |
|
252 |
|
|
253 |
case 1: |
|
254 |
|
|
255 |
$output .= '<a href="http://pinterest.com/' . esc_html($username) . '/"><img src="http://passets-ec.pinterest.com/images/about/buttons/follow-me-on-pinterest-button.png" width="169" height="28" alt="Follow Me on Pinterest" /></a>'; |
|
256 |
|
|
257 |
break; |
|
258 |
|
|
259 |
case 2: |
|
260 |
|
|
261 |
$output .= '<a href="http://pinterest.com/' . esc_html($username) . '/"><img src="http://passets-ec.pinterest.com/images/about/buttons/pinterest-button.png" width="80" height="28" alt="Follow Me on Pinterest" /></a>'; |
|
262 |
|
|
263 |
break; |
|
264 |
|
|
265 |
case 3: |
|
266 |
|
|
267 |
$output .= '<a href="http://pinterest.com/' . esc_html($username) . '/"><img src="http://passets-ec.pinterest.com/images/about/buttons/big-p-button.png" width="60" height="60" alt="Follow Me on Pinterest" /></a>'; |
|
268 |
|
|
269 |
break; |
|
270 |
|
|
271 |
case 4: |
|
272 |
|
|
273 |
$output .= '<a href="http://pinterest.com/' . esc_html($username) . '/"><img src="http://passets-ec.pinterest.com/images/about/buttons/small-p-button.png" width="16" height="16" alt="Follow Me on Pinterest" /></a>'; |
|
274 |
|
|
275 |
break; |
|
276 |
|
|
277 |
} |
|
278 |
|
|
279 |
$output .= '</div>'; |
|
280 |
|
|
281 |
} |
|
282 |
|
|
283 |
else $output = ''; |
|
284 |
|
|
285 |
return $output; |
|
286 |
|
|
287 |
} |
|
288 |
|
|
289 |
|
|
290 |
|
|
291 |
add_shortcode('addthis','vp_addthis'); |
|
292 |
|
|
293 |
function vp_addthis($atts, $content = null){ |
|
294 |
|
|
295 |
extract(shortcode_atts(array( |
|
296 |
|
|
297 |
"variation" => 1, |
|
298 |
|
|
299 |
), $atts)); |
|
300 |
|
|
301 |
|
|
302 |
|
|
303 |
$output = '<div style="margin: 5px; display: inline">'; |
|
304 |
|
|
305 |
switch($variation) { |
|
306 |
|
|
307 |
case 1: |
|
308 |
|
|
309 |
$output .= '<div class="addthis_toolbox addthis_default_style "> |
|
310 |
|
|
311 |
<a class="addthis_button_facebook_like" fb:like:layout="button_count"></a> |
|
312 |
|
|
313 |
<a class="addthis_button_tweet"></a> |
|
314 |
|
|
315 |
<a class="addthis_button_pinterest_pinit"></a> |
|
316 |
|
|
317 |
<a class="addthis_counter addthis_pill_style"></a> |
|
318 |
|
|
319 |
</div>'; |
|
320 |
|
|
321 |
break; |
|
322 |
|
|
323 |
case 2: |
|
324 |
|
|
325 |
$output .= '<div class="addthis_toolbox addthis_default_style addthis_32x32_style"> |
|
326 |
|
|
327 |
<a class="addthis_button_preferred_1"></a> |
|
328 |
|
|
329 |
<a class="addthis_button_preferred_2"></a> |
|
330 |
|
|
331 |
<a class="addthis_button_preferred_3"></a> |
|
332 |
|
|
333 |
<a class="addthis_button_preferred_4"></a> |
|
334 |
|
|
335 |
<a class="addthis_button_compact"></a> |
|
336 |
|
|
337 |
<a class="addthis_counter addthis_bubble_style"></a> |
|
338 |
|
|
339 |
</div>'; |
|
340 |
|
|
341 |
break; |
|
342 |
|
|
343 |
case 3: |
|
344 |
|
|
345 |
$output .= '<div class="addthis_toolbox addthis_default_style "> |
|
346 |
|
|
347 |
<a class="addthis_button_preferred_1"></a> |
|
348 |
|
|
349 |
<a class="addthis_button_preferred_2"></a> |
|
350 |
|
|
351 |
<a class="addthis_button_preferred_3"></a> |
|
352 |
|
|
353 |
<a class="addthis_button_preferred_4"></a> |
|
354 |
|
|
355 |
<a class="addthis_button_compact"></a> |
|
356 |
|
|
357 |
<a class="addthis_counter addthis_bubble_style"></a> |
|
358 |
|
|
359 |
</div>'; |
|
360 |
|
|
361 |
break; |
|
362 |
|
|
363 |
case 4: |
|
364 |
|
|
365 |
$output .= '<div class="addthis_toolbox addthis_floating_style addthis_counter_style" style="left:50px;top:50px;"> |
|
366 |
|
|
367 |
<a class="addthis_button_facebook_like" fb:like:layout="box_count"></a> |
|
368 |
|
|
369 |
<a class="addthis_button_tweet" tw:count="vertical"></a> |
|
370 |
|
|
371 |
<a class="addthis_button_google_plusone" g:plusone:size="tall"></a> |
|
372 |
|
|
373 |
<a class="addthis_counter"></a> |
|
374 |
|
|
375 |
</div>'; |
|
376 |
|
|
377 |
break; |
|
378 |
|
|
379 |
} |
|
380 |
|
|
381 |
$output .= '<script type="text/javascript" src="http://s7.addthis.com/js/250/addthis_widget.js#pubid=xa-4ff05056494689b5"></script>'; |
|
382 |
|
|
383 |
$output .= '</div>'; |
|
384 |
|
|
385 |
return $output; |
|
386 |
|
|
387 |
} |
|
388 |
|
|
389 |
add_shortcode('one_third','vp_one_third'); |
|
390 |
|
|
391 |
function vp_one_third($atts, $content = null){ |
|
392 |
|
|
393 |
extract(shortcode_atts(array( |
|
394 |
|
|
395 |
'noleft' => '', |
|
396 |
|
|
397 |
'noright' => '' |
|
398 |
|
|
399 |
), $atts)); |
|
400 |
|
|
401 |
$content = filter_shortcode($content); |
|
402 |
|
|
403 |
$class = ''; |
|
404 |
|
|
405 |
if($noleft !== '') |
|
406 |
|
|
407 |
$class .= 'alpha '; |
|
408 |
|
|
409 |
if($noright !== '') |
|
410 |
|
|
411 |
$class .= 'omega'; |
|
412 |
|
|
413 |
$output = '<div class="one-third column ' . $class . '">' . $content . '</div>'; |
|
414 |
|
|
415 |
return $output; |
|
416 |
|
|
417 |
} |
|
418 |
|
|
419 |
add_shortcode('one_half','vp_one_half'); |
|
420 |
|
|
421 |
function vp_one_half($atts, $content = null){ |
|
422 |
|
|
423 |
extract(shortcode_atts(array( |
|
424 |
|
|
425 |
'noleft' => '', |
|
426 |
|
|
427 |
'noright' => '' |
|
428 |
|
|
429 |
), $atts)); |
|
430 |
|
|
431 |
$content = filter_shortcode($content); |
|
432 |
|
|
433 |
$class = ''; |
|
434 |
|
|
435 |
if($noleft !== '') |
|
436 |
|
|
437 |
$class .= 'alpha '; |
|
438 |
|
|
439 |
if($noright !== '') |
|
440 |
|
|
441 |
$class .= 'omega'; |
|
442 |
|
|
443 |
$output = '<div class="eight columns ' . $class . '">' . $content . '</div>'; |
|
444 |
|
|
445 |
return $output; |
|
446 |
|
|
447 |
} |
|
448 |
|
|
449 |
|
|
450 |
|
|
451 |
add_shortcode('two_thirds','vp_two_thirds'); |
|
452 |
|
|
453 |
function vp_two_thirds($atts, $content = null){ |
|
454 |
|
|
455 |
extract(shortcode_atts(array( |
|
456 |
|
|
457 |
'noleft' => '', |
|
458 |
|
|
459 |
'noright' => '' |
|
460 |
|
|
461 |
), $atts)); |
|
462 |
|
|
463 |
$content = filter_shortcode($content); |
|
464 |
|
|
465 |
$class = ''; |
|
466 |
|
|
467 |
if($noleft !== '') |
|
468 |
|
|
469 |
$class .= 'alpha '; |
|
470 |
|
|
471 |
if($noright !== '') |
|
472 |
|
|
473 |
$class .= 'omega'; |
|
474 |
|
|
475 |
$output = '<div class="two-thirds column ' . $class . '">' . $content . '</div>'; |
|
476 |
|
|
477 |
return $output; |
|
478 |
|
|
479 |
} |
|
480 |
|
|
481 |
|
|
482 |
|
|
483 |
add_shortcode('one_fourth','vp_one_fourth'); |
|
484 |
|
|
485 |
function vp_one_fourth($atts, $content = null){ |
|
486 |
|
|
487 |
extract(shortcode_atts(array( |
|
488 |
|
|
489 |
'icon' => '', |
|
490 |
|
|
491 |
'noleft' => '', |
|
492 |
|
|
493 |
'noright' => '' |
|
494 |
|
|
495 |
), $atts)); |
|
496 |
|
|
497 |
$content = filter_shortcode($content); |
|
498 |
|
|
499 |
$class = ''; |
|
500 |
|
|
501 |
if($noleft !== '') |
|
502 |
|
|
503 |
$class .= 'alpha '; |
|
504 |
|
|
505 |
if($noright !== '') |
|
506 |
|
|
507 |
$class .= 'omega'; |
|
508 |
|
|
509 |
$output = '<div class="four columns ' . $class . '">'; |
|
510 |
|
|
511 |
if($icon !== '') |
|
512 |
|
|
513 |
$output .= '<img alt="" src="' . esc_attr($icon) . '">'; |
|
514 |
|
|
515 |
$output .= $content; |
|
516 |
|
|
517 |
$output .= '</div>'; |
|
518 |
|
|
519 |
return $output; |
|
520 |
|
|
521 |
} |
|
522 |
|
|
523 |
add_shortcode('one_column','vp_one_column'); |
|
524 |
|
|
525 |
function vp_one_column($atts, $content = null){ |
|
526 |
|
|
527 |
extract(shortcode_atts(array( |
|
528 |
|
|
529 |
'noleft' => '', |
|
530 |
|
|
531 |
'noright' => '' |
|
532 |
|
|
533 |
), $atts)); |
|
534 |
|
|
535 |
$content = filter_shortcode($content); |
|
536 |
|
|
537 |
$class = ''; |
|
538 |
|
|
539 |
if($noleft !== '') |
|
540 |
|
|
541 |
$class .= 'alpha '; |
|
542 |
|
|
543 |
if($noright !== '') |
|
544 |
|
|
545 |
$class .= 'omega'; |
|
546 |
|
|
547 |
$output = '<div class="one column ' . $class . '">' . $content . '</div>'; |
|
548 |
|
|
549 |
return $output; |
|
550 |
|
|
551 |
} |
|
552 |
|
|
553 |
add_shortcode('two_columns','vp_two_columns'); |
|
554 |
|
|
555 |
function vp_two_columns($atts, $content = null){ |
|
556 |
|
|
557 |
extract(shortcode_atts(array( |
|
558 |
|
|
559 |
'noleft' => '', |
|
560 |
|
|
561 |
'noright' => '' |
|
562 |
|
|
563 |
), $atts)); |
|
564 |
|
|
565 |
$content = filter_shortcode($content); |
|
566 |
|
|
567 |
$class = ''; |
|
568 |
|
|
569 |
if($noleft !== '') |
|
570 |
|
|
571 |
$class .= 'alpha '; |
|
572 |
|
|
573 |
if($noright !== '') |
|
574 |
|
|
575 |
$class .= 'omega'; |
|
576 |
|
|
577 |
$output = '<div class="two columns ' . $class . '">' . $content . '</div>'; |
|
578 |
|
|
579 |
return $output; |
|
580 |
|
|
581 |
} |
|
582 |
|
|
583 |
add_shortcode('three_columns','vp_three_columns'); |
|
584 |
|
|
585 |
function vp_three_columns($atts, $content = null){ |
|
586 |
|
|
587 |
extract(shortcode_atts(array( |
|
588 |
|
|
589 |
'noleft' => '', |
|
590 |
|
|
591 |
'noright' => '' |
|
592 |
|
|
593 |
), $atts)); |
|
594 |
|
|
595 |
$content = filter_shortcode($content); |
|
596 |
|
|
597 |
$class = ''; |
|
598 |
|
|
599 |
if($noleft !== '') |
|
600 |
|
|
601 |
$class .= 'alpha '; |
|
602 |
|
|
603 |
if($noright !== '') |
|
604 |
|
|
605 |
$class .= 'omega'; |
|
606 |
|
|
607 |
$output = '<div class="three columns ' . $class . '">' . $content . '</div>'; |
|
608 |
|
|
609 |
return $output; |
|
610 |
|
|
611 |
} |
|
612 |
|
|
613 |
add_shortcode('five_columns','vp_five_columns'); |
|
614 |
|
|
615 |
function vp_five_columns($atts, $content = null){ |
|
616 |
|
|
617 |
extract(shortcode_atts(array( |
|
618 |
|
|
619 |
'noleft' => '', |
|
620 |
|
|
621 |
'noright' => '' |
|
622 |
|
|
623 |
), $atts)); |
|
624 |
|
|
625 |
$content = filter_shortcode($content); |
|
626 |
|
|
627 |
$class = ''; |
|
628 |
|
|
629 |
if($noleft !== '') |
|
630 |
|
|
631 |
$class .= 'alpha '; |
|
632 |
|
|
633 |
if($noright !== '') |
|
634 |
|
|
635 |
$class .= 'omega'; |
|
636 |
|
|
637 |
$output = '<div class="five columns ' . $class . '">' . $content . '</div>'; |
|
638 |
|
|
639 |
return $output; |
|
640 |
|
|
641 |
} |
|
642 |
|
|
643 |
add_shortcode('six_columns','vp_six_columns'); |
|
644 |
|
|
645 |
function vp_six_columns($atts, $content = null){ |
|
646 |
|
|
647 |
extract(shortcode_atts(array( |
|
648 |
|
|
649 |
'noleft' => '', |
|
650 |
|
|
651 |
'noright' => '' |
|
652 |
|
|
653 |
), $atts)); |
|
654 |
|
|
655 |
$content = filter_shortcode($content); |
|
656 |
|
|
657 |
$class = ''; |
|
658 |
|
|
659 |
if($noleft !== '') |
|
660 |
|
|
661 |
$class .= 'alpha '; |
|
662 |
|
|
663 |
if($noright !== '') |
|
664 |
|
|
665 |
$class .= 'omega'; |
|
666 |
|
|
667 |
$output = '<div class="six columns ' . $class . '">' . $content . '</div>'; |
|
668 |
|
|
669 |
return $output; |
|
670 |
|
|
671 |
} |
|
672 |
|
|
673 |
add_shortcode('seven_columns','vp_seven_columns'); |
|
674 |
|
|
675 |
function vp_seven_columns($atts, $content = null){ |
|
676 |
|
|
677 |
extract(shortcode_atts(array( |
|
678 |
|
|
679 |
'noleft' => '', |
|
680 |
|
|
681 |
'noright' => '' |
|
682 |
|
|
683 |
), $atts)); |
|
684 |
|
|
685 |
$content = filter_shortcode($content); |
|
686 |
|
|
687 |
$class = ''; |
|
688 |
|
|
689 |
if($noleft !== '') |
|
690 |
|
|
691 |
$class .= 'alpha '; |
|
692 |
|
|
693 |
if($noright !== '') |
|
694 |
|
|
695 |
$class .= 'omega'; |
|
696 |
|
|
697 |
$output = '<div class="seven columns ' . $class . '">' . $content . '</div>'; |
|
698 |
|
|
699 |
return $output; |
|
700 |
|
|
701 |
} |
|
702 |
|
|
703 |
add_shortcode('nine_columns','vp_nine_columns'); |
|
704 |
|
|
705 |
function vp_nine_columns($atts, $content = null){ |
|
706 |
|
|
707 |
extract(shortcode_atts(array( |
|
708 |
|
|
709 |
'noleft' => '', |
|
710 |
|
|
711 |
'noright' => '' |
|
712 |
|
|
713 |
), $atts)); |
|
714 |
|
|
715 |
$content = filter_shortcode($content); |
|
716 |
|
|
717 |
$class = ''; |
|
718 |
|
|
719 |
if($noleft !== '') |
|
720 |
|
|
721 |
$class .= 'alpha '; |
|
722 |
|
|
723 |
if($noright !== '') |
|
724 |
|
|
725 |
$class .= 'omega'; |
|
726 |
|
|
727 |
$output = '<div class="nine columns ' . $class . '">' . $content . '</div>'; |
|
728 |
|
|
729 |
return $output; |
|
730 |
|
|
731 |
} |
|
732 |
|
|
733 |
add_shortcode('ten_columns','vp_ten_columns'); |
|
734 |
|
|
735 |
function vp_ten_columns($atts, $content = null){ |
|
736 |
|
|
737 |
extract(shortcode_atts(array( |
|
738 |
|
|
739 |
'noleft' => '', |
|
740 |
|
|
741 |
'noright' => '' |
|
742 |
|
|
743 |
), $atts)); |
|
744 |
|
|
745 |
$content = filter_shortcode($content); |
|
746 |
|
|
747 |
$output = '<div class="ten columns ' . $class . '">' . $content . '</div>'; |
|
748 |
|
|
749 |
return $output; |
|
750 |
|
|
751 |
} |
|
752 |
|
|
753 |
add_shortcode('eleven_columns','vp_eleven_columns'); |
|
754 |
|
|
755 |
function vp_eleven_columns($atts, $content = null){ |
|
756 |
|
|
757 |
extract(shortcode_atts(array( |
|
758 |
|
|
759 |
'noleft' => '', |
|
760 |
|
|
761 |
'noright' => '' |
|
762 |
|
|
763 |
), $atts)); |
|
764 |
|
|
765 |
$content = filter_shortcode($content); |
|
766 |
|
|
767 |
$class = ''; |
|
768 |
|
|
769 |
if($noleft !== '') |
|
770 |
|
|
771 |
$class .= 'alpha '; |
|
772 |
|
|
773 |
if($noright !== '') |
|
774 |
|
|
775 |
$class .= 'omega'; |
|
776 |
|
|
777 |
$output = '<div class="eleven columns ' . $class . '">' . $content . '</div>'; |
|
778 |
|
|
779 |
return $output; |
|
780 |
|
|
781 |
} |
|
782 |
|
|
783 |
add_shortcode('twelve_columns','vp_twelve_columns'); |
|
784 |
|
|
785 |
function vp_twelve_columns($atts, $content = null){ |
|
786 |
|
|
787 |
extract(shortcode_atts(array( |
|
788 |
|
|
789 |
'noleft' => '', |
|
790 |
|
|
791 |
'noright' => '' |
|
792 |
|
|
793 |
), $atts)); |
|
794 |
|
|
795 |
$content = filter_shortcode($content); |
|
796 |
|
|
797 |
$class = ''; |
|
798 |
|
|
799 |
if($noleft !== '') |
|
800 |
|
|
801 |
$class .= 'alpha '; |
|
802 |
|
|
803 |
if($noright !== '') |
|
804 |
|
|
805 |
$class .= 'omega'; |
|
806 |
|
|
807 |
$output = '<div class="twelve columns ' . $class . '">' . $content . '</div>'; |
|
808 |
|
|
809 |
return $output; |
|
810 |
|
|
811 |
} |
|
812 |
|
|
813 |
add_shortcode('thirteen_columns','vp_thirteen_columns'); |
|
814 |
|
|
815 |
function vp_thirteen_columns($atts, $content = null){ |
|
816 |
|
|
817 |
extract(shortcode_atts(array( |
|
818 |
|
|
819 |
'noleft' => '', |
|
820 |
|
|
821 |
'noright' => '' |
|
822 |
|
|
823 |
), $atts)); |
|
824 |
|
|
825 |
$content = filter_shortcode($content); |
|
826 |
|
|
827 |
$class = ''; |
|
828 |
|
|
829 |
if($noleft !== '') |
|
830 |
|
|
831 |
$class .= 'alpha '; |
|
832 |
|
|
833 |
if($noright !== '') |
|
834 |
|
|
835 |
$class .= 'omega'; |
|
836 |
|
|
837 |
$output = '<div class="thirteen columns ' . $class . '">' . $content . '</div>'; |
|
838 |
|
|
839 |
return $output; |
|
840 |
|
|
841 |
} |
|
842 |
|
|
843 |
add_shortcode('fourteen_columns','vp_fourteen_columns'); |
|
844 |
|
|
845 |
function vp_fourteen_columns($atts, $content = null){ |
|
846 |
|
|
847 |
extract(shortcode_atts(array( |
|
848 |
|
|
849 |
'noleft' => '', |
|
850 |
|
|
851 |
'noright' => '' |
|
852 |
|
|
853 |
), $atts)); |
|
854 |
|
|
855 |
$content = filter_shortcode($content); |
|
856 |
|
|
857 |
$class = ''; |
|
858 |
|
|
859 |
if($noleft !== '') |
|
860 |
|
|
861 |
$class .= 'alpha '; |
|
862 |
|
|
863 |
if($noright !== '') |
|
864 |
|
|
865 |
$class .= 'omega'; |
|
866 |
|
|
867 |
$output = '<div class="fourteen columns ' . $class . '">' . $content . '</div>'; |
|
868 |
|
|
869 |
return $output; |
|
870 |
|
|
871 |
} |
|
872 |
|
|
873 |
add_shortcode('fifteen_columns','vp_fifteen_columns'); |
|
874 |
|
|
875 |
function vp_fifteen_columns($atts, $content = null){ |
|
876 |
|
|
877 |
extract(shortcode_atts(array( |
|
878 |
|
|
879 |
'noleft' => '', |
|
880 |
|
|
881 |
'noright' => '' |
|
882 |
|
|
883 |
), $atts)); |
|
884 |
|
|
885 |
$content = filter_shortcode($content); |
|
886 |
|
|
887 |
$class = ''; |
|
888 |
|
|
889 |
if($noleft !== '') |
|
890 |
|
|
891 |
$class .= 'alpha '; |
|
892 |
|
|
893 |
if($noright !== '') |
|
894 |
|
|
895 |
$class .= 'omega'; |
|
896 |
|
|
897 |
$output = '<div class="fifteen columns ' . $class . '">' . $content . '</div>'; |
|
898 |
|
|
899 |
return $output; |
|
900 |
|
|
901 |
} |
|
902 |
|
|
903 |
add_shortcode('full','vp_full'); |
|
904 |
|
|
905 |
function vp_full($atts, $content = null){ |
|
906 |
|
|
907 |
$content = filter_shortcode($content); |
|
908 |
|
|
909 |
$output = '<div class="sixteen columns">' . $content . '</div>'; |
|
910 |
|
|
911 |
return $output; |
|
912 |
|
|
913 |
} |
|
914 |
|
|
915 |
add_shortcode('subtext','vp_subtext'); |
|
916 |
|
|
917 |
function vp_subtext($atts, $content = null){ |
|
918 |
|
|
919 |
$content = filter_shortcode($content); |
|
920 |
|
|
921 |
$output = '<p class="line2nd">' . $content . '</p>'; |
|
922 |
|
|
923 |
return $output; |
|
924 |
|
|
925 |
} |
|
926 |
|
|
927 |
add_shortcode('skills','vp_skills'); |
|
928 |
|
|
929 |
function vp_skills($atts, $content = null){ |
|
930 |
|
|
931 |
$content = filter_shortcode($content); |
|
932 |
|
|
933 |
return '<div class="skills"><div class="sixteen columns">' . $content . '</div></div>'; |
|
934 |
|
|
935 |
} |
|
936 |
|
|
937 |
add_shortcode('skill','vp_skill'); |
|
938 |
|
|
939 |
function vp_skill($atts, $content = null){ |
|
940 |
|
|
941 |
extract(shortcode_atts(array( |
|
942 |
|
|
943 |
'value' => '50', |
|
944 |
|
|
945 |
'bg' => '' |
|
946 |
|
|
947 |
), $atts)); |
|
948 |
|
|
949 |
$content = filter_shortcode($content); |
|
950 |
|
|
951 |
$value = (int)$value; |
|
952 |
|
|
953 |
$rand = rand(1,5); //uses some random backgrounds, just to make them different in case the use doesn't set any |
|
954 |
|
|
955 |
$output = '<p> ' . $content . '</p>'; |
|
956 |
|
|
957 |
$output .= '<div class="skill-bg"><div style="width: ' . $value . '%;'; |
|
958 |
|
|
959 |
if($bg !== '') $output .= 'background-color: #' . esc_attr($bg); |
|
960 |
|
|
961 |
$output .= '" class="skill' . $rand . '"></div></div>'; |
|
962 |
|
|
963 |
return $output; |
|
964 |
|
|
965 |
} |
|
966 |
|
|
967 |
add_shortcode('lightbox', 'vp_lightbox'); |
|
968 |
|
|
969 |
function vp_lightbox($atts, $content = null) { |
|
970 |
|
|
971 |
extract(shortcode_atts(array( |
|
972 |
|
|
973 |
'alt' => 0, |
|
974 |
|
|
975 |
'title' => 0, |
|
976 |
|
|
977 |
'thumbnail' => 0, |
|
978 |
|
|
979 |
'width' => 250, |
|
980 |
|
|
981 |
'height' => 125, |
|
982 |
|
|
983 |
'float' => 'none' |
|
984 |
|
|
985 |
), $atts)); |
|
986 |
|
|
987 |
|
|
988 |
|
|
989 |
$content = filter_shortcode($content); |
|
990 |
|
|
991 |
|
|
992 |
|
|
993 |
$output = '<div class="pic" style="width: ' . $width . 'px; float: ' . $float; |
|
994 |
|
|
995 |
if($float == 'left') |
|
996 |
|
|
997 |
$output .= '; margin-right: 10px'; |
|
998 |
|
|
999 |
elseif($float == 'right') |
|
1000 |
|
|
1001 |
$output .= '; margin-left: 10px'; |
|
1002 |
|
|
1003 |
$output .= '">'; |
|
1004 |
|
|
1005 |
$output .= '<div class="proj-img">' . PHP_EOL; |
|
1006 |
|
|
1007 |
if($content != '') |
|
1008 |
|
|
1009 |
{ |
|
1010 |
|
|
1011 |
if($title !== 0) |
|
1012 |
|
|
1013 |
$title = ' title="' . $title . '"'; |
|
1014 |
|
|
1015 |
else |
|
1016 |
|
|
1017 |
$title = ''; |
|
1018 |
|
|
1019 |
if($alt !== 0) |
|
1020 |
|
|
1021 |
$alt = ' alt="' . $alt . '"'; |
|
1022 |
|
|
1023 |
else |
|
1024 |
|
|
1025 |
$alt = ''; |
|
1026 |
|
|
1027 |
//the shortcode should return something only if the user sends an image |
|
1028 |
|
|
1029 |
$output .= '<a href="' . $content . '" class="prettyPhoto"' . $title . $alt . '></a>' . PHP_EOL; |
|
1030 |
|
|
1031 |
if($thumbnail === 0) |
|
1032 |
|
|
1033 |
{ |
|
1034 |
|
|
1035 |
$thumbnail = $content; |
|
1036 |
|
|
1037 |
} |
|
1038 |
|
|
1039 |
//if the user sends out a thumbnail img, we use that one. If not, we use the full width img to create a thumb. |
|
1040 |
|
|
1041 |
$output .= '<img ' . $alt . ' src="' . $thumbnail . '" style="width: ' . $width . 'px; height: ' . $height . 'px" />' . PHP_EOL; |
|
1042 |
|
|
1043 |
$output .= '<i>hover background</i>' . PHP_EOL; |
|
1044 |
|
|
1045 |
$output .= '</div> |
|
1046 |
|
|
1047 |
</div>' . PHP_EOL; |
|
1048 |
|
|
1049 |
} |
|
1050 |
|
|
1051 |
else |
|
1052 |
|
|
1053 |
$output = ''; |
|
1054 |
|
|
1055 |
return $output; |
|
1056 |
|
|
1057 |
} |
|
1058 |
|
|
1059 |
|
|
1060 |
|
|
1061 |
add_shortcode('quote_slider', 'vp_quote_slider'); |
|
1062 |
|
|
1063 |
function vp_quote_slider($atts, $content=null) { |
|
1064 |
|
|
1065 |
$content = filter_shortcode($content); |
|
1066 |
|
|
1067 |
$id = rand(1, 25000); |
|
1068 |
|
|
1069 |
$output = '<div class="quote-container"> |
|
1070 |
|
|
1071 |
<div class="quote-nav-left" id="quote-nav-left-' . $id . '"> |
|
1072 |
|
|
1073 |
<a href="#" onclick="return false">« left</a> |
|
1074 |
|
|
1075 |
</div> |
|
1076 |
|
|
1077 |
<div class="quote-nav-right" id="quote-nav-right-' . $id . '"> |
|
1078 |
|
|
1079 |
<a href="#" onclick="return false">right »</a> |
|
1080 |
|
|
1081 |
</div> |
|
1082 |
|
|
1083 |
<div class="quote-slider" id="quote-slider-' . $id . '">' . PHP_EOL; |
|
1084 |
|
|
1085 |
$output .= $content; |
|
1086 |
|
|
1087 |
$output .= '</div> |
|
1088 |
|
|
1089 |
</div>' . PHP_EOL; |
|
1090 |
|
|
1091 |
$output .= "<script type='text/javascript'> |
|
1092 |
|
|
1093 |
jQuery().ready(function() { |
|
1094 |
|
|
1095 |
jQuery('#quote-slider-$id').cycle({ |
|
1096 |
|
|
1097 |
fx: 'scrollHorz', |
|
1098 |
|
|
1099 |
easing: 'easeInOutExpo', |
|
1100 |
|
|
1101 |
prev: '#quote-nav-left-$id a', |
|
1102 |
|
|
1103 |
next: '#quote-nav-right-$id a', |
|
1104 |
|
|
1105 |
timeout: 1, |
|
1106 |
|
|
1107 |
timeout: 4000 |
|
1108 |
|
|
1109 |
}); |
|
1110 |
|
|
1111 |
}); |
|
1112 |
|
|
1113 |
</script>" . PHP_EOL; |
|
1114 |
|
|
1115 |
return $output; |
|
1116 |
|
|
1117 |
} |
|
1118 |
|
|
1119 |
add_shortcode('quote', 'vp_quote'); |
|
1120 |
|
|
1121 |
function vp_quote($atts, $content=null) { |
|
1122 |
|
|
1123 |
extract(shortcode_atts(array( |
|
1124 |
|
|
1125 |
'author' => '' |
|
1126 |
|
|
1127 |
), $atts)); |
|
1128 |
|
|
1129 |
|
|
1130 |
|
|
1131 |
$content = filter_shortcode($content); |
|
1132 |
|
|
1133 |
$output = '<div class="panel"> |
|
1134 |
|
|
1135 |
<p>“' . $content . '”</p> |
|
1136 |
|
|
1137 |
<p class="quoter">' . $author . '</p> |
|
1138 |
|
|
1139 |
</div>' . PHP_EOL; |
|
1140 |
|
|
1141 |
return $output; |
|
1142 |
|
|
1143 |
} |
|
1144 |
|
|
1145 |
|
|
1146 |
|
|
1147 |
add_shortcode('slider', 'vp_slider'); |
|
1148 |
|
|
1149 |
function vp_slider($atts, $content=null) { |
|
1150 |
|
|
1151 |
$id = rand(0, 25000); |
|
1152 |
|
|
1153 |
$content = filter_shortcode($content); |
|
1154 |
|
|
1155 |
$output = '<div class="flexslider flex-' . $id . '">'; |
|
1156 |
|
|
1157 |
$output .= '<ul class="slides">'; |
|
1158 |
|
|
1159 |
$output .= $content; |
|
1160 |
|
|
1161 |
$output .= '</ul></div>'; |
|
1162 |
|
|
1163 |
$output .= ' |
|
1164 |
|
|
1165 |
<script type="text/javascript"> |
|
1166 |
|
|
1167 |
jQuery(".flex-' . $id . '").flexslider({ |
|
1168 |
|
|
1169 |
animation: "slide", |
|
1170 |
|
|
1171 |
slideshow: true, |
|
1172 |
|
|
1173 |
slideshowSpeed: 3500, |
|
1174 |
|
|
1175 |
animationSpeed: 1000 |
|
1176 |
|
|
1177 |
}); |
|
1178 |
|
|
1179 |
</script>'; |
|
1180 |
|
|
1181 |
return $output; |
|
1182 |
|
|
1183 |
} |
|
1184 |
|
|
1185 |
|
|
1186 |
|
|
1187 |
add_shortcode('slider_img', 'vp_slider_img'); |
|
1188 |
|
|
1189 |
function vp_slider_img($atts, $content=null) { |
|
1190 |
|
|
1191 |
extract(shortcode_atts(array( |
|
1192 |
|
|
1193 |
'alt' => '' |
|
1194 |
|
|
1195 |
), $atts)); |
|
1196 |
|
|
1197 |
$content = filter_shortcode($content); |
|
1198 |
|
|
1199 |
if($content != '') |
|
1200 |
|
|
1201 |
{ |
|
1202 |
|
|
1203 |
$output = ' <li><img alt="' . $alt . '" src="' . $content . '"></li>' . PHP_EOL; |
|
1204 |
|
|
1205 |
return $output; |
|
1206 |
|
|
1207 |
} |
|
1208 |
|
|
1209 |
else return ''; |
|
1210 |
|
|
1211 |
} |
|
1212 |
|
|
1213 |
|
|
1214 |
|
|
1215 |
add_shortcode('portfolio', 'vp_portfolio'); |
|
1216 |
|
|
1217 |
function vp_portfolio($atts, $content=null) { |
|
1218 |
|
|
1219 |
$content = filter_shortcode($content); |
|
1220 |
|
|
1221 |
$output = '<div class="portfolio">' . PHP_EOL; |
|
1222 |
|
|
1223 |
$output .= $content; |
|
1224 |
|
|
1225 |
$output .= '</div>'; |
|
1226 |
|
|
1227 |
return $output; |
|
1228 |
|
|
1229 |
} |
|
1230 |
|
|
1231 |
|
|
1232 |
|
|
1233 |
add_shortcode('portfolio_item', 'vp_portfolio_item'); |
|
1234 |
|
|
1235 |
function vp_portfolio_item($atts, $content=null) { |
|
1236 |
|
|
1237 |
extract(shortcode_atts(array( |
|
1238 |
|
|
1239 |
'thumbnail' => '', |
|
1240 |
|
|
1241 |
'image' => '', |
|
1242 |
|
|
1243 |
'title' => '', |
|
1244 |
|
|
1245 |
'text' => '', |
|
1246 |
|
|
1247 |
'columns' => 3, |
|
1248 |
|
|
1249 |
'centered' => 'no', |
|
1250 |
|
|
1251 |
'alt' => '', |
|
1252 |
|
|
1253 |
), $atts)); |
|
1254 |
|
|
1255 |
switch($columns) |
|
1256 |
|
|
1257 |
{ |
|
1258 |
|
|
1259 |
case 1: |
|
1260 |
|
|
1261 |
$class = 'class="sixteen columns"'; |
|
1262 |
|
|
1263 |
break; |
|
1264 |
|
|
1265 |
case 2: |
|
1266 |
|
|
1267 |
$class = 'class="eight columns"'; |
|
1268 |
|
|
1269 |
break; |
|
1270 |
|
|
1271 |
case 3: |
|
1272 |
|
|
1273 |
$class = 'class="one-third column"'; |
|
1274 |
|
|
1275 |
break; |
|
1276 |
|
|
1277 |
case 4: |
|
1278 |
|
|
1279 |
$class = 'class="four columns"'; |
|
1280 |
|
|
1281 |
break; |
|
1282 |
|
|
1283 |
} |
|
1284 |
|
|
1285 |
if($thumbnail === '') |
|
1286 |
|
|
1287 |
$thumbnail = $image; |
|
1288 |
|
|
1289 |
if($image !== '') |
|
1290 |
|
|
1291 |
{ |
|
1292 |
|
|
1293 |
if($centered == 'yes') |
|
1294 |
|
|
1295 |
$var = ' style="text-align: center" '; |
|
1296 |
|
|
1297 |
else |
|
1298 |
|
|
1299 |
$var = ''; |
|
1300 |
|
|
1301 |
$output = '<div ' . $var . $class . '>'; |
|
1302 |
|
|
1303 |
$output .= '<a class="prettyPhoto" href="' . esc_attr($image) . '"><img alt="' . esc_attr($alt) . '" class="scale-with-grid" src="' . esc_attr($thumbnail) . '" /></a>'; |
|
1304 |
|
|
1305 |
$output .= '<p class="proj-title">' . esc_attr($title) . '</p>'; |
|
1306 |
|
|
1307 |
$output .= '<p class="proj-desc">' . esc_attr($text) . '</p>'; |
|
1308 |
|
|
1309 |
$output .= '</div>'; |
|
1310 |
|
|
1311 |
return $output; |
|
1312 |
|
|
1313 |
} |
|
1314 |
|
|
1315 |
else return ''; |
|
1316 |
|
|
1317 |
} |
|
1318 |
|
|
1319 |
|
|
1320 |
|
|
1321 |
add_shortcode('button', 'vp_button'); |
|
1322 |
|
|
1323 |
function vp_button($atts, $content=null) { |
|
1324 |
|
|
1325 |
extract(shortcode_atts(array( |
|
1326 |
|
|
1327 |
'url' => '', |
|
1328 |
|
|
1329 |
'newwindow' => 'no', |
|
1330 |
|
|
1331 |
'color' => 'FADBA1' |
|
1332 |
|
|
1333 |
), $atts)); |
|
1334 |
|
|
1335 |
$content = filter_shortcode($content); |
|
1336 |
|
|
1337 |
$color = esc_attr($color); |
|
1338 |
|
|
1339 |
if($newwindow == 'yes') |
|
1340 |
|
|
1341 |
$target = ' target="_blank" '; |
|
1342 |
|
|
1343 |
else |
|
1344 |
|
|
1345 |
$target = ''; |
|
1346 |
|
|
1347 |
if($content !== '') |
|
1348 |
|
|
1349 |
{ |
|
1350 |
|
|
1351 |
if($color === 'FADBA1') |
|
1352 |
|
|
1353 |
{ |
|
1354 |
|
|
1355 |
if($url === '') |
|
1356 |
|
|
1357 |
$output = '<div class="button1">' . $content . '</div>'; |
|
1358 |
|
|
1359 |
else |
|
1360 |
|
|
1361 |
$output = '<a ' . $target . ' href="' . esc_url($url) . '"><div class="button1">' . $content . '</div></a>'; |
|
1362 |
|
|
1363 |
} |
|
1364 |
|
|
1365 |
else |
|
1366 |
|
|
1367 |
{ |
|
1368 |
|
|
1369 |
if($url === '') |
|
1370 |
|
|
1371 |
$output = '<div class="button2" style="background-color: #' . $color . '">' . $content . '</div>'; |
|
1372 |
|
|
1373 |
else |
|
1374 |
|
|
1375 |
$output = '<a ' . $target . ' href="' . esc_url($url) . '"><div class="button2" style="background-color: #' . $color . '">' . $content . '</div></a>'; |
|
1376 |
|
|
1377 |
} |
|
1378 |
|
|
1379 |
return $output; |
|
1380 |
|
|
1381 |
} |
|
1382 |
|
|
1383 |
else return ''; |
|
1384 |
|
|
1385 |
} |
|
1386 |
|
|
1387 |
|
|
1388 |
|
|
1389 |
add_shortcode('testimonial', 'vp_testimonial'); |
|
1390 |
|
|
1391 |
function vp_testimonial($atts, $content=null) { |
|
1392 |
|
|
1393 |
$content = filter_shortcode($content); |
|
1394 |
|
|
1395 |
return '<div class="testimonials"> |
|
1396 |
|
|
1397 |
<p>“' . $content . '”</p> |
|
1398 |
|
|
1399 |
</div>'; |
|
1400 |
|
|
1401 |
} |
|
1402 |
|
|
1403 |
|
|
1404 |
|
|
1405 |
|
|
1406 |
|
|
1407 |
add_shortcode('clear', 'vp_clear'); |
|
1408 |
|
|
1409 |
function vp_clear($atts, $content=null) { |
|
1410 |
|
|
1411 |
return '<div class="clear"></div>'; |
|
1412 |
|
|
1413 |
} |
|
1414 |
|
|
1415 |
add_shortcode('center', 'vp_centered'); |
|
1416 |
|
|
1417 |
function vp_centered($atts, $content=null) { |
|
1418 |
|
|
1419 |
$content = filter_shortcode($content); |
|
1420 |
|
|
1421 |
return '<div style="text-align: center">' . $content . '</div>'; |
|
1422 |
|
|
1423 |
} |
|
1424 |
|
|
1425 |
add_shortcode('list', 'vp_list'); |
|
1426 |
|
|
1427 |
function vp_list($atts, $content=null) { |
|
1428 |
|
|
1429 |
extract(shortcode_atts(array( |
|
1430 |
|
|
1431 |
'type' => 'bullet' |
|
1432 |
|
|
1433 |
), $atts)); |
|
1434 |
|
|
1435 |
$content = filter_shortcode($content); |
|
1436 |
|
|
1437 |
if($type == 'bullet') |
|
1438 |
|
|
1439 |
$output = '<ul class="list bullet">'; |
|
1440 |
|
|
1441 |
elseif($type == 'check') |
|
1442 |
|
|
1443 |
$output = '<ul class="list check">'; |
|
1444 |
|
|
1445 |
elseif($type == 'float') |
|
1446 |
|
|
1447 |
$output = '<ul class="list float">'; |
|
1448 |
|
|
1449 |
else return ''; |
|
1450 |
|
|
1451 |
$output .= $content; |
|
1452 |
|
|
1453 |
$output .= '</ul>'; |
|
1454 |
|
|
1455 |
return $output; |
|
1456 |
|
|
1457 |
} |
|
1458 |
|
|
1459 |
add_shortcode('twitter_updates', 'vp_twitter_updates'); |
|
1460 |
|
|
1461 |
function vp_twitter_updates($atts, $content=null) { |
|
1462 |
|
|
1463 |
$output = '<div class="last_tweets"> |
|
1464 |
|
|
1465 |
<div id="twitter_update_list"></div> |
|
1466 |
|
|
1467 |
</div> <!-- end last_tweets -->'; |
|
1468 |
|
|
1469 |
return $output; |
|
1470 |
|
|
1471 |
} |
|
1472 |
|
|
1473 |
|
|
1474 |
|
|
1475 |
add_shortcode('pricing_table','til_pricing_table'); |
|
1476 |
|
|
1477 |
function til_pricing_table($atts, $content = null){ |
|
1478 |
|
|
1479 |
extract(shortcode_atts(array( |
|
1480 |
|
|
1481 |
'name' => '', |
|
1482 |
|
|
1483 |
'price' => '', |
|
1484 |
|
|
1485 |
'price_text' => '', |
|
1486 |
|
|
1487 |
'moretext' => 'Sign up', |
|
1488 |
|
|
1489 |
'morelink' => '', |
|
1490 |
|
|
1491 |
'columns' => '4' |
|
1492 |
|
|
1493 |
), $atts)); |
|
1494 |
|
|
1495 |
switch($columns) |
|
1496 |
|
|
1497 |
{ |
|
1498 |
|
|
1499 |
case 1: |
|
1500 |
|
|
1501 |
$class = 'class="sixteen columns pricing"'; |
|
1502 |
|
|
1503 |
break; |
|
1504 |
|
|
1505 |
case 2: |
|
1506 |
|
|
1507 |
$class = 'class="eight columns pricing"'; |
|
1508 |
|
|
1509 |
break; |
|
1510 |
|
|
1511 |
case 3: |
|
1512 |
|
|
1513 |
$class = 'class="one-third column pricing"'; |
|
1514 |
|
|
1515 |
break; |
|
1516 |
|
|
1517 |
case 4: |
|
1518 |
|
|
1519 |
$class = 'class="four columns pricing"'; |
|
1520 |
|
|
1521 |
break; |
|
1522 |
|
|
1523 |
default: |
|
1524 |
|
|
1525 |
$class = 'class="one-third column pricing"'; |
|
1526 |
|
|
1527 |
break; |
|
1528 |
|
|
1529 |
} |
|
1530 |
|
|
1531 |
$content = filter_shortcode($content); |
|
1532 |
|
|
1533 |
$name = esc_attr($name); |
|
1534 |
|
|
1535 |
$price = esc_attr($price); |
|
1536 |
|
|
1537 |
$price_text = esc_attr($price_text); |
|
1538 |
|
|
1539 |
$moretext = esc_attr($moretext); |
|
1540 |
|
|
1541 |
$morelink = esc_url($morelink); |
|
1542 |
|
|
1543 |
$output = ''; |
|
1544 |
|
|
1545 |
$output .= '<div ' . $class .'>'; |
|
1546 |
|
|
1547 |
if($name !== '') |
|
1548 |
|
|
1549 |
$output .= '<p class="p-name">' . $name . '</p>'; |
|
1550 |
|
|
1551 |
if($price !== '') |
|
1552 |
|
|
1553 |
{ |
|
1554 |
|
|
1555 |
$output .= '<p class="p-price">' . $price; |
|
1556 |
|
|
1557 |
if ($price_text !== '') { |
|
1558 |
|
|
1559 |
$output .= '<span class="p-small">' . $price_text . '</span>'; |
|
1560 |
|
|
1561 |
} |
|
1562 |
|
|
1563 |
$output .= '</p>'; |
|
1564 |
|
|
1565 |
} |
|
1566 |
|
|
1567 |
$output .= '<ul>' . $content . '</ul>'; |
|
1568 |
|
|
1569 |
$output .= '<div class="signup"><div class="button2">'; |
|
1570 |
|
|
1571 |
if($morelink !== '') |
|
1572 |
|
|
1573 |
$output .= '<a href="' . $morelink . '">' . $moretext . '</a>'; |
|
1574 |
|
|
1575 |
else |
|
1576 |
|
|
1577 |
$output .= $moretext; |
|
1578 |
|
|
1579 |
$output .= '</div></div> |
|
1580 |
|
|
1581 |
</div>'; |
|
1582 |
|
|
1583 |
return $output; |
|
1584 |
|
|
1585 |
} |
|
1586 |
|
|
1587 |
add_shortcode('feature','vp_feature'); |
|
1588 |
|
|
1589 |
function vp_feature($atts, $content = null){ |
|
1590 |
|
|
1591 |
$content = filter_shortcode($content); |
|
1592 |
|
|
1593 |
if($content != '') |
|
1594 |
|
|
1595 |
return '<li>' . $content . '</li>'; |
|
1596 |
|
|
1597 |
} |
|
1598 |
|
|
1599 |
|
|
1600 |
|
|
1601 |
add_shortcode('facebook_small','vp_facebook_small'); |
|
1602 |
|
|
1603 |
function vp_facebook_small($atts, $content = null) { |
|
1604 |
|
|
1605 |
extract(shortcode_atts(array( |
|
1606 |
|
|
1607 |
"username" => '', |
|
1608 |
|
|
1609 |
), $atts)); |
|
1610 |
|
|
1611 |
if($username !== '') |
|
1612 |
|
|
1613 |
$output = '<div class="facebook_small"> |
|
1614 |
|
|
1615 |
<a href="http://facebook.com/' . esc_html($username) . '/" title="facebook">Visit our facebook Account</a> |
|
1616 |
|
|
1617 |
</div>'; |
|
1618 |
|
|
1619 |
else |
|
1620 |
|
|
1621 |
$output = ''; |
|
1622 |
|
|
1623 |
return $output; |
|
1624 |
|
|
1625 |
} |
|
1626 |
|
|
1627 |
|
|
1628 |
|
|
1629 |
add_shortcode('twitter_small','vp_twitter_small'); |
|
1630 |
|
|
1631 |
function vp_twitter_small($atts, $content = null) { |
|
1632 |
|
|
1633 |
extract(shortcode_atts(array( |
|
1634 |
|
|
1635 |
"username" => '', |
|
1636 |
|
|
1637 |
), $atts)); |
|
1638 |
|
|
1639 |
if($username !== '') |
|
1640 |
|
|
1641 |
$output = '<div class="twitter2_small"> |
|
1642 |
|
|
1643 |
<a href="http://twitter.com/#!/' . esc_html($username) . '/" title="twitter">Visit our twitter Account</a> |
|
1644 |
|
|
1645 |
</div>'; |
|
1646 |
|
|
1647 |
else |
|
1648 |
|
|
1649 |
$output = ''; |
|
1650 |
|
|
1651 |
return $output; |
|
1652 |
|
|
1653 |
} |
|
1654 |
|
|
1655 |
|
|
1656 |
|
|
1657 |
add_shortcode('twitter_big','vp_twitter_big'); |
|
1658 |
|
|
1659 |
function vp_twitter_big($atts, $content = null) { |
|
1660 |
|
|
1661 |
extract(shortcode_atts(array( |
|
1662 |
|
|
1663 |
"username" => '', |
|
1664 |
|
|
1665 |
), $atts)); |
|
1666 |
|
|
1667 |
if($username !== '') |
|
1668 |
|
|
1669 |
$output = '<div class="twitter_small"> |
|
1670 |
|
|
1671 |
<a href="http://twitter.com/#!/' . esc_html($username) . '/" title="twitter">Visit our twitter Account</a> |
|
1672 |
|
|
1673 |
</div>'; |
|
1674 |
|
|
1675 |
else |
|
1676 |
|
|
1677 |
$output = ''; |
|
1678 |
|
|
1679 |
return $output; |
|
1680 |
|
|
1681 |
} |
|
1682 |
|
|
1683 |
|
|
1684 |
|
|
1685 |
add_shortcode('dribble_small','vp_dribble_small'); |
|
1686 |
|
|
1687 |
function vp_dribble_small($atts, $content = null) { |
|
1688 |
|
|
1689 |
extract(shortcode_atts(array( |
|
1690 |
|
|
1691 |
"username" => '', |
|
1692 |
|
|
1693 |
), $atts)); |
|
1694 |
|
|
1695 |
if($username !== '') |
|
1696 |
|
|
1697 |
$output = '<div class="dribble_small"> |
|
1698 |
|
|
1699 |
<a href="http://dribbble.com/' . esc_html($username) . '/" title="dribble">Visit our dribble Account</a> |
|
1700 |
|
|
1701 |
</div>'; |
|
1702 |
|
|
1703 |
else |
|
1704 |
|
|
1705 |
$output = ''; |
|
1706 |
|
|
1707 |
return $output; |
|
1708 |
|
|
1709 |
} |
|
1710 |
|
|
1711 |
|
|
1712 |
|
|
1713 |
add_shortcode('vimeo_small','vp_vimeo_small'); |
|
1714 |
|
|
1715 |
function vp_vimeo_small($atts, $content = null) { |
|
1716 |
|
|
1717 |
extract(shortcode_atts(array( |
|
1718 |
|
|
1719 |
"username" => '', |
|
1720 |
|
|
1721 |
), $atts)); |
|
1722 |
|
|
1723 |
if($username !== '') |
|
1724 |
|
|
1725 |
$output = '<div class="vimeo_small"> |
|
1726 |
|
|
1727 |
<a href="http://vimeo.com/' . esc_html($username) . '/" title="vimeo">Visit our vimeo Account</a> |
|
1728 |
|
|
1729 |
</div>'; |
|
1730 |
|
|
1731 |
else |
|
1732 |
|
|
1733 |
$output = ''; |
|
1734 |
|
|
1735 |
return $output; |
|
1736 |
|
|
1737 |
} |
|
1738 |
|
|
1739 |
|
|
1740 |
|
|
1741 |
add_shortcode('flickr_small','vp_flickr_small'); |
|
1742 |
|
|
1743 |
function vp_flickr_small($atts, $content = null) { |
|
1744 |
|
|
1745 |
extract(shortcode_atts(array( |
|
1746 |
|
|
1747 |
"username" => '', |
|
1748 |
|
|
1749 |
), $atts)); |
|
1750 |
|
|
1751 |
if($username !== '') |
|
1752 |
|
|
1753 |
$output = '<div class="flickr_small"> |
|
1754 |
|
|
1755 |
<a href="http://www.flickr.com/people/' . esc_html($username) . '/" title="flickr">Visit our flickr Account</a> |
|
1756 |
|
|
1757 |
</div>'; |
|
1758 |
|
|
1759 |
else |
|
1760 |
|
|
1761 |
$output = ''; |
|
1762 |
|
|
1763 |
return $output; |
|
1764 |
|
|
1765 |
} |
|
1766 |
|
|
1767 |
add_shortcode('header','vp_header'); |
|
1768 |
|
|
1769 |
function vp_header($atts, $content = null) { |
|
1770 |
|
|
1771 |
$content = filter_shortcode($content); |
|
1772 |
|
|
1773 |
$output = '<h3 style="text-align: centered; margin-top: 25px"><span class="lines">' . $content . '</span></h3>'; |
|
1774 |
|
|
1775 |
return $output; |
|
1776 |
|
|
1777 |
} |
|
1778 |
|
|
1779 |
add_shortcode('subheader','vp_subheader'); |
|
1780 |
|
|
1781 |
function vp_subheader($atts, $content = null) { |
|
1782 |
|
|
1783 |
$content = filter_shortcode($content); |
|
1784 |
|
|
1785 |
$output = '<div class="action"><p>' . $content . '</p></div>'; |
|
1786 |
|
|
1787 |
return $output; |
|
1788 |
|
|
1789 |
} |
|
1790 |
|
|
1791 |
add_shortcode('team','vp_team'); |
|
1792 |
|
|
1793 |
function vp_team($atts, $content = null) { |
|
1794 |
|
|
1795 |
extract(shortcode_atts(array( |
|
1796 |
|
|
1797 |
"image" => '', |
|
1798 |
|
|
1799 |
"name" => '', |
|
1800 |
|
|
1801 |
"position" => '', |
|
1802 |
|
|
1803 |
"description" => '', |
|
1804 |
|
|
1805 |
"twitter" => '', |
|
1806 |
|
|
1807 |
"facebook" => '', |
|
1808 |
|
|
1809 |
"dribble" => '', |
|
1810 |
|
|
1811 |
"skype" => '', |
|
1812 |
|
|
1813 |
"gplus" => '', |
|
1814 |
|
|
1815 |
"linkedin" => '', |
|
1816 |
|
|
1817 |
"pinterest" => '', |
|
1818 |
|
|
1819 |
"columns" => 3 |
|
1820 |
|
|
1821 |
), $atts)); |
|
1822 |
|
|
1823 |
switch($columns) |
|
1824 |
|
|
1825 |
{ |
|
1826 |
|
|
1827 |
case 1: |
|
1828 |
|
|
1829 |
$class = 'class="sixteen columns team"'; |
|
1830 |
|
|
1831 |
break; |
|
1832 |
|
|
1833 |
case 2: |
|
1834 |
|
|
1835 |
$class = 'class="eight columns team"'; |
|
1836 |
|
|
1837 |
break; |
|
1838 |
|
|
1839 |
case 3: |
|
1840 |
|
|
1841 |
$class = 'class="one-third column team"'; |
|
1842 |
|
|
1843 |
break; |
|
1844 |
|
|
1845 |
case 4: |
|
1846 |
|
|
1847 |
$class = 'class="four columns team"'; |
|
1848 |
|
|
1849 |
break; |
|
1850 |
|
|
1851 |
default: |
|
1852 |
|
|
1853 |
$class = 'class="one-third column team'; |
|
1854 |
|
|
1855 |
break; |
|
1856 |
|
|
1857 |
} |
|
1858 |
|
|
1859 |
$output = '<div ' . $class . '>'; |
|
1860 |
|
|
1861 |
if($image !== '') |
|
1862 |
|
|
1863 |
$output .= '<img alt="' . esc_attr($name) . '"class="scale-with-grid" src="' . esc_attr($image) . '" />'; |
|
1864 |
|
|
1865 |
if($name !== '') |
|
1866 |
|
|
1867 |
$output .= '<p class="t-name">' . esc_attr($name) . '</p>'; |
|
1868 |
|
|
1869 |
if($position !== '') |
|
1870 |
|
|
1871 |
$output .= '<p class="t-type">' . esc_attr($position) . '</p>'; |
|
1872 |
|
|
1873 |
if($description !== '') |
|
1874 |
|
|
1875 |
$output .= '<p>' . esc_attr($description) . '</p>'; |
|
1876 |
|
|
1877 |
$output .= '<ul>'; |
|
1878 |
|
|
1879 |
if($twitter !== '') |
|
1880 |
|
|
1881 |
$output .= '<li><a target="_blank" href="' . esc_url($twitter) . '"><img src="' . get_stylesheet_directory_uri() . '/images/icn-twitter.png" /></a></li>'; |
|
1882 |
|
|
1883 |
if($facebook !== '') |
|
1884 |
|
|
1885 |
$output .= '<li><a target="_blank" href="' . esc_url($facebook) . '"><img src="' . get_stylesheet_directory_uri() . '/images/icn-facebook.png" /></a></li>'; |
|
1886 |
|
|
1887 |
if($dribble !== '') |
|
1888 |
|
|
1889 |
$output .= '<li><a target="_blank" href="' . esc_url($dribble) . '"><img src="' . get_stylesheet_directory_uri() . '/images/icn-dribbble.png" /></a></li>'; |
|
1890 |
|
|
1891 |
if($skype !== '') |
|
1892 |
|
|
1893 |
$output .= '<li><a target="_blank" href="' . esc_attr($skype) . '"><img src="' . get_stylesheet_directory_uri() . '/images/icn-skype.png" /></a></li>'; |
|
1894 |
|
|
1895 |
if($gplus !== '') |
|
1896 |
|
|
1897 |
$output .= '<li><a target="_blank" href="' . esc_url($gplus) . '"><img src="' . get_stylesheet_directory_uri() . '/images/icn-gplus.png" /></a></li>'; |
|
1898 |
|
|
1899 |
if($linkedin !== '') |
|
1900 |
|
|
1901 |
$output .= '<li><a target="_blank" href="' . esc_url($linkedin) . '"><img src="' . get_stylesheet_directory_uri() . '/images/icn-linkedin.png" /></a></li>'; |
|
1902 |
|
|
1903 |
if($pinterest !== '') |
|
1904 |
|
|
1905 |
$output .= '<li><a target="_blank" href="' . esc_url($pinterest) . '"><img src="' . get_stylesheet_directory_uri() . '/images/icn-pinterest.png" /></a></li>'; |
|
1906 |
|
|
1907 |
$output .= '</ul> |
|
1908 |
|
|
1909 |
</div>'; |
|
1910 |
|
|
1911 |
return $output; |
|
1912 |
|
|
1913 |
} |
|
1914 |
|
|
1915 |
add_shortcode('service','vp_service'); |
|
1916 |
|
|
1917 |
function vp_service($atts, $content = null) { |
|
1918 |
|
|
1919 |
extract(shortcode_atts(array( |
|
1920 |
|
|
1921 |
"title" => '', |
|
1922 |
|
|
1923 |
"image" => '', |
|
1924 |
|
|
1925 |
"text" => '', |
|
1926 |
|
|
1927 |
"columns" => '3' |
|
1928 |
|
|
1929 |
), $atts)); |
|
1930 |
|
|
1931 |
switch($columns) |
|
1932 |
|
|
1933 |
{ |
|
1934 |
|
|
1935 |
case 1: |
|
1936 |
|
|
1937 |
$class = 'class="sixteen columns serv-list"'; |
|
1938 |
|
|
1939 |
break; |
|
1940 |
|
|
1941 |
case 2: |
|
1942 |
|
|
1943 |
$class = 'class="eight columns serv-list"'; |
|
1944 |
|
|
1945 |
break; |
|
1946 |
|
|
1947 |
case 3: |
|
1948 |
|
|
1949 |
$class = 'class="one-third column serv-list"'; |
|
1950 |
|
|
1951 |
break; |
|
1952 |
|
|
1953 |
case 4: |
|
1954 |
|
|
1955 |
$class = 'class="four columns serv-list"'; |
|
1956 |
|
|
1957 |
break; |
|
1958 |
|
|
1959 |
default: |
|
1960 |
|
|
1961 |
$class = 'class="one-third column serv-list"'; |
|
1962 |
|
|
1963 |
break; |
|
1964 |
|
|
1965 |
} |
|
1966 |
|
|
1967 |
$text = esc_attr($text); |
|
1968 |
|
|
1969 |
$image = esc_attr($image); |
|
1970 |
|
|
1971 |
$title = esc_attr($title); |
|
1972 |
|
|
1973 |
$output = '<div ' . $class . '>'; |
|
1974 |
|
|
1975 |
if($title != '') |
|
1976 |
|
|
1977 |
$output .= '<h4>' . $title . '</h4>'; |
|
1978 |
|
|
1979 |
if($image != '') |
|
1980 |
|
|
1981 |
$output .= '<img src="' . $image . '" />'; |
|
1982 |
|
|
1983 |
if($text != '') |
|
1984 |
|
|
1985 |
$output .= '<p>' . $text . '</p>'; |
|
1986 |
|
|
1987 |
$output .= '</div>'; |
|
1988 |
|
|
1989 |
return $output; |
|
1990 |
|
|
1991 |
} |
|
1992 |
|
|
1993 |
?> |