Changeset 1846121
- Timestamp:
- 03/24/2018 09:44:43 AM (8 years ago)
- Location:
- ab-simple-weather
- Files:
-
- 17 added
- 2 edited
-
tags/1.2 (added)
-
tags/1.2/Readme.txt (added)
-
tags/1.2/ab-simple-weather.php (added)
-
tags/1.2/assets (added)
-
tags/1.2/assets/css (added)
-
tags/1.2/assets/css/abWeather.css (added)
-
tags/1.2/assets/css/fonts (added)
-
tags/1.2/assets/css/fonts/artill_clean_icons-webfont (1).eot (added)
-
tags/1.2/assets/css/fonts/artill_clean_icons-webfont.eot (added)
-
tags/1.2/assets/css/fonts/artill_clean_icons-webfont.svg (added)
-
tags/1.2/assets/css/fonts/artill_clean_icons-webfont.ttf (added)
-
tags/1.2/assets/css/fonts/artill_clean_icons-webfont.woff (added)
-
tags/1.2/assets/images (added)
-
tags/1.2/assets/images/icon.png (added)
-
tags/1.2/assets/js (added)
-
tags/1.2/assets/js/abTiny.js (added)
-
tags/1.2/assets/js/jquery.simpleWeather.min.js (added)
-
trunk/Readme.txt (modified) (2 diffs)
-
trunk/ab-simple-weather.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
ab-simple-weather/trunk/Readme.txt
r1844696 r1846121 2 2 Contributors: abooze 3 3 Donate link: http://aboobacker.com/ 4 Tags: 1. 14 Tags: 1.2 5 5 Requires at least: 4.0 6 Tested up to: 4.9. 16 Tested up to: 4.9.4 7 7 Requires PHP: 5.4 8 Stable tag: 1. 18 Stable tag: 1.2 9 9 License: GPLv2 or later 10 10 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 58 58 * Initial release. 59 59 60 = 1.1 = 61 * Fixed a minor bug 62 63 = 1.2 = 64 * Fixed older PHP version compatibility 65 60 66 == Upgrade notice == 61 62 = 1.1 =63 Fixed a minor bug -
ab-simple-weather/trunk/ab-simple-weather.php
r1844696 r1846121 4 4 Description: A simple but powerful plugin to show current weather in your website 5 5 Author: Aboobacker P Ummer 6 Version: 1. 16 Version: 1.2 7 7 */ 8 8 register_activation_hook(__FILE__, 'absw_defaults_fn'); … … 43 43 add_filter("mce_external_plugins", "enqueue_abswTiny_script"); 44 44 add_action( 'wp_enqueue_scripts', 'absw_weather_assets' ); 45 function absw_weather_script() { ?> 45 function absw_weather_script() { 46 $options = get_option('absw_plugin_options'); ?> 46 47 <script type="text/javascript "> 47 48 //Docs at http://simpleweatherjs.com 48 49 jQuery(document).ready(function() { 49 50 jQuery.simpleWeather({ 50 location: '<?php echo get_option("absw_plugin_options")["weather_loc"];?>',51 location: '<?php echo $options["weather_loc"];?>', 51 52 woeid: '', 52 unit: '<?php echo $unit = get_option("absw_plugin_options")["absw_weather_unit"] == 'Celsius' ? 'c' : 'f'; ?>',53 unit: '<?php echo $unit = $options["absw_weather_unit"] == 'Celsius' ? 'c' : 'f'; ?>', 53 54 success: function(weather) { 54 html = '<<?php echo get_option("absw_plugin_options")["absw_element"];?> class="abWeatherDisplay">';55 <?php if ( isset( get_option("absw_plugin_options")["weather_icon"] ) && get_option('absw_plugin_options')['weather_icon'] != '' ) { ?>56 html += '<i class="absicoin_<?php echo get_option("absw_plugin_options")["absw_element"];?> icon-' + weather.code + '"></i> ';55 html = '<<?php echo $options["absw_element"];?> class="abWeatherDisplay">'; 56 <?php if ( isset($options["weather_icon"] ) && $options['weather_icon'] != '' ) { ?> 57 html += '<i class="absicoin_<?php echo $options["absw_element"];?> icon-' + weather.code + '"></i> '; 57 58 <?php } ?> 58 59 html += weather.temp + '°' + weather.units.temp; 59 html += '</<?php echo get_option("absw_plugin_options")["absw_element"];?>>';60 html += '</<?php echo $options["absw_element"];?>>'; 60 61 html += '<ul>'; 61 <?php if ( isset( get_option("absw_plugin_options")["city"] ) && get_option("absw_plugin_options")["city"] != '' ) { ?>62 <?php if ( isset($options["city"] ) && $options["city"] != '' ) { ?> 62 63 html += '<li>' + weather.city + ', ' + weather.region; 63 64 <?php } ?> 64 <?php if ( isset( get_option("absw_plugin_options")["country"] ) && get_option("absw_plugin_options")["country"] != '' ) { ?>65 <?php if ( isset($options["country"] ) && $options["country"] != '' ) { ?> 65 66 html += ', ' + weather.country + ' </li>'; 66 67 <?php } else { ?> 67 68 html += ' </li>'; 68 69 <?php } ?> 69 <?php if ( isset( get_option("absw_plugin_options")["condition"] ) && get_option("absw_plugin_options")["condition"] != '' ) { ?>70 <?php if ( isset($options["condition"] ) && $options["condition"] != '' ) { ?> 70 71 html += '<li class="currently">' + weather.currently + '</li>'; 71 72 <?php } ?> 72 <?php if ( isset( get_option("absw_plugin_options")["humidity"] ) && get_option("absw_plugin_options")["humidity"] != '' ) { ?>73 <?php if ( isset($options["humidity"] ) && $options["humidity"] != '' ) { ?> 73 74 html += '<li class="humidity">Humidity ' + weather.humidity + '%</li>'; 74 75 <?php } ?> 75 <?php if ( isset( get_option("absw_plugin_options")["wind"] ) && get_option("absw_plugin_options")["wind"] != '' ) { ?>76 <?php if ( isset($options["wind"] ) && $options["wind"] != '' ) { ?> 76 77 html += '<li>' + weather.wind.direction + ' ' + weather.wind.speed + ' ' + weather.units.speed + '</li>'; 77 78 <?php } ?>
Note: See TracChangeset
for help on using the changeset viewer.