WordPress.org

Plugin Directory

Changeset 1820130


Ignore:
Timestamp:
02/11/18 19:09:13 (7 days ago)
Author:
netweblogic
Message:

updating to dev version 5.8.2.0

Location:
events-manager/trunk
Files:
5 added
17 edited

Legend:

Unmodified
Added
Removed
  • events-manager/trunk/admin/em-ms-options.php

    r1720802 r1820130  
    66        <h2><?php esc_html_e('Update Network','events-manager'); ?></h2> 
    77        <?php 
    8         if( !empty($_REQUEST['action']) && $_REQUEST['action'] == 'upgrade' && check_admin_referer('em_ms_ugrade_'.get_current_user_id()) ){ 
     8        $site_updates = EM_Options::site_get('updates'); 
     9        if( !empty($_REQUEST['action']) && $_REQUEST['action'] == 'upgrade_network' && check_admin_referer('em_ms_upgrade') ){ 
    910            global $current_site,$wpdb; 
    1011            $blog_ids = $wpdb->get_col('SELECT blog_id FROM '.$wpdb->blogs.' WHERE site_id='.$current_site->id); 
     12            echo '<ul>'; 
    1113            foreach($blog_ids as $blog_id){ 
    1214                $plugin_basename = plugin_basename(dirname(dirname(__FILE__)).'/events-manager.php'); 
     
    1618                        require_once( dirname(__FILE__).'/../em-install.php'); 
    1719                        em_install(); 
    18                         echo "<p>Upgraded - ".get_bloginfo('blogname')."</p>"; 
     20                        echo "<li>".sprintf(_x('Updated %s.', 'Multisite Blog Update','events-manager'), get_bloginfo('blogname'))."</li>"; 
    1921                        restore_current_blog(); 
    2022                    }else{ 
    21                         echo "<p>&quot;".get_blog_option($blog_id, 'blogname')."&quot; is up to date.</p>"; 
     23                        echo "<li>".sprintf(_x('%s is up to date.', 'Multisite Blog Update','events-manager'), get_blog_option($blog_id, 'blogname'))."</li>"; 
    2224                    } 
    2325                }else{ 
    24                     echo "<p>&quot;".get_blog_option($blog_id, 'blogname')."&quot; does not have Events Manager activated.</p>"; 
     26                    echo "<li>".sprintf(_x('%s does not have Events Manager activated.', 'Multisite Blog Update','events-manager'), get_blog_option($blog_id, 'blogname'))."</li>"; 
    2527                } 
    2628            } 
    27             echo "<p>Done Upgrading</p>"; 
     29            echo '</ul>'; 
     30            echo "<p>".esc_html__('Update process has finished.', 'events-manager')."</p>"; 
     31        }elseif( !empty($_REQUEST['action']) && !empty($site_updates[$_REQUEST['action']]) ){ 
     32            do_action('em_admin_update_ms_'.$_REQUEST['action']); 
    2833        }else{ 
    2934            ?> 
    3035            <form action="" method="post"> 
    3136                <p><?php esc_html_e('To update your network blogs with the latest Events Manager automatically, click the update button below.','events-manager'); ?></p> 
    32                 <input type="hidden" name="_wpnonce" value="<?php echo wp_create_nonce('em_ms_ugrade_'.get_current_user_id()); ?>" /> 
    33                 <input type="hidden" name="action" value="upgrade" /> 
    34                 <input type="submit" value="<?php esc_attr_e('Update','events-manager'); ?>" /> 
     37                <input type="hidden" name="_wpnonce" value="<?php echo wp_create_nonce('em_ms_upgrade'); ?>" /> 
     38                <input type="hidden" name="action" value="upgrade_network" /> 
     39                <input type="submit" value="<?php esc_attr_e('Update Network','events-manager'); ?>" class="button-primary" /> 
    3540            </form> 
    3641            <?php 
     42            //extra upgrade stuff 
     43            foreach( $site_updates as $update => $update_data ){ 
     44                do_action('em_admin_update_ms_settings_'.$update, $update_data); 
     45            } 
    3746        } 
    3847        ?> 
  • events-manager/trunk/admin/em-options.php

    r1786433 r1820130  
    273273        wp_redirect(em_wp_get_referer()); 
    274274        exit(); 
     275    } 
     276     
     277    //update scripts that may need to run 
     278    $blog_updates = is_multisite() ? array_merge(EM_Options::get('updates'), EM_Options::site_get('updates')) : EM_Options::get('updates'); 
     279    foreach( $blog_updates as $update => $update_data ){ 
     280        $filename = EM_DIR.'/admin/settings/updates/'.$update.'.php'; 
     281        if( file_exists($filename) ) include_once($filename); 
     282        do_action('em_admin_update_'.$update, $update_data); 
    275283    } 
    276284     
     
    363371    if( !empty($_REQUEST['action']) && $_REQUEST['action'] == 'reset' ){ 
    364372        em_admin_options_reset_page(); 
     373        return; 
     374    } 
     375    if( !empty($_REQUEST['action']) && $_REQUEST['action'] == 'update' && !empty($_REQUEST['update_action']) ){ 
     376        do_action('em_admin_update_settings_confirm_'.$_REQUEST['update_action']); 
    365377        return; 
    366378    } 
     
    692704    } 
    693705    $reset_timezone_nonce = wp_create_nonce('reset_timezones'); 
     706    $options_data = get_option('dbem_data');   
    694707    ?> 
    695708    <div  class="postbox" id="em-opt-admin-tools" > 
    696709        <div class="handlediv" title="<?php __('Click to toggle', 'events-manager'); ?>"><br /></div><h3><span><?php _e ( 'Admin Tools', 'events-manager'); ?> (<?php _e ( 'Advanced', 'events-manager'); ?>)</span></h3> 
    697710        <div class="inside"> 
     711             
     712            <?php 
     713            //update scripts that may need to run 
     714            $blog_updates = is_multisite() ? array_merge(EM_Options::get('updates'), EM_Options::site_get('updates')) : EM_Options::get('updates'); 
     715            foreach( $blog_updates as $update => $update_data ){ 
     716                do_action('em_admin_update_settings_'.$update, $update_data); 
     717            } 
     718            ?> 
    698719             
    699720            <table class="form-table"> 
  • events-manager/trunk/classes/em-categories.php

    r1765726 r1820130  
    88    protected $terms_name = 'categories'; 
    99    protected $term_class = 'EM_Category'; 
     10    protected $ajax_search_action = 'search_cats'; 
    1011     
    1112    /** 
  • events-manager/trunk/classes/em-category.php

    r1720802 r1820130  
    1313     * @return EM_Taxonomy 
    1414     */ 
    15     public static function get( $id = false, $class_name = 'EM_Category' ){ 
     15    public static function get( $id, $class_name = 'EM_Category' ){ 
    1616        return parent::get($id, $class_name); 
    1717    } 
     
    2828 * @uses EM_Category::get() 
    2929 */ 
    30 function em_get_category( $id = false ) { 
     30function em_get_category( $id ) { 
    3131    return EM_Category::get($id); 
    3232} 
  • events-manager/trunk/classes/em-datetime.php

    r1787564 r1820130  
    1313     * @var string 
    1414     */ 
    15     public $timezone_name = false; 
     15    protected $timezone_name = false; 
     16    /** 
     17     * Shortcut representing the offset of time in the timezone, if it's a UTC manual offset, false if not. 
     18     * @var int 
     19     */ 
     20    protected $timezone_manual_offset = false; 
    1621    /** 
    1722     * Flag for validation purposes, so we can still have a real EM_DateTime and extract dates but know if the intended datetime failed validation. 
     
    4651        //save timezone name for use in getTimezone() 
    4752        $this->timezone_name = $timezone->getName(); 
    48     } 
    49      
    50     /** 
    51      * Extends the DateTime::createFromFormat() function by setting the timezone to the default blog timezone if none is provided. 
    52      * @param string $format 
    53      * @param string $time 
    54      * @param string|EM_DateTimeZone $timezone 
    55      * @return boolean|EM_DateTime 
    56      */ 
    57     public static function createFromFormat( $format, $time, $timezone = null ){ 
    58         $timezone = EM_DateTimeZone::create($timezone); 
    59         $DateTime = parent::createFromFormat($format, $time, $timezone); 
    60         if( $DateTime === false ) return false; 
    61         return new EM_DateTime($DateTime->format('Y-m-d H:i:s'), $timezone); 
     53        $this->timezone_manual_offset = $timezone->manual_offset; 
     54        //deal with manual UTC offsets 
     55        $this->handleOffsets($timezone); 
     56    } 
     57     
     58    protected function handleOffsets(){ 
     59        //handle manual UTC offsets 
     60        if( $this->timezone_manual_offset !== false ){ 
     61            //the actual time here needs to be in UTC time because offsets are applied to UTC on any output functions 
     62            $this->setTimestamp( $this->getTimestamp() - $this->timezone_manual_offset ); 
     63        } 
    6264    } 
    6365     
     
    6971        if( !$this->valid && ($format == 'Y-m-d' || $format == em_get_date_format())) return ''; 
    7072        //if we deal with offsets, then we offset UTC time by that much 
    71         if( $this->getTimezone()->offset !== false ){ 
    72             return date($format, $this->getTimestamp() + $this->getTimezone()->offset ); 
     73        if( $this->timezone_manual_offset !== false ){ 
     74            return date($format, $this->getTimestamp() + $this->timezone_manual_offset ); 
    7375        } 
    7476        return parent::format($format); 
     
    121123    } 
    122124     
    123     /** 
    124      * Extends DateTime function to allow string representation of argument passed to create a new DateInterval object. 
    125      * @see DateTime::add() 
    126      * @param string|DateInterval 
    127      * @return EM_DateTime Returns object for chaining. 
    128      */ 
    129     public function add( $DateInterval ){ 
    130         if( is_object($DateInterval) ){ 
    131             return parent::add($DateInterval); 
    132         }else{ 
    133             return parent::add( new DateInterval($DateInterval) ); 
    134         } 
    135     } 
    136      
    137     /** 
    138      * Extends DateTime function to allow string representation of argument passed to create a new DateInterval object. 
    139      * @see DateTime::sub() 
    140      * @param string|DateInterval 
    141      * @return EM_DateTime 
    142      */ 
    143     public function sub( $DateInterval ){ 
    144         if( is_object($DateInterval) ){ 
    145             return parent::sub($DateInterval); 
    146         }else{ 
    147             return parent::sub( new DateInterval($DateInterval) ); 
    148         } 
    149     } 
    150      
    151     /** 
    152      * Easy chainable cloning function, useful for situations where you may want to manipulate the current date, 
    153      * such as adding a month and getting the DATETIME string without changing the original value of this object. 
    154      * @return EM_DateTime 
    155      */ 
    156     public function copy(){ 
    157         return clone $this; 
    158     } 
    159      
    160     /** 
    161      * Gets a timestamp with an offset, which will represent the local time equivalent in UTC time (so a local time would be produced if supplied to date()) 
    162      */ 
    163     public function getTimestampWithOffset(){ 
    164         return $this->getOffset() + $this->getTimestamp(); 
    165     } 
    166      
    167     /** 
    168      * Extends DateTime::getOffset() by checking for timezones with manual offsets, such as UTC+3.5 
    169      * @see DateTime::getOffset() 
    170      * @return int 
    171      */ 
    172     public function getOffset(){ 
    173         if( $this->getTimezone()->offset !== false ){ 
    174             return $this->getTimezone()->offset; 
    175         } 
    176         return parent::getOffset(); 
    177     } 
    178      
    179     /** 
    180      * Returns an EM_DateTimeZone object instead of the default DateTimeZone object. 
    181      * @see DateTime::getTimezone() 
    182      * @return EM_DateTimeZone 
    183      */ 
    184     public function getTimezone(){ 
    185         return new EM_DateTimeZone($this->timezone_name); 
    186     } 
    187      
    188     /** 
    189      * Returns a MySQL TIME formatted string, with the option of providing the UTC equivalent. 
    190      * @param bool $utc If set to true a UTC relative time will be provided. 
    191      * @return string 
    192      */ 
    193     public function getTime( $utc = false ){ 
    194         if( $utc ){ 
    195             $current_timezone = $this->getTimezone()->getName(); 
    196             $this->setTimezone('UTC'); 
    197         } 
    198         $return = $this->format('H:i:s'); 
    199         if( $utc ) $this->setTimezone($current_timezone); 
    200         return $return; 
    201     } 
    202      
    203     /** 
    204      * Returns a MySQL DATE formatted string. 
    205      * @return string 
    206      */ 
    207     public function getDate( $utc = false ){ 
    208         return $this->format('Y-m-d'); 
    209     } 
    210      
    211     /** 
    212      * Returns a MySQL DATETIME formatted string, with the option of providing the UTC equivalent. 
    213      * @param bool $utc If set to true a UTC relative time will be provided. 
    214      * @return string 
    215      */ 
    216     public function getDateTime( $utc = false ){ 
    217         if( $utc ){ 
    218             $current_timezone = $this->getTimezone()->getName(); 
    219             $this->setTimezone('UTC'); 
    220         } 
    221         $return = $this->format('Y-m-d H:i:s'); 
    222         if( $utc ) $this->setTimezone($current_timezone); 
    223         return $return; 
     125    public function setTimestamp( $timestamp ){ 
     126        if( function_exists('date_timestamp_set') ){ 
     127            return parent::setTimestamp( $timestamp ); 
     128        }else{ 
     129            //PHP < 5.3 fallback :/ setting modify() with a timestamp produces unpredictable results, so we play more tricks... 
     130            $date = explode(',', date('Y,n,j,G,i,s', $timestamp)); 
     131            parent::setDate( (int) $date[0], (int) $date[1], (int) $date[2]); 
     132            parent::setTime( (int) $date[3], (int) $date[4], (int) $date[5]); 
     133            return $this; 
     134        } 
    224135    } 
    225136     
     
    234145        parent::setTimezone($timezone); 
    235146        $this->timezone_name = $timezone->getName(); 
    236         return $this; 
     147        $this->timezone_manual_offset = $timezone->manual_offset; 
     148        return $this; 
     149    } 
     150     
     151    public function setTime( $hour, $minute, $second = NULL, $microseconds = NULL ){ 
     152        parent::setTime( $hour, $minute, $second ); 
     153        $this->handleOffsets(); 
     154        return $this; 
     155    } 
     156     
     157    public function setDate( $year, $month, $day ){ 
     158        if( $this->timezone_manual_offset !== false ){ 
     159            //we run into issues if we're dealing with timezones on the fringe of date changes e.g. 2018-01-01 01:00:00 UTC+2 
     160            $DateTime = new DateTime( $this->getDateTime(), new DateTimeZone('UTC')); 
     161            $DateTime->setDate( $year, $month, $day ); 
     162            //create a new timestamp based on UTC DateTime and offset it to current timezone 
     163            if( function_exists('date_timestamp_get') ){ 
     164                $timestamp = $DateTime->getTimestamp(); 
     165            }else{ 
     166                //PHP < 5.3 fallback :/ 
     167                $timestamp = $DateTime->format('U'); 
     168            } 
     169            $timestamp -= $this->timezone_manual_offset; 
     170            $this->setTimestamp( $timestamp ); 
     171        }else{ 
     172            parent::setDate( $year, $month, $day ); 
     173        } 
     174        return $this; 
     175    } 
     176     
     177    public function setISODate( $year, $week, $day = NULL ){ 
     178        parent::setISODate( $year, $week, $day ); 
     179        return $this; 
     180    } 
     181     
     182    public function modify( $modify ){ 
     183        if( function_exists('date_add') ){ 
     184            parent::modify($modify); 
     185        }else{ 
     186            //PHP < 5.3 fallback :/ wierd stuff happens when using the DateTime modify function 
     187            $this->setTimestamp( strtotime($modify, $this->getTimestamp()) ); 
     188        } 
     189        $this->handleOffsets(); 
     190        return $this; 
     191    } 
     192     
     193    /** 
     194     * Extends DateTime function to allow string representation of argument passed to create a new DateInterval object. 
     195     * @see DateTime::add() 
     196     * @param string|DateInterval 
     197     * @return EM_DateTime Returns object for chaining. 
     198     */ 
     199    public function add( $DateInterval ){ 
     200        if( function_exists('date_add') ){ 
     201            if( is_object($DateInterval) ){ 
     202                return parent::add($DateInterval); 
     203            }else{ 
     204                return parent::add( new DateInterval($DateInterval) ); 
     205            } 
     206        }else{ 
     207            //PHP < 5.3 fallback :/ 
     208            $strtotime = $this->dateinterval_fallback($DateInterval, 'add'); 
     209            $this->setTimestamp( strtotime($strtotime, $this->getTimestamp()) ); 
     210            return $this; 
     211        } 
     212    } 
     213     
     214    /** 
     215     * Extends DateTime function to allow string representation of argument passed to create a new DateInterval object. 
     216     * @see DateTime::sub() 
     217     * @param string|DateInterval 
     218     * @return EM_DateTime 
     219     */ 
     220    public function sub( $DateInterval ){ 
     221        if( function_exists('date_sub') ){ 
     222            if( is_object($DateInterval) ){ 
     223                return parent::sub($DateInterval); 
     224            }else{ 
     225                return parent::sub( new DateInterval($DateInterval) ); 
     226            } 
     227        }else{ 
     228            //PHP < 5.3 fallback :/ 
     229            $strtotime = $this->dateinterval_fallback($DateInterval, 'subtract'); 
     230            $this->setTimestamp( strtotime($strtotime, $this->getTimestamp()) ); 
     231            return $this; 
     232        } 
     233    } 
     234     
     235    /** 
     236     * Fallback function for PHP versions prior to 5.3, as sub() and add() methods aren't available and therefore we need to generate a valid string we can pass onto modify() 
     237     * @param unknown $dateinteval_string 
     238     * @param unknown $add_or_subtract 
     239     * @return string 
     240     */ 
     241    private function dateinterval_fallback( $dateinteval_string, $add_or_subtract ){ 
     242        $date_time_split = explode('T', $dateinteval_string); 
     243        $matches = $modify_string_array = array(); 
     244        //first parse date then time if available 
     245        preg_match_all('/([0-9]+)([YMDW])/', preg_replace('/^P/', '', $date_time_split[0]), $matches['date']); 
     246        if( !empty($date_time_split[1]) ){ 
     247            preg_match_all('/([0-9]+)([HMS])/', $date_time_split[1], $matches['time']); 
     248        } 
     249        //convert DateInterval into a strtotime() valid string for use in $this->modify(); 
     250        $modify_conversion = array('Y'=>'years', 'M'=>'months', 'D'=>'days', 'W'=>'weeks', 'H'=>'hours', 'S'=>'seconds'); 
     251        foreach( $matches as $match_type => $match ){ 
     252            foreach( $match[1] as $k => $v ){ 
     253                if( $match[2][$k] == 'M' ){ 
     254                    $modify_string_array[] = $match_type == 'time' ? $v . ' minutes': $v . ' months'; 
     255                }else{ 
     256                    $modify_string_array[] = $v . ' '. $modify_conversion[$match[2][$k]]; 
     257                } 
     258            } 
     259        } 
     260        $modifier = $add_or_subtract == 'subtract' ? '-':'+'; 
     261        return $modifier . implode(' '.$modifier, $modify_string_array); 
     262    } 
     263     
     264    /** 
     265     * Easy chainable cloning function, useful for situations where you may want to manipulate the current date, 
     266     * such as adding a month and getting the DATETIME string without changing the original value of this object. 
     267     * @return EM_DateTime 
     268     */ 
     269    public function copy(){ 
     270        return clone $this; 
     271    } 
     272     
     273    public function getTimestamp(){ 
     274        if( function_exists('date_timestamp_get') ){ 
     275            return parent::getTimestamp(); 
     276        }else{ 
     277            //PHP < 5.3 fallback :/ 
     278            $strtotime = parent::format('Y-m-d H:i:s'); 
     279            $timestamp = strtotime($strtotime); 
     280            return $timestamp; 
     281        } 
     282    } 
     283     
     284    /** 
     285     * Gets a timestamp with an offset, which will represent the local time equivalent in UTC time (so a local time would be produced if supplied to date()) 
     286     */ 
     287    public function getTimestampWithOffset(){ 
     288        return $this->getOffset() + $this->getTimestamp(); 
     289    } 
     290     
     291    /** 
     292     * Extends DateTime::getOffset() by checking for timezones with manual offsets, such as UTC+3.5 
     293     * @see DateTime::getOffset() 
     294     * @return int 
     295     */ 
     296    public function getOffset(){ 
     297        if( $this->timezone_manual_offset !== false ){ 
     298            return $this->timezone_manual_offset; 
     299        } 
     300        return parent::getOffset(); 
     301    } 
     302     
     303    /** 
     304     * Returns an EM_DateTimeZone object instead of the default DateTimeZone object. 
     305     * @see DateTime::getTimezone() 
     306     * @return EM_DateTimeZone 
     307     */ 
     308    public function getTimezone(){ 
     309        return new EM_DateTimeZone($this->timezone_name); 
     310    } 
     311     
     312    /** 
     313     * Returns a MySQL TIME formatted string, with the option of providing the UTC equivalent. 
     314     * @param bool $utc If set to true a UTC relative time will be provided. 
     315     * @return string 
     316     */ 
     317    public function getTime( $utc = false ){ 
     318        if( $utc ){ 
     319            $current_timezone = $this->getTimezone()->getName(); 
     320            $this->setTimezone('UTC'); 
     321        } 
     322        $return = $this->format('H:i:s'); 
     323        if( $utc ) $this->setTimezone($current_timezone); 
     324        return $return; 
     325    } 
     326     
     327    /** 
     328     * Returns a MySQL DATE formatted string. 
     329     * @return string 
     330     */ 
     331    public function getDate( $utc = false ){ 
     332        return $this->format('Y-m-d'); 
     333    } 
     334     
     335    /** 
     336     * Returns a MySQL DATETIME formatted string, with the option of providing the UTC equivalent. 
     337     * @param bool $utc If set to true a UTC relative time will be provided. 
     338     * @return string 
     339     */ 
     340    public function getDateTime( $utc = false ){ 
     341        if( $utc ){ 
     342            $current_timezone = $this->getTimezone()->getName(); 
     343            $this->setTimezone('UTC'); 
     344        } 
     345        $return = $this->format('Y-m-d H:i:s'); 
     346        if( $utc ) $this->setTimezone($current_timezone); 
     347        return $return; 
     348    } 
     349     
     350    /* PHP 5.3+ functions that are not used and should not be used until 5.3 is a minimum requirement 
     351     
     352    /** 
     353     * NOT TO BE USED until PHP 5.3 is a minimum requirement in WordPress 
     354     * Extends the DateTime::createFromFormat() function by setting the timezone to the default blog timezone if none is provided. 
     355     * @param string $format 
     356     * @param string $time 
     357     * @param string|EM_DateTimeZone $timezone 
     358     * @return boolean|EM_DateTime 
     359     */ 
     360    public static function createFromFormat( $format, $time, $timezone = null ){ 
     361        $timezone = EM_DateTimeZone::create($timezone); 
     362        $DateTime = parent::createFromFormat($format, $time, $timezone); 
     363        if( $DateTime === false ) return false; 
     364        return new EM_DateTime($DateTime->format('Y-m-d H:i:s'), $timezone); 
     365    } 
     366     
     367    public function diff( $DateTime, $absolute = null ){ 
     368        if( function_exists('date_diff') ){ 
     369            return parent::diff( $DateTime, $absolute ); 
     370        }else{ 
     371            //PHP < 5.3 fallback :/ there is no fallback, really 
     372            return new stdClass(); 
     373        } 
    237374    } 
    238375} 
     
    244381class EM_DateTimeZone extends DateTimeZone { 
    245382     
    246     public $offset = false; 
     383    public $manual_offset = false; 
    247384     
    248385    public function __construct( $timezone ){ 
     
    251388            $timezone = preg_replace('/^UTC ?/', '', $timezone); 
    252389            if( is_numeric($timezone) ){ 
    253                 $this->offset = $timezone * 3600; 
    254                 $timezone = 'UTC'; 
     390                if( absint($timezone) == 0 ){ 
     391                    $timezone = 'UTC'; 
     392                }else{ 
     393                    $this->manual_offset = $timezone * 3600; 
     394                    $timezone = 'UTC'; 
     395                } 
    255396            } 
    256397        } 
     
    291432     */ 
    292433    public function getOffset( $datetime ){ 
    293         if( $this->offset !== false ){ 
    294             return $this->offset; 
    295         }elseif( get_class($datetime) == 'EM_DateTime' && $datetime->offset !== false ){ 
    296             return $datetime->offset; 
     434        if( $this->manual_offset !== false ){ 
     435            return $this->manual_offset; 
    297436        } 
    298437        return parent::getOffset( $datetime ); 
     
    304443     */ 
    305444    public function getName(){ 
    306         if( $this->offset !== false ){ 
    307             if( $this->offset > 0 ){ 
    308                 $return = 'UTC+'.$this->offset/3600; 
     445        if( $this->manual_offset !== false ){ 
     446            if( $this->manual_offset > 0 ){ 
     447                $return = 'UTC+'.$this->manual_offset/3600; 
    309448            }else{ 
    310                 $return = 'UTC'.$this->offset/3600; 
     449                $return = 'UTC'.$this->manual_offset/3600; 
    311450            } 
    312451            return $return; 
     
    321460     */ 
    322461    public function getTransitions( $timestamp_begin = null, $timestamp_end = null ){ 
    323         if( $this->offset !== false ){ 
     462        if( $this->manual_offset !== false ){ 
    324463            return array(); 
    325464        } 
  • events-manager/trunk/classes/em-event-post.php

    r1786433 r1820130  
    285285            }elseif ($scope == "month" || $scope == "next-month" ){ 
    286286                $EM_DateTime = new EM_DateTime(); //create default time in blog timezone 
    287                 if( $scope == 'next-month' ) $EM_DateTime->add( new DateInterval('P1M') ); 
     287                if( $scope == 'next-month' ) $EM_DateTime->add('P1M'); 
    288288                $start_month = $EM_DateTime->modify('first day of this month')->getDate(); 
    289289                $end_month = $EM_DateTime->modify('last day of this month')->getDate(); 
     
    298298                $months_to_add = $matches[1]; 
    299299                $start_month = $EM_DateTime->getDate(); 
    300                 $end_month = $EM_DateTime->add( new DateInterval('P'.$months_to_add.'M') )->format('Y-m-t'); 
     300                $end_month = $EM_DateTime->add('P'.$months_to_add.'M')->format('Y-m-t'); 
    301301                if( get_option('dbem_events_current_are_past') && $wp_query->query_vars['post_type'] != 'event-recurring' ){ 
    302302                    $query[] = array( 'key' => '_event_start_date', 'value' => array($start_month,$end_month), 'type' => 'DATE', 'compare' => 'BETWEEN'); 
  • events-manager/trunk/classes/em-event.php

    r1802844 r1820130  
    421421            } 
    422422        } 
     423        //anything else 
     424        else{ 
     425            $this->$prop = $val; 
     426        } 
    423427    } 
    424428     
     
    10311035            update_post_meta($this->post_id, '_event_end_local', $this->end()->getDateTime()); 
    10321036            //Deprecated, only for backwards compatibility, these meta fields will eventually be deleted! 
    1033             $admin_data = get_option('dbem_admin_data'); 
    1034             if( $admin_data['datetime_backcompat'] ){ 
     1037            $site_data = get_site_option('dbem_data'); 
     1038            if( !empty($site_data['updates']['timezone-backcompat']) ){ 
    10351039                update_post_meta($this->post_id, '_start_ts', str_pad($this->start()->getTimestamp(), 10, 0, STR_PAD_LEFT)); 
    10361040                update_post_meta($this->post_id, '_end_ts', str_pad($this->end()->getTimestamp(), 10, 0, STR_PAD_LEFT)); 
     
    17081712    function output($format, $target="html") {   
    17091713        global $wpdb; 
    1710         $format = do_shortcode($format); //parse shortcode first, so that formats within shortcodes are parsed properly 
     1714        //$format = do_shortcode($format); //parse shortcode first, so that formats within shortcodes are parsed properly, however uncommenting this will break shortcode containing placeholders for arguments 
    17111715        $event_string = $format; 
    17121716        //Time place holder that doesn't show if empty. 
     
    22562260                    if($this->event_all_day && $this->event_start_date == $this->event_end_date){ 
    22572261                        $dateStart  = $this->start()->format('Ymd'); 
    2258                         $dateEnd    = $this->end()->copy()->add( new DateInterval('P1D') )->format('Ymd'); 
     2262                        $dateEnd    = $this->end()->copy()->add('P1D')->format('Ymd'); 
    22592263                    }else{ 
    22602264                        $dateStart  = $this->start()->format('Ymd\THis'); 
     
    25362540                        if( !empty($this->recurrence_rsvp_days) && is_numeric($this->recurrence_rsvp_days) ){ 
    25372541                            $event_rsvp_days = $this->recurrence_rsvp_days >= 0 ? '+'. $this->recurrence_rsvp_days: $this->recurrence_rsvp_days; 
    2538                             $event_rsvp_date = $EM_DateTime->copy()->add( new DateInterval('P'.$event_rsvp_days.'D') )->getDate(); //cloned so original object isn't modified 
     2542                            $event_rsvp_date = $EM_DateTime->copy()->add('P'.$event_rsvp_days.'D')->getDate(); //cloned so original object isn't modified 
    25392543                            $event['event_rsvp_date'] = $meta_fields['_event_rsvp_date'] = $event_rsvp_date; 
    25402544                        }else{ 
     
    25462550                        if($this->recurrence_days > 0){ 
    25472551                            //$EM_DateTime modified here, and used further down for UTC end date 
    2548                             $event['event_end_date'] = $meta_fields['_event_end_date'] = $EM_DateTime->add( new DateInterval('P'.$this->recurrence_days.'D') )->getDate(); 
     2552                            $event['event_end_date'] = $meta_fields['_event_end_date'] = $EM_DateTime->add('P'.$this->recurrence_days.'D')->getDate(); 
    25492553                        }else{ 
    25502554                            $event['event_end_date'] = $meta_fields['_event_end_date'] = $event['event_start_date']; 
     
    25562560                        $meta_fields['_event_end_local'] = $event['event_end_date'].' '.$event['event_end_time']; 
    25572561                        //Deprecated meta fields 
    2558                         $admin_data = get_option('dbem_admin_data'); 
    2559                         if( $admin_data['datetime_backcompat'] ){ 
     2562                        $site_data = get_site_option('dbem_data'); 
     2563                        if( !empty($site_data['updates']['timezone-backcompat']) ){ 
    25602564                            $meta_fields['_start_ts'] = $start_timestamp; 
    25612565                            $meta_fields['_end_ts'] = $end_timestamp; 
     
    26272631                    $meta_fields['_event_end_date'] = $event_array['event_end_date']; 
    26282632                    $meta_fields['_event_end_local'] = $event_array['event_end_date']. ' ' . $event_array['event_end_time']; 
    2629                     $admin_data = get_option('dbem_admin_data'); 
    2630                     if( $admin_data['datetime_backcompat'] ){ 
     2633                    $site_data = get_site_option('dbem_data'); 
     2634                    if( $site_data['updates']['timezone-backcompat'] ){ 
    26312635                        $meta_fields['_start_ts'] = $start_timestamp; 
    26322636                        $meta_fields['_end_ts'] = $end_timestamp; 
  • events-manager/trunk/classes/em-events.php

    r1787564 r1820130  
    394394                    } 
    395395                    foreach ($events_dates as $year => $events){ 
    396                         echo str_replace('#s', date_i18n($format,strtotime($year.'-01-01', current_time('timestamp'))), $args['header_format']); 
     396                        $EM_DateTime = new EM_DateTime($year.'-01-01'); 
     397                        echo str_replace('#s', $EM_DateTime->i18n($format), $args['header_format']); 
    397398                        echo self::output($events, $atts); 
    398399                    } 
     
    406407                        //if long events requested, add event to other dates too 
    407408                        if( empty($args['limit']) && $long_events && $EM_Event->end()->getDate() != $EM_Event->start()->getDate() ) { 
    408                             $next_month = $EM_Event->start()->copy()->add('P1M'); 
    409                             while( $next_month <= $EM_Event->end() ){ 
    410                                 $events_dates[$next_month->format('Y-m-01')][] = $EM_Event; 
    411                                 $next_month = $next_month->add('P1M'); 
     409                            ///$EM_DateTime is synoymous with the next month here 
     410                            $EM_DateTime = $EM_Event->start()->copy()->add('P1M'); 
     411                            while( $EM_DateTime <= $EM_Event->end() ){ 
     412                                $events_dates[$EM_DateTime->format('Y-m-01')][] = $EM_Event; 
     413                                $EM_DateTime = $EM_DateTime->add('P1M'); 
    412414                            } 
    413415                        } 
    414416                    } 
    415417                    foreach ($events_dates as $month => $events){ 
    416                         echo str_replace('#s', date_i18n($format, strtotime($month, current_time('timestamp'))), $args['header_format']); 
     418                        $EM_DateTime = new EM_DateTime($month); 
     419                        echo str_replace('#s', $EM_DateTime->i18n($format), $args['header_format']); 
    417420                        echo self::output($events, $atts); 
    418421                    } 
     
    422425                    $events_dates = array(); 
    423426                    foreach($EM_Events as $EM_Event){ 
     427                        //obtain start of the week as per WordPress general settings 
    424428                        $start_of_week = get_option('start_of_week'); 
    425429                        $day_of_week = $EM_Event->start()->format('w'); 
    426430                        $offset = $day_of_week - $start_of_week; 
    427431                        if($offset<0){ $offset += 7; } 
    428                         $EM_DateTime = $EM_Event->start()->sub('P'.$offset.'D'); 
    429                         $events_dates[$EM_DateTime->getTimestamp()][] = $EM_Event; 
     432                        $EM_DateTime = $EM_Event->start()->copy()->sub('P'.$offset.'D'); 
     433                        //save event to date representing start of week for this WP install based on general settings 
     434                        $events_dates[$EM_DateTime->getDate()][] = $EM_Event; 
    430435                        //if long events requested, add event to other dates too 
    431436                        if( empty($args['limit']) && $long_events && $EM_Event->end()->getDate() != $EM_Event->start()->getDate() ) { 
    432437                            do{ 
    433438                                $EM_DateTime->add('P1W'); 
    434                                 $events_dates[$next_week][] = $EM_Event; 
     439                                $events_dates[$EM_DateTime->getDate()][] = $EM_Event; 
    435440                            }while( $EM_DateTime <= $EM_Event->end() ); 
    436441                        } 
    437442                    } 
    438                     foreach ($events_dates as $event_day_ts => $events){ 
    439                         echo str_replace('#s', date_i18n($format,$event_day_ts). get_option('dbem_dates_separator') .date_i18n($format,$event_day_ts+(60*60*24*6)), $args['header_format']); 
     443                    foreach ($events_dates as $date => $events){ 
     444                        $dates_formatted = $EM_DateTime->modify($date)->i18n($format). get_option('dbem_dates_separator') . $EM_DateTime->add('P6D')->i18n($format); 
     445                        echo str_replace('#s', $dates_formatted, $args['header_format']); 
    440446                        echo self::output($events, $atts); 
    441447                    } 
     
    447453                    foreach($EM_Events as $EM_Event){ 
    448454                        $EM_DateTime = $EM_Event->start()->copy()->setTime(0,0,0); /* @var EM_DateTime $EM_DateTime */ 
    449                         $events_dates[$EM_DateTime->getTimestamp()][] = $EM_Event; 
     455                        $events_dates[$EM_DateTime->getDate()][] = $EM_Event; 
    450456                        //if long events requested, add event to other dates too 
    451457                        if( empty($args['limit']) && $long_events && $EM_Event->end()->getDate() != $EM_Event->start()->getDate() ) { 
    452458                            do{ 
    453459                                $EM_DateTime->add('P1D'); 
    454                                 $events_dates[$EM_DateTime->getTimestamp()][] = $EM_Event; 
     460                                //store indexes as Y-m-d format so we become timezone independent 
     461                                $events_dates[$EM_DateTime->getDate()][] = $EM_Event; 
    455462                            }while( $EM_DateTime <= $EM_Event->end() ); 
    456463                        } 
    457464                    } 
    458                     foreach ($events_dates as $event_day_ts => $events){ 
    459                         echo str_replace('#s', date_i18n($format,$event_day_ts), $args['header_format']); 
     465                    foreach ($events_dates as $date => $events){ 
     466                        echo str_replace('#s', $EM_DateTime->modify($date)->i18n($format), $args['header_format']); 
    460467                        echo self::output($events, $atts); 
    461468                    } 
  • events-manager/trunk/classes/em-object.php

    r1786433 r1820130  
    364364                } 
    365365            }elseif ($scope == "month" || $scope == "next-month"){ 
    366                 if( $scope == 'next-month' ) $EM_DateTime->add( new DateInterval('P1M') ); 
     366                if( $scope == 'next-month' ) $EM_DateTime->add('P1M'); 
    367367                $start_month = $EM_DateTime->modify('first day of this month')->getDate(); 
    368368                $end_month = $EM_DateTime->modify('last day of this month')->getDate(); 
     
    374374                $months_to_add = $matches[1]; 
    375375                $start_month = $EM_DateTime->getDate(); 
    376                 $end_month = $EM_DateTime->add( new DateInterval('P'.$months_to_add.'M') )->format('Y-m-t'); 
     376                $end_month = $EM_DateTime->add('P'.$months_to_add.'M')->format('Y-m-t'); 
    377377                $conditions['scope'] = " (event_start_date BETWEEN CAST('$start_month' AS DATE) AND CAST('$end_month' AS DATE))"; 
    378378                if( !get_option('dbem_events_current_are_past') ){ 
     
    713713        }elseif ($scope == "month" || $scope == "next-month" ){ 
    714714            $EM_DateTime = new EM_DateTime(); //create default time in blog timezone 
    715             if( $scope == 'next-month' ) $EM_DateTime->add( new DateInterval('P1M') ); 
     715            if( $scope == 'next-month' ) $EM_DateTime->add('P1M'); 
    716716            $start_month = $EM_DateTime->modify('first day of this month')->getDate(); 
    717717            $end_month = $EM_DateTime->modify('last day of this month')->getDate(); 
     
    726726            $months_to_add = $matches[1]; 
    727727            $start_month = $EM_DateTime->getDate(); 
    728             $end_month = $EM_DateTime->add( new DateInterval('P'.$months_to_add.'M') )->format('Y-m-t'); 
     728            $end_month = $EM_DateTime->add('P'.$months_to_add.'M')->format('Y-m-t'); 
    729729            if( get_option('dbem_events_current_are_past') && $wp_query->query_vars['post_type'] != 'event-recurring' ){ 
    730730                $query[] = array( 'key' => '_event_start_date', 'value' => array($start_month,$end_month), 'type' => 'DATE', 'compare' => 'BETWEEN'); 
     
    10411041     * @uses em_paginate() 
    10421042     */ 
    1043     public static function get_pagination_links($args, $count, $search_action, $default_args = array()){ 
     1043    public static function get_pagination_links($args, $count, $search_action = 'search_events', $default_args = array()){ 
    10441044        $limit = ( !empty($args['limit']) && is_numeric($args['limit']) ) ? $args['limit']:false; 
    10451045        $page = ( !empty($args['page']) && is_numeric($args['page']) ) ? $args['page']:1; 
  • events-manager/trunk/classes/em-tag.php

    r1720802 r1820130  
    1515     * @return EM_Taxonomy 
    1616     */ 
    17     public static function get( $id = false, $class_name = 'EM_Tag' ){ 
     17    public static function get( $id, $class_name = 'EM_Tag' ){ 
    1818        return parent::get($id, $class_name); 
    1919    } 
     
    2828 * @param mixed $id 
    2929 * @return EM_Category 
    30  * @uses EM_Category::get() 
     30 * @uses EM_Tag::get() 
    3131 */ 
    32 function em_get_tag( $id = false ) { 
     32function em_get_tag( $id ) { 
    3333    return EM_Tag::get($id); 
    3434} 
  • events-manager/trunk/classes/em-tags.php

    r1765726 r1820130  
    66    protected $terms_name = 'tags'; 
    77    protected $term_class = 'EM_Tag'; 
     8    protected $ajax_search_action = 'search_tags'; 
    89     
    910    /** 
     
    5354    } 
    5455     
    55     public static function get_pagination_links($args, $count, $search_action = 'search_cats', $default_args = array()){ 
     56    public static function get_pagination_links($args, $count, $search_action = 'search_tags', $default_args = array()){ 
    5657        self::$instance = new EM_Tags(); 
    5758        return parent::get_pagination_links($args, $count, $search_action, $default_args); 
  • events-manager/trunk/classes/em-taxonomy-term.php

    r1753147 r1820130  
    6666     * @return EM_Taxonomy 
    6767     */ 
    68     public static function get( $id, $taxonomy_class ){ 
     68    public static function get( $id, $taxonomy_class = 'EM_Taxonomy_Term' ){ 
    6969        //check if it's not already global so we don't instantiate again 
    7070        $EM_Taxonomy = !empty( $GLOBALS[$taxonomy_class] ) ? $GLOBALS[$taxonomy_class] : ''; 
     
    7676            } 
    7777        } 
    78         if( is_object($id) && get_class($id) == '$taxonomy_class' ){ 
     78        if( is_object($id) && get_class($id) == $taxonomy_class ){ 
    7979            return $id; 
    8080        }else{ 
  • events-manager/trunk/classes/em-taxonomy-terms.php

    r1720802 r1820130  
    77    protected $terms_name = 'taxonomies'; 
    88    protected $term_class = 'EM_Taxonomy'; 
     9    /** 
     10     * String representing the search action used in AJAX searches which will be available in child function when PHP 5.3 brings us LSB 
     11     * @var string 
     12     */ 
     13    protected $ajax_search_action = 'search_taxonomy'; 
    914     
    1015    /** 
     
    1823     * @var array 
    1924     */ 
    20     var $terms = array(); 
     25    public $terms = array(); 
    2126    /** 
    2227     * Event ID of this set of taxonomy terms 
    2328     * @var int 
    2429     */ 
    25     var $event_id; 
     30    public $event_id; 
    2631    /** 
    2732     * Post ID of this set of taxonomy terms 
    2833     * @var int 
    2934     */ 
    30     var $post_id; 
     35    public $post_id; 
    3136     
    3237    /** 
     
    257262    } 
    258263     
    259     public static function get_pagination_links($args, $count, $search_action = 'search_cats', $default_args = array()){ 
     264    public static function get_pagination_links($args, $count, $search_action = false, $default_args = array()){ 
    260265        //get default args if we're in a search, supply to parent since we can't depend on late static binding until WP requires PHP 5.3 or later 
     266        if( $search_action === false ) $search_action = self::$instance->ajax_search_action; 
    261267        if( empty($default_args) && (!empty($args['ajax']) || !empty($_REQUEST['action']) && $_REQUEST['action'] == $search_action) ){ 
    262268            $default_args = self::get_default_search(); 
  • events-manager/trunk/em-install.php

    r1786433 r1820130  
    393393    //all the options 
    394394    $dbem_options = array( 
    395         'dbem_admin_data' => array(), //used to store admin-related data such as notice flags and other row keys that may not always exist in the wp_options table 
     395        'dbem_data' => array(), //used to store admin-related data such as notice flags and other row keys that may not always exist in the wp_options table 
    396396        //time formats 
    397397        'dbem_time_format' => get_option('time_format'), 
     
    10041004        } 
    10051005    } 
    1006     if( get_option('dbem_version') != '' && get_option('dbem_version') < 5.82 ){ 
    1007         $admin_data = get_option('dbem_admin_data'); 
    1008         $admin_data['datetime_backcompat'] = true; 
    1009         update_option('dbem_admin_data', $admin_data); 
    1010         $migration_result = em_migrate_datetime_timezones( false ); 
    1011         if( $migration_result !== true ){ 
    1012             $EM_Notices->add_error($migration_result); 
    1013         } 
    1014         //migrate certain options 
    1015         $opt = get_option('dbem_tags_default_archive_orderby'); 
    1016         if( $opt == '_start_ts' ) update_option('dbem_tags_default_archive_orderby', '_event_start'); 
    1017         $opt = get_option('dbem_categories_default_archive_orderby'); 
    1018         if( $opt == '_start_ts' ) update_option('dbem_categories_default_archive_orderby', '_event_start'); 
    1019         $opt = get_option('dbem_events_default_archive_orderby'); 
    1020         if( $opt == '_start_ts' ) update_option('dbem_events_default_archive_orderby', '_event_start'); 
    1021     } 
     1006    if( get_option('dbem_version') != '' && get_option('dbem_version') < 5.83 ){ 
     1007        $admin_data = get_option('dbem_data'); 
     1008        //upgrade tables only if we didn't do it before during earlier dev versions 
     1009        if( empty($admin_data['datetime_backcompat']) ){ 
     1010            $migration_result = em_migrate_datetime_timezones( false ); 
     1011            if( $migration_result !== true ){ 
     1012                $EM_Notices->add_error($migration_result); 
     1013            } 
     1014            //migrate certain options 
     1015            $opt = get_option('dbem_tags_default_archive_orderby'); 
     1016            if( $opt == '_start_ts' ) update_option('dbem_tags_default_archive_orderby', '_event_start'); 
     1017            $opt = get_option('dbem_categories_default_archive_orderby'); 
     1018            if( $opt == '_start_ts' ) update_option('dbem_categories_default_archive_orderby', '_event_start'); 
     1019            $opt = get_option('dbem_events_default_archive_orderby'); 
     1020            if( $opt == '_start_ts' ) update_option('dbem_events_default_archive_orderby', '_event_start'); 
     1021        }else{ 
     1022            //we're doing this at multisite level instead within dev versions, so fix this for dev versions 
     1023            unset( $admin_data['datetime_backcompat'] ); 
     1024            update_option('dbem_data', $admin_data); 
     1025        } 
     1026        //add backwards compatability settings and warnings 
     1027        $admin_data = get_site_option('dbem_data'); 
     1028        if( empty($admin_data['updates']) ) $admin_data['updates'] = array();  
     1029        $admin_data['updates']['timezone-backcompat'] = true; 
     1030        update_site_option('dbem_data', $admin_data); 
     1031        if( !is_multisite() || em_wp_is_super_admin() ){ 
     1032            $message = __('Events Manager now supports multiple timezones for your events! Your events will initially match your blog timezone.','events-manager'); 
     1033            if( is_multisite() ){ 
     1034                $url = network_admin_url('admin.php?page=events-manager-options#general+admin-tools'); 
     1035                $admin_tools_link = '<a href="'.$url.'">'.__('Network Admin').' &gt; '.__('Events Manager','events-manager').' &gt; '.__('Admin Tools','events-manager').'</a>'; 
     1036                $options_link = '<a href="'.network_admin_url('admin.php?page=events-manager-update').'">'.__('Update Network','events-manager').'</a>'; 
     1037                $message .= '</p><p>' . sprintf(__("Please update your network and when you're happy with the changes you can also finalize the migration by deleting unecessary data in the %s page.", 'events-manager'), $options_link); 
     1038                $message .= '</p><p>' . sprintf(__('You can also reset all events of a blog to a new timezone in %s', 'events-manager'), $admin_tools_link); 
     1039            }else{ 
     1040                $options_link = get_admin_url(null, 'edit.php?post_type=event&page=events-manager-options#general+admin-tools'); 
     1041                $options_link = '<a href="'.$options_link.'">'.__('Settings','events-manager').' &gt; '.__('General','events-manager').' &gt; '.__('Admin Tools','events-manager').'</a>'; 
     1042                $message .= '</p><p>' . sprintf(__('You can reset your events to a new timezone and also complete the final migration step by deleting unecessary data in %s', 'events-manager'), $options_link); 
     1043            } 
     1044            $EM_Admin_Notice = new EM_Admin_Notice(array( 
     1045                'name' => 'date_time_migration', 
     1046                'who' => 'admin', 
     1047                'where' => 'all', 
     1048                'message' => $message 
     1049            )); 
     1050            EM_Admin_Notices::add($EM_Admin_Notice, is_multisite()); 
     1051        } 
     1052    }    
    10221053} 
    10231054 
     
    14911522    }else{ 
    14921523        //This gets very easy... just do a single query that copies over all the times to right columns with relevant offset 
    1493         $offset = $timezone == 'UTC' ? 0 : EM_DateTimeZone::create($timezone)->offset / MINUTE_IN_SECONDS; 
     1524        $EM_DateTimeZone = EM_DateTimeZone::create($timezone); 
     1525        $offset = $timezone == 'UTC' ? 0 : $EM_DateTimeZone->manual_offset / MINUTE_IN_SECONDS; 
     1526        $timezone = $EM_DateTimeZone->getName(); 
    14941527        $migration_result = $wpdb->query($wpdb->prepare('UPDATE '. EM_EVENTS_TABLE. ' SET event_start = DATE_SUB(TIMESTAMP(event_start_date,event_start_time), INTERVAL %d MINUTE), event_end = DATE_SUB(TIMESTAMP(event_end_date, event_end_time), INTERVAL %d MINUTE) WHERE event_end IS NULL '.$blog_id_and, $offset, $offset)); 
    14951528        if( $migration_result === false ) $migration_errors[] = array('Event start/end UTC offset', $wpdb->last_error); 
  • events-manager/trunk/events-manager.php

    r1802844 r1820130  
    22/* 
    33Plugin Name: Events Manager 
    4 Version: 5.8.1.22 
     4Version: 5.8.2.0 
    55Plugin URI: http://wp-events-plugin.com 
    66Description: Event registration and booking management for WordPress. Recurring events, locations, google maps, rss, ical, booking registration and more! 
     
    6767// INCLUDES 
    6868//Base classes 
     69include('classes/em-options.php'); 
    6970include('classes/em-object.php'); 
    7071include('classes/em-datetime.php'); 
     
    117118//Admin Files 
    118119if( is_admin() ){ 
     120    include('classes/em-admin-notice.php'); 
     121    include('classes/em-admin-notices.php'); 
    119122    include('admin/em-admin.php'); 
    120123    include('admin/em-bookings.php'); 
  • events-manager/trunk/readme.txt

    r1803085 r1820130  
    101101== Changelog == 
    102102 
    103 = 5.8.1.22 (dev) = 
     103= 5.8.2.0 (dev) = 
     104* fixes applied to 5.8.1.2 merged into dev version 
    104105* added timezone support 
    105 * fixes applied to 5.8.1.2 merged into dev version 
     106* added new admin notice interface objects 
     107* added new EM_Options option storage class 
     108* fixed some PHP strict warnings regarding parent/child class method signatures 
     109* fixed taxonomy pagination issues in AJAX (affecting tags specifically) 
     110* fixed shortcode not getting parsed properly due to fix in 5.8.1.1 attempting to parse shortcode with supplied formats 
     111*  
    106112 
    107113= 5.8.1.3 = 
  • events-manager/trunk/templates/templates/ical.php

    r1787564 r1820130  
    5858            //we get local time since we're representing a date not a time 
    5959            $dateStart  = ';VALUE=DATE:'.$EM_Event->start()->format('Ymd'); //all day 
    60             $dateEnd    = ';VALUE=DATE:'.$EM_Event->end()->copy()->add( new DateInterval('P1D') )->format('Ymd'); //add one day 
     60            $dateEnd    = ';VALUE=DATE:'.$EM_Event->end()->copy()->add('P1D')->format('Ymd'); //add one day 
    6161        }else{ 
    6262            //get date output with timezone and local time if timezone output is enabled, or UTC time if not and/or if offset is manual 
Note: See TracChangeset for help on using the changeset viewer.