Last active
June 7, 2016 04:26
-
-
Save halgatewood/1dc6531b2f1a9baa22f626cb0bf0ef29 to your computer and use it in GitHub Desktop.
Extracting Weather Data from Awesome Weather Pro
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| include( dirname(__FILE__) . "/../../plugins/awesome-weather-pro/pro/openweathermaps/funcs.php"); | |
| $weather_settings = new stdclass; | |
| $weather_settings->location = 'Edmond, OK'; | |
| $weather_settings->owm_city_id = 4535740; | |
| $weather_settings->transient_name = 'awe-edmond-weather-c'; | |
| $weather_settings->forecast_days = 5; | |
| $weather_settings->units_query = 'metric'; | |
| $weather = awesome_weather_get_weather_data_openweathermaps( $weather_settings ); | |
| if( $weather['current']['temp'] > 10 ) | |
| { | |
| echo "Above 10"; | |
| } | |
| else | |
| { | |
| echo "Below 10"; | |
| } | |
| ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment