Plugin Directory

Changeset 1818557


Ignore:
Timestamp:
02/08/2018 09:29:55 PM (8 years ago)
Author:
laubsterboy
Message:

Fixed an error when fetching data from alerts.weather.gov

Location:
national-weather-service-alerts/trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • national-weather-service-alerts/trunk/classes/class-nws-alerts.php

    r1451950 r1818557  
    210210                $response_headers = wp_remote_retrieve_headers($response);
    211211
    212                 // Verify that the response code comes back as 'OK' and that the content type is rss+xml
    213                 if (wp_remote_retrieve_response_code($response) == 200 && $response_headers['content-type'] == 'application/rss+xml') {
     212                // Verify that the response code comes back as 'OK' and that the content type is rss+xml or atom+xml
     213                if (wp_remote_retrieve_response_code($response) == 200 && ($response_headers['content-type'] == 'application/rss+xml' || $response_headers['content-type'] == 'application/atom+xml')) {
    214214                        $response_body = wp_remote_retrieve_body($response);
    215215
  • national-weather-service-alerts/trunk/nws-alerts-globals.php

    r1573703 r1818557  
    77
    88// NWS Alerts Version Information
    9 define('NWS_ALERTS_VERSION', '1.3.4');
     9define('NWS_ALERTS_VERSION', '1.3.5');
    1010define('NWS_ALERTS_MIN_WP_VERSION', '3.9');
    1111define('NWS_ALERTS_MIN_PHP_VERSION', '5.3');
  • national-weather-service-alerts/trunk/nws-alerts.php

    r1573703 r1818557  
    44* Plugin URI: https://github.com/laubsterboy/nws-alerts
    55* Description: Easily add official National Weather Service alerts to your website.
    6 * Version: 1.3.4
     6* Version: 1.3.5
    77* Author: John Russell
    88* Author URI: http://www.laubsterboy.com
  • national-weather-service-alerts/trunk/readme.txt

    r1573703 r1818557  
    44Tags: National Weather Service, NWS, Storm Prediction Center, SPC, Alert, Weather, Storm, Severe, Tornado, Thunder, Flood
    55Requires at least: 3.1
    6 Tested up to: 4.7
    7 Stable tag: 1.3.4
     6Tested up to: 4.9
     7Stable tag: 1.3.5
    88License: GPLv2 or later
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    108108== Changelog ==
    109109
     110= 1.3.5 =
     111* Fixed: The error retrieving weather alert data. This was caused by the feed mime type changing from rss+xml to atom+xml.
     112
    110113= 1.3.4 =
    111114* Fixed: The 1.3.3 updates included some code incompatible with PHP <5.5 and this update fixes that.
     
    161164== Upgrade Notice ==
    162165
     166= 1.3.5 =
     167* Urgent: This update fixes the 'There was an error retrieving the National Weather Service alert data.' error.
     168
    163169= 1.3.4 =
    164170* Urgent: This update fixes the PHP parse error on web servers running PHP 5.4 or less. Those with PHP 5.5 or greater will see no difference.
Note: See TracChangeset for help on using the changeset viewer.