Changeset 523366
- Timestamp:
- 03/25/2012 10:02:07 AM (14 years ago)
- Location:
- suntimes-widget
- Files:
-
- 4 added
- 2 edited
-
tags/0.9.2 (added)
-
tags/0.9.2/readme.txt (added)
-
tags/0.9.2/screenshot-1.png (added)
-
tags/0.9.2/suntimes-widget.php (added)
-
trunk/readme.txt (modified) (3 diffs)
-
trunk/suntimes-widget.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
suntimes-widget/trunk/readme.txt
r522740 r523366 5 5 Requires at least: 3.0 6 6 Tested up to: 3.3.1 7 Stable tag: 0.9. 17 Stable tag: 0.9.2 8 8 9 9 Displays sunrise and sunset times in a widget … … 39 39 40 40 == Changelog == 41 = 0.9.2 = 42 DST related bugfix 41 43 42 44 = 0.9.1 = … … 48 50 == Upgrade Notice == 49 51 52 = 0.9.2 = 53 Daylight Savings Bugfix 54 50 55 = 0.9.1 = 51 StupidBugfix, sorry56 Bugfix, sorry 52 57 53 58 = 0.9 = -
suntimes-widget/trunk/suntimes-widget.php
r522740 r523366 5 5 Description: Widget to display sunrise and sunset times. 6 6 Author: Jon Lynch 7 Version: 0.9. 17 Version: 0.9.2 8 8 Author URI: http://www.jonlynch.co.uk 9 9 */ … … 78 78 // set suntimes to be the array stored in the transients table if it exists 79 79 if ( false === ( $suntimes = get_transient( 'suntime' ) ) ) { 80 $suntimes = jl_suntimes_generate_data($lat, $lon, $day, $month, $timezone , $dst);80 $suntimes = jl_suntimes_generate_data($lat, $lon, $day, $month, $timezone); 81 81 } 82 82 //if it is not up to date regenerate 83 83 if ($suntimes['day'].$suntimes['month'] != $day.$month ) { 84 $suntimes = jl_suntimes_generate_data($lat, $lon, $day, $month, $timezone , $dst);84 $suntimes = jl_suntimes_generate_data($lat, $lon, $day, $month, $timezone); 85 85 } 86 86 // if we have the suntimes then we add the table contained in a div … … 91 91 } 92 92 93 function jl_suntimes_generate_data($lat, $lon, $day, $month, $timezone , $dst) {94 $dst = date('I'); //finds out if we are in dst 1 if dst 0 otherwise95 $url = "http://www.earthtools.org/sun/$lat/$lon/$day/$month/$timezone/ $dst" ; //fetches an xml page for west cumbria93 function jl_suntimes_generate_data($lat, $lon, $day, $month, $timezone) { 94 //$dst = date('I'); //finds out if we are in dst 1 if dst 0 otherwise 95 $url = "http://www.earthtools.org/sun/$lat/$lon/$day/$month/$timezone/0" ; //fetches an xml page for west cumbria 96 96 $request = new WP_Http; 97 97 $result = $request->request($url);
Note: See TracChangeset
for help on using the changeset viewer.