WordPress.org

Plugin Directory


Ignore:
Timestamp:
03/31/17 08:26:11 (2 months ago)
Author:
bastho
Message:

Version 4.5.1

  • Fix events dated at Epok when GMT is not well parsed
  • Move supported tiles to https (OSM, Humanitarian, OSM-fr)
File:
1 edited

Legend:

Unmodified
Added
Removed
  • event-post/tags/4.5/eventpost.php

    r1623022 r1626410  
    44  Plugin URI: http://event-post.com 
    55  Description: Add calendar and/or geolocation metadata on posts. For a better experience, we recommand to use it with <a href="https://wordpress.org/plugins/shortcode-ui/" target="_blank">Shortcake (shortcode UI)</a> installed. 
    6   Version: 4.5 
     6  Version: 4.5.1 
    77  Author: N.O.U.S. Open Useful and Simple 
    88  Contributors: bastho,ecolosites 
     
    645645                $address = urlencode($post->address); 
    646646                $url = urlencode($post->guid); 
    647                 $mt = strtotime($codegmt . ' Hours', $event->time_start); 
    648                 $d_s = date("Ymd", $mt) . 'T' . date("His", $mt); 
    649                 $mte = strtotime($codegmt . ' Hours', $event->time_end); 
    650                 $d_e = date("Ymd", $mte) . 'T' . date("His", $mte); 
     647                $allday = ($post->time_start && $post->time_end && date('H:i:s', $post->time_start) == '00:00:00' && date('H:i:s', $post->time_end) == '00:00:00'); 
     648                $d_s = date("Ymd", $event->time_start) . ($allday ? ''  : 'T' . date("His", $event->time_start)); 
     649                $d_e = date("Ymd", $event->time_end) . ($allday ? ''  : 'T' . date("His", $event->time_end)); 
    651650                $uid = $post->ID . '-' . $post->blog_id; 
    652651 
     
    22392238            $separator = "\n"; 
    22402239 
    2241         header("content-type:text/calendar"); 
     2240        header("content-type:text/x-icalendar"); 
    22422241        header("Pragma: public"); 
    22432242        header("Expires: 0"); 
Note: See TracChangeset for help on using the changeset viewer.