Changeset 688029
- Timestamp:
- 03/27/2013 04:45:11 PM (11 years ago)
- Location:
- event-organiser/trunk
- Files:
-
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
event-organiser/trunk/classes/class-eo-calendar-widget.php
r663974 r688029 131 131 * param $month - DateTime object for first day of the month (in blog timezone) 132 132 */ 133 function generate_output($month,$args=array()){ 134 135 $key= $month->format('YM').serialize($args).get_locale(); 133 function generate_output( $month, $args=array() ){ 134 135 //Translations 136 global $wp_locale; 137 138 $today = new DateTime('now',eo_get_blog_timezone()); 139 140 $key= $month->format('YM').serialize($args).get_locale().$today->format('Y-m-d'); 136 141 $calendar = get_transient('eo_widget_calendar'); 137 142 if( $calendar && is_array($calendar) && isset($calendar[$key]) ){ 138 143 return $calendar[$key]; 139 144 } 140 141 //Translations142 global $wp_locale;143 144 //Month should be a DateTime object of the first day in that month145 $today = new DateTime('now',eo_get_blog_timezone());146 145 147 146 //Month details -
event-organiser/trunk/classes/class-eo-event-list-widget.php
r683356 r688029 208 208 } 209 209 210 wp_reset_ query();210 wp_reset_(); 211 211 212 212 if( $echo ) -
event-organiser/trunk/event-organiser.php
r683444 r688029 3 3 Plugin Name: Event Organiser 4 4 Plugin URI: http://www.wp-event-organiser.com 5 Version: 1.8. 25 Version: 1.8. 6 6 Description: Creates a custom post type 'events' with features such as reoccurring events, venues, Google Maps, calendar views and events and venue pages 7 7 Author: Stephen Harris … … 42 42 */ 43 43 global $eventorganiser_db_version; 44 $eventorganiser_db_version = '1.8. 2';44 $eventorganiser_db_version = '1.8.'; 45 45 46 46 … … 187 187 require_once(EVENT_ORGANISER_DIR.'event-organiser-venues.php'); 188 188 require_once(EVENT_ORGANISER_DIR.'event-organiser-calendar.php'); 189 190 else: 191 /****** Templates ******/ 192 require_once('includes/event-organiser-templates.php'); 189 193 190 endif; 194 191 … … 204 201 require_once(EVENT_ORGANISER_DIR.'includes/deprecated.php'); 205 202 require_once(EVENT_ORGANISER_DIR.'includes/event.php'); 203 204 205 206 206 207 207 /****** Widgets and Shortcodes ******/ … … 222 222 register_widget( 'EO_Widget_Venues' ); 223 223 } 224 ?> -
event-organiser/trunk/includes/event-organiser-archives.php
r683444 r688029 50 50 $query->set('event-venue',$venue); 51 51 $query->set( 'post_type', 'event' ); 52 } 53 52 } 53 54 //If the query is for eo-events feed, set post type 55 if( $query->is_feed( 'eo-events' ) ){ 56 $query->set( 'post_type', 'event' ); 57 } 58 54 59 //If querying for all events starting on given date, set the date parameters 55 60 if( !empty($query->query_vars['ondate']) ) { … … 81 86 82 87 //If not on event, stop here. 83 if( ! eventorganiser_is_event_query( $query ) )88 if( ! eventorganiser_is_event_query( $query ) ) 84 89 return $query; 85 90 … … 260 265 function eventorganiser_event_fields( $select, $query ){ 261 266 global $wpdb; 262 263 if( eventorganiser_is_event_query( $query ) ){267 268 if( eventorganiser_is_event_query( $query ) ){ 264 269 $et =$wpdb->eo_events; 265 270 /* Include 'event_occurrence' for backwards compatibility. Will eventually be removed. */ … … 295 300 } 296 301 297 if( eventorganiser_is_event_query( $query ) ):302 if( eventorganiser_is_event_query( $query ) ): 298 303 if(empty($groupby)) 299 304 return $groupby; … … 321 326 global $wpdb; 322 327 323 if( eventorganiser_is_event_query( $query ) ){328 if( eventorganiser_is_event_query( $query ) ){ 324 329 $join .=" LEFT JOIN $wpdb->eo_events ON $wpdb->posts.id = {$wpdb->eo_events}.post_id "; 325 330 } … … 334 339 $post_types = get_post_types( array('exclude_from_search' => false) ); 335 340 336 if( $post_types == 'event' || eo_is_event_taxonomy( $query ) ){ 341 342 if( $post_types == 'event' ){ 337 343 $bool = true; 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 338 371 }elseif( $exclusive ){ 339 372 $bool = false; 373 340 374 }elseif( ( is_array( $post_types ) && in_array( 'event', $post_types ) ) ){ 341 375 $bool = true; 376 342 377 }else{ 343 378 $bool = false; 379 344 380 } 345 381 … … 362 398 363 399 //Only alter event queries 364 if( eventorganiser_is_event_query( $query ) ):400 if( eventorganiser_is_event_query( $query ) ): 365 401 366 402 //If we only want events (or occurrences of events) that belong to a particular 'event' -
event-organiser/trunk/includes/event-organiser-event-functions.php
r683444 r688029 182 182 $start = $occurrences[$occurrence_id]['start']; 183 183 184 return eo_format_datetime($start,$format);184 return ); 185 185 } 186 186 … … 274 274 $end = $occurrences[$occurrence_id]['end']; 275 275 276 return eo_format_datetime($end,$format);276 return ); 277 277 } 278 278 … … 308 308 return false; 309 309 310 return eo_format_datetime($next_occurrence['start'],$format); 310 $next = $next_occurrence['start']; 311 return apply_filters('eventorganiser_get_next_occurrence', eo_format_datetime( $next, $format ), $next, $format, $post_id ); 311 312 } 312 313 … … 442 443 $post_id = (int) ( empty($post_id) ? get_the_ID() : $post_id); 443 444 $schedule = eo_get_event_schedule($post_id); 444 return eo_format_datetime($schedule['schedule_start'],$format); 445 $schedule_start = $schedule['schedule_start']; 446 return apply_filters('eventorganiser_get_schedule_start', eo_format_datetime( $schedule_start, $format ), $schedule_start, $format, $post_id ); 445 447 } 446 448 … … 471 473 $post_id = (int) ( empty($post_id) ? get_the_ID() : $post_id); 472 474 $schedule = eo_get_event_schedule($post_id); 473 return eo_format_datetime($schedule['schedule_last'],$format); 475 $schedule_last = $schedule['schedule_last']; 476 return apply_filters('eventorganiser_get_schedule_last', eo_format_datetime( $schedule_last, $format ), $schedule_last, $format, $post_id ); 474 477 } 475 478 … … 818 821 function eo_is_event_taxonomy( $query = false ){ 819 822 $event_tax = get_object_taxonomies( 'event' ); 823 824 825 826 827 828 829 830 831 832 833 834 835 820 836 if( !$query ){ 821 837 return is_tax( $event_tax ); -
event-organiser/trunk/includes/event-organiser-register.php
r683387 r688029 10 10 function eventorganiser_register_script() { 11 11 global $wp_locale; 12 $version = '1.8 ';12 $version = '1.8'; 13 13 14 14 $ext = (defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG) ? '' : '.min'; … … 77 77 */ 78 78 function eventorganiser_register_scripts(){ 79 $version = '1.8 ';79 $version = '1.8'; 80 80 $ext = (defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG) ? '' : '.min'; 81 81 -
event-organiser/trunk/includes/event-organiser-utility-functions.php
r683356 r688029 787 787 $args = wp_parse_args($args,array( 788 788 'type' => 'text', 'value'=>'', 'tinymce' => '', 'help' => '', 789 'class'=>'large-text', 'echo'=>true,'rows'=>5, 'cols'=>50 789 'class'=>'large-text', 'echo'=>true,'rows'=>5, 'cols'=>50, 790 'readonly'=> false, 790 791 )); 791 792 … … 794 795 $value = $args['value']; 795 796 $class = $args['class']; 797 796 798 $html =''; 797 799 … … 802 804 )); 803 805 }else{ 804 $html .= sprintf('<textarea cols="%s" rows="%d" name="%s" class="%s large-text" id="%s" >%s</textarea>',806 $html .= sprintf('<textarea cols="%s" rows="%d" name="%s" class="%s large-text" id="%s">%s</textarea>', 805 807 intval($args['cols']), 806 808 intval($args['rows']), … … 808 810 sanitize_html_class($class), 809 811 esc_attr($id), 812 810 813 esc_textarea($value) 811 814 ); -
event-organiser/trunk/includes/event.php
r683356 r688029 48 48 unset($event_data['category']); 49 49 } 50 51 52 50 53 51 54 if( !empty($post_data) ){ … … 62 65 $event_data['schedule'] = 'custom'; 63 66 } 64 67 65 68 //Do we need to delete existing dates from db? 66 69 $delete_existing = false; … … 99 102 } 100 103 101 do_action( 'eventorganiser_save_event', $post_id);104 do_action(); 102 105 return $post_id; 103 106 } … … 147 150 unset($event_data['category']); 148 151 } 152 153 154 149 155 150 156 //If schedule is 'once' and dates are included - set to 'custom': … … 169 175 170 176 //Action used to break cache & trigger Pro actions (& by other plug-ins?) 171 do_action( 'eventorganiser_save_event',$post_id);177 do_action(); 172 178 return $post_id; 173 179 } … … 183 189 global $wpdb; 184 190 185 do_action('eventorganiser_delete_event', $post_id); 191 do_action( 'eventorganiser_delete_event', $post_id ); //Deprecated - do not use! 192 do_action( 'eventorganiser_delete_event_occurrences', $post_id ); 186 193 $del = $wpdb->get_results($wpdb->prepare("DELETE FROM $wpdb->eo_events WHERE post_id=%d",$post_id)); 187 194 } … … 207 214 208 215 /* Storing a DateInterval object can cause errors. Serialize it. 209 http://www.harriswebsolutions.co.uk/event-organiser/forums/topic/error-when-saving-events/210 216 Thanks to Mathieu Parisot, Mathias & Dave Page */ 211 $event_data['duration'] = maybe_serialize( $duration);217 $event_data['duration'] = maybe_serialize(); 212 218 } 213 219 -
event-organiser/trunk/js/frontend.js
r683356 r688029 237 237 238 238 $(".eo_widget_calendar tfoot").unbind("click"); 239 $(".eo_widget_calendar tfoot a"). die("click").live("click", function (a) {239 $(".eo_widget_calendar tfoot a").("click", function (a) { 240 240 a.preventDefault(); 241 241 var b = $(this).closest(".eo_widget_calendar").attr("id"); -
event-organiser/trunk/js/frontend.min.js
r683356 r688029 9 9 if(typeof h.category!=="undefined"&&h.category!="")b.category=h.category;if(typeof h.venue!=="undefined"&&h.venue!="")b.venue=h.venue;jQuery.ajax({url:EOAjax.ajaxurl+"?action=eventorganiser-fullcal",dataType:"JSON",data:b,success:g})},selectable:false,weekMode:"variable",aspectRatio:1.5,loading:function(b){var d=a("#"+a(this).attr("id")+"_loading");if(b){window.clearTimeout(l);l=window.setTimeout(function(){d.show()},1E3)}else{window.clearTimeout(l);d.hide()}}})}a(".eo-cal-filter").change(function(){a(".eo-fullcalendar").fullCalendar("rerenderEvents")}); 10 10 a(".eo-mini-calendar").datepicker({dateFormat:"DD, d MM, yy",changeMonth:true,changeYear:true,dateFormat:"DD, d MM, yy",firstDay:parseInt(EOAjax.fullcal.firstDay),buttonText:EOAjaxFront.locale.gotodate,monthNamesShort:EOAjaxFront.locale.monthAbbrev,dayNamesMin:EOAjaxFront.locale.dayAbbrev,showOn:"button",onSelect:function(b){var d=a(this).parents("div.eo-fullcalendar").attr("id");a("#"+d).fullCalendar("gotoDate",new Date(Date.parse(b)))}})}if(a(".eo_widget_calendar").length>0){a(".eo_widget_calendar tfoot").unbind("click"); 11 a(".eo_widget_calendar tfoot a"). die("click").live("click",function(b){b.preventDefault();var d=a(this).closest(".eo_widget_calendar").attr("id");b={showpastevents:1};if(typeof EOAjax!=="undefined"&&typeof EOAjax.widget_calendars!=="undefined")b=EOAjax.widget_calendars[d];if(typeof eo_widget_cal!=="undefined")b=eo_widget_cal[d];b.eo_month=eveorg_getParameterByName("eo_month",a(this).attr("href"));a.getJSON(EOAjaxFront.adminajax+"?action=eo_widget_cal",b,function(g){a("#"+d+"_content").html(g)})})}if(a(".eo-agenda-widget").length>11 a(".eo_widget_calendar tfoot a").("click",function(b){b.preventDefault();var d=a(this).closest(".eo_widget_calendar").attr("id");b={showpastevents:1};if(typeof EOAjax!=="undefined"&&typeof EOAjax.widget_calendars!=="undefined")b=EOAjax.widget_calendars[d];if(typeof eo_widget_cal!=="undefined")b=eo_widget_cal[d];b.eo_month=eveorg_getParameterByName("eo_month",a(this).attr("href"));a.getJSON(EOAjaxFront.adminajax+"?action=eo_widget_cal",b,function(g){a("#"+d+"_content").html(g)})})}if(a(".eo-agenda-widget").length> 12 12 0){function o(b,d){a.ajax({url:EOAjaxFront.adminajax,dataType:"JSON",data:{action:"eo_widget_agenda",instance_number:d.number,direction:b,start:d.StartDate,end:d.EndDate},success:function(g){if(!jQuery.isArray(g)||!g[0])return false;else{d.StartDate=g[0].StartDate;d.EndDate=g[g.length-1].StartDate;r(g,d)}}})}function r(b,d){var g=a("#"+d.id+"_container"),h=g.find("ul.dates"),i=h.find("li");a(i).remove();i="";for(c=0;c<b.length;c++){if(i==""||i!=b[c].StartDate&&d.mode=="day"){i=b[c].StartDate;var p= 13 13 a('<li class="date" >'+b[c].display+'<ul class="a-date"></ul></li>');h.append(p)}var q=d.add_to_google?a('<li class="event"></li>').append('<span class="cat"></span><span><strong>'+b[c].time+": </strong></span>"+b[c].post_title).append('<div class="meta" style="display:none;"><span>'+b[c].link+"</span><span> \u00a0 </span><span>"+b[c].Glink+"</span></div>"):a('<li class="event"></li>').append("<a class='eo-agenda-event-permalink' href='"+b[c].event_url+"'><span class='cat'></span><span><strong>"+ -
event-organiser/trunk/readme.md
r683356 r688029 5 5 **Requires at least:** 3.3 6 6 **Tested up to:** 3.5 7 **Stable tag:** 1.8 7 **Stable tag:** 1.8 8 8 **License:** GPLv3 9 9 … … 66 66 * Hungarian - Csaba Erdei 67 67 * Estonian - Kristjan Roosipuu 68 68 69 69 70 ## Installation ## … … 175 176 176 177 ## Changelog ## 178 179 180 181 182 183 184 185 186 187 188 189 190 191 177 192 178 193 ### 1.8 ### … … 444 459 445 460 ## Upgrade Notice ## 461 462 463 464 446 465 ### 1.5 ### 447 466 1.5 is a big update, so please back-up before upgrading. -
event-organiser/trunk/readme.txt
r683444 r688029 5 5 Requires at least: 3.3 6 6 Tested up to: 3.5 7 Stable tag: 1.8. 27 Stable tag: 1.8. 8 8 License: GPLv3 9 9 … … 165 165 == Changelog == 166 166 167 168 169 170 171 172 173 167 174 = 1.8.2 = 168 175 * Fixes event taxonomy sorting bug introduced in 1.8 … … 441 448 == Upgrade Notice == 442 449 450 451 452 443 453 = 1.8.2 = 444 454 If you have upgrade to 1.8 or 1.8.1 please upgrade to 1.8.2. This update includes fixes to bugs introduced in 1.8.
Note: See TracChangeset
for help on using the changeset viewer.