PluginProbe
wp-forecast / 3..8
wp-forecast v3..8
10.0 trunk 1.4 1.6 1.7 1.8 1.9 2.0 2.1 2.2 2.3 2.4 2.5 2.6 2.7 2.8 2.9 3..5 3..8 3.0 3.1 3.2 3.3 3.4 3.6 All 86 releases
wp-forecast / shortcodes.php

shortcodes.php in wp-forecast 3..8, at shortcodes.php

49 lines 1.2 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * @author Hans Matzen
4 * @copyright 2009
5 * @since 2.4
6 * @description wp-forecast using wordpress shortcode for more features
7 * @Docs http://codex.wordpress.org/Shortcode_API
8 */
9
10 if (!function_exists('wpforecast'))
11 {
12 function wpforecast($atts)
13 {
14 // parameter einlesen
15 if ( is_array($atts) )
16 extract($atts);
17
18 if ($id == '')
19 $id='A';
20
21 // iframe tag zusammen bauen
22 $res='<iframe class="wpf-iframe" src="'.get_settings('siteurl').
23 '/wp-content/plugins/wp-forecast/wp-forecast-show.php?wpfcid='.
24 $id.'&amp;header=1';
25
26 // falls eine sprache angegeben wurde haengen wir sie hinten dran
27 if ($lang != '')
28 $res .= '&amp;lang='.$lang;
29
30 $res .= '" ';
31
32 // falls eine breite angegeben wurde haengen wir sie hinten dran
33 if ($width != '')
34 $res .= "width='$width' ";
35
36 // falls eine sprache angegeben wurde haengen wir sie hinten dran
37 if ($height != '')
38 $res .= "height='$height' ";
39
40 $res .='>'.__("wp-forecast shortcode: This browser does not support iframes.","wp-forecast_".$lang).'</iframe>';
41
42 return $res;
43 }
44 }
45 // shortcode bei wp anmelden
46 if (function_exists('add_shortcode'))
47 add_shortcode('wpforecast','wpforecast');
48
49 ?>