All-in-One Event Calendar - Version 2.3.3

Version Description

Download this release

Release Info

Developer lpawlik
Plugin Icon 128x128 All-in-One Event Calendar
Version 2.3.3
Comparing to
See all releases

Code changes from version 2.3.2 to 2.3.3

Files changed (104) hide show
  1. all-in-one-event-calendar.php +1 -1
  2. app/config/constants.php +1 -1
  3. app/view/admin/settings.php +0 -0
  4. app/view/calendar/view/month.php +532 -531
  5. public/admin/font/fontawesome-webfont.eot +0 -0
  6. public/admin/font/fontawesome-webfont.svg +0 -0
  7. public/admin/font/fontawesome-webfont.ttf +0 -0
  8. public/admin/font/fontawesome-webfont.woff +0 -0
  9. public/admin/img/ajax-loader-small.gif +0 -0
  10. public/admin/less/bootstrap/alerts.less +0 -0
  11. public/admin/less/bootstrap/badges.less +0 -0
  12. public/admin/less/bootstrap/bootstrap.less +0 -0
  13. public/admin/less/bootstrap/breadcrumbs.less +0 -0
  14. public/admin/less/bootstrap/button-groups.less +0 -0
  15. public/admin/less/bootstrap/buttons.less +0 -0
  16. public/admin/less/bootstrap/carousel.less +0 -0
  17. public/admin/less/bootstrap/close.less +0 -0
  18. public/admin/less/bootstrap/code.less +0 -0
  19. public/admin/less/bootstrap/component-animations.less +0 -0
  20. public/admin/less/bootstrap/dropdowns.less +0 -0
  21. public/admin/less/bootstrap/forms.less +0 -0
  22. public/admin/less/bootstrap/glyphicons.less +0 -0
  23. public/admin/less/bootstrap/grid.less +0 -0
  24. public/admin/less/bootstrap/input-groups.less +0 -0
  25. public/admin/less/bootstrap/jumbotron.less +0 -0
  26. public/admin/less/bootstrap/labels.less +0 -0
  27. public/admin/less/bootstrap/list-group.less +0 -0
  28. public/admin/less/bootstrap/media.less +0 -0
  29. public/admin/less/bootstrap/mixins.less +0 -0
  30. public/admin/less/bootstrap/modals.less +0 -0
  31. public/admin/less/bootstrap/navbar.less +0 -0
  32. public/admin/less/bootstrap/navs.less +0 -0
  33. public/admin/less/bootstrap/normalize.less +0 -0
  34. public/admin/less/bootstrap/pager.less +0 -0
  35. public/admin/less/bootstrap/pagination.less +0 -0
  36. public/admin/less/bootstrap/panels.less +0 -0
  37. public/admin/less/bootstrap/popovers.less +0 -0
  38. public/admin/less/bootstrap/print.less +0 -0
  39. public/admin/less/bootstrap/progress-bars.less +0 -0
  40. public/admin/less/bootstrap/responsive-utilities.less +0 -0
  41. public/admin/less/bootstrap/scaffolding.less +0 -0
  42. public/admin/less/bootstrap/tables.less +0 -0
  43. public/admin/less/bootstrap/theme.less +0 -0
  44. public/admin/less/bootstrap/thumbnails.less +0 -0
  45. public/admin/less/bootstrap/tooltip.less +0 -0
  46. public/admin/less/bootstrap/type.less +0 -0
  47. public/admin/less/bootstrap/utilities.less +0 -0
  48. public/admin/less/bootstrap/variables.less +0 -0
  49. public/admin/less/bootstrap/wells.less +0 -0
  50. public/admin/less/build-css.sh +0 -0
  51. public/admin/less/plugins/datepicker3.less +0 -0
  52. public/themes-ai1ec/vortex/font/ai1ec-icons.eot +0 -0
  53. public/themes-ai1ec/vortex/font/ai1ec-icons.svg +0 -0
  54. public/themes-ai1ec/vortex/font/ai1ec-icons.ttf +0 -0
  55. public/themes-ai1ec/vortex/font/ai1ec-icons.woff +0 -0
  56. public/themes-ai1ec/vortex/font/fontawesome-webfont.eot +0 -0
  57. public/themes-ai1ec/vortex/font/fontawesome-webfont.svg +0 -0
  58. public/themes-ai1ec/vortex/font/fontawesome-webfont.ttf +0 -0
  59. public/themes-ai1ec/vortex/font/fontawesome-webfont.woff +0 -0
  60. public/themes-ai1ec/vortex/img/ajax-loader-small.gif +0 -0
  61. public/themes-ai1ec/vortex/less/bootstrap/alerts.less +0 -0
  62. public/themes-ai1ec/vortex/less/bootstrap/badges.less +0 -0
  63. public/themes-ai1ec/vortex/less/bootstrap/bootstrap.less +0 -0
  64. public/themes-ai1ec/vortex/less/bootstrap/breadcrumbs.less +0 -0
  65. public/themes-ai1ec/vortex/less/bootstrap/button-groups.less +0 -0
  66. public/themes-ai1ec/vortex/less/bootstrap/buttons.less +0 -0
  67. public/themes-ai1ec/vortex/less/bootstrap/carousel.less +0 -0
  68. public/themes-ai1ec/vortex/less/bootstrap/close.less +0 -0
  69. public/themes-ai1ec/vortex/less/bootstrap/code.less +0 -0
  70. public/themes-ai1ec/vortex/less/bootstrap/component-animations.less +0 -0
  71. public/themes-ai1ec/vortex/less/bootstrap/dropdowns.less +0 -0
  72. public/themes-ai1ec/vortex/less/bootstrap/forms.less +0 -0
  73. public/themes-ai1ec/vortex/less/bootstrap/glyphicons.less +0 -0
  74. public/themes-ai1ec/vortex/less/bootstrap/grid.less +0 -0
  75. public/themes-ai1ec/vortex/less/bootstrap/input-groups.less +0 -0
  76. public/themes-ai1ec/vortex/less/bootstrap/jumbotron.less +0 -0
  77. public/themes-ai1ec/vortex/less/bootstrap/labels.less +0 -0
  78. public/themes-ai1ec/vortex/less/bootstrap/list-group.less +0 -0
  79. public/themes-ai1ec/vortex/less/bootstrap/media.less +0 -0
  80. public/themes-ai1ec/vortex/less/bootstrap/mixins.less +0 -0
  81. public/themes-ai1ec/vortex/less/bootstrap/modals.less +0 -0
  82. public/themes-ai1ec/vortex/less/bootstrap/navbar.less +0 -0
  83. public/themes-ai1ec/vortex/less/bootstrap/navs.less +0 -0
  84. public/themes-ai1ec/vortex/less/bootstrap/normalize.less +0 -0
  85. public/themes-ai1ec/vortex/less/bootstrap/pager.less +0 -0
  86. public/themes-ai1ec/vortex/less/bootstrap/pagination.less +0 -0
  87. public/themes-ai1ec/vortex/less/bootstrap/panels.less +0 -0
  88. public/themes-ai1ec/vortex/less/bootstrap/popovers.less +0 -0
  89. public/themes-ai1ec/vortex/less/bootstrap/print.less +0 -0
  90. public/themes-ai1ec/vortex/less/bootstrap/progress-bars.less +0 -0
  91. public/themes-ai1ec/vortex/less/bootstrap/responsive-utilities.less +0 -0
  92. public/themes-ai1ec/vortex/less/bootstrap/scaffolding.less +0 -0
  93. public/themes-ai1ec/vortex/less/bootstrap/tables.less +0 -0
  94. public/themes-ai1ec/vortex/less/bootstrap/theme.less +0 -0
  95. public/themes-ai1ec/vortex/less/bootstrap/thumbnails.less +0 -0
  96. public/themes-ai1ec/vortex/less/bootstrap/tooltip.less +0 -0
  97. public/themes-ai1ec/vortex/less/bootstrap/type.less +0 -0
  98. public/themes-ai1ec/vortex/less/bootstrap/utilities.less +0 -0
  99. public/themes-ai1ec/vortex/less/bootstrap/variables.less +0 -0
  100. public/themes-ai1ec/vortex/less/bootstrap/wells.less +0 -0
  101. public/themes-ai1ec/vortex/less/build-3rdparty-less.sh +0 -0
  102. public/themes-ai1ec/vortex/less/plugins/datepicker3.less +0 -0
  103. public/themes-ai1ec/vortex/less/plugins/timepicker.less +0 -0
  104. readme.txt +4 -1
all-in-one-event-calendar.php CHANGED
@@ -5,7 +5,7 @@
5
  * Description: A calendar system with month, week, day, agenda views, upcoming events widget, color-coded categories, recurrence, and import/export of .ics feeds.
6
  * Author: Time.ly Network Inc.
7
  * Author URI: http://time.ly/
8
- * Version: 2.3.2
9
  * Text Domain: all-in-one-event-calendar
10
  * Domain Path: /language
11
  */
5
  * Description: A calendar system with month, week, day, agenda views, upcoming events widget, color-coded categories, recurrence, and import/export of .ics feeds.
6
  * Author: Time.ly Network Inc.
7
  * Author URI: http://time.ly/
8
+ * Version: 2.3.3
9
  * Text Domain: all-in-one-event-calendar
10
  * Domain Path: /language
11
  */
app/config/constants.php CHANGED
@@ -50,7 +50,7 @@ function ai1ec_initiate_constants( $ai1ec_base_dir, $ai1ec_base_url ) {
50
  // = Plugin Version =
51
  // ==================
52
  if ( ! defined( 'AI1EC_VERSION' ) ) {
53
- define( 'AI1EC_VERSION', '2.3.2' );
54
  }
55
 
56
  // ================
50
  // = Plugin Version =
51
  // ==================
52
  if ( ! defined( 'AI1EC_VERSION' ) ) {
53
+ define( 'AI1EC_VERSION', '2.3.3' );
54
  }
55
 
56
  // ================
app/view/admin/settings.php CHANGED
File without changes
app/view/calendar/view/month.php CHANGED
@@ -1,531 +1,532 @@
1
- <?php
2
-
3
- /**
4
- * The concrete class for month view.
5
- *
6
- * @author Time.ly Network Inc.
7
- * @since 2.0
8
- *
9
- * @package AI1EC
10
- * @subpackage AI1EC.View
11
- */
12
- class Ai1ec_Calendar_View_Month extends Ai1ec_Calendar_View_Abstract {
13
-
14
- /* (non-PHPdoc)
15
- * @see Ai1ec_Calendar_View_Abstract::get_name()
16
- */
17
- public function get_name() {
18
- return 'month';
19
- }
20
-
21
- /* (non-PHPdoc)
22
- * @see Ai1ec_Calendar_View_Abstract::get_content()
23
- */
24
- public function get_content( array $view_args ) {
25
- $date_system = $this->_registry->get( 'date.system' );
26
- $settings = $this->_registry->get( 'model.settings' );
27
- $defaults = array(
28
- 'month_offset' => 0,
29
- 'cat_ids' => array(),
30
- 'auth_ids' => array(),
31
- 'tag_ids' => array(),
32
- 'post_ids' => array(),
33
- 'instance_ids' => array(),
34
- 'exact_date' => $date_system->current_time(),
35
- );
36
- $args = wp_parse_args( $view_args, $defaults );
37
- $local_date = $this->_registry
38
- ->get( 'date.time', $args['exact_date'], 'sys.default' );
39
- $local_date->set_date(
40
- $local_date->format( 'Y' ),
41
- $local_date->format( 'm' ) + $args['month_offset'],
42
- 1
43
- )
44
- ->set_time( 0, 0, 0 );
45
-
46
- $days_events = $this->get_events_for_month(
47
- $local_date,
48
- apply_filters(
49
- 'ai1ec_get_events_relative_to_filter',
50
- array(
51
- 'cat_ids' => $args['cat_ids'],
52
- 'tag_ids' => $args['tag_ids'],
53
- 'post_ids' => $args['post_ids'],
54
- 'auth_ids' => $args['auth_ids'],
55
- 'instance_ids' => $args['instance_ids'],
56
- ),
57
- $view_args,
58
- apply_filters(
59
- 'ai1ec_show_unique_events',
60
- false
61
- )
62
- )
63
- );
64
- $cell_array = $this->get_month_cell_array(
65
- $local_date,
66
- $days_events
67
- );
68
- // Create pagination links.
69
- $title = $local_date->format_i18n( 'F Y' );
70
- $pagination_links = $this->_get_pagination( $args, $title );
71
-
72
- $is_ticket_button_enabled = apply_filters(
73
- 'ai1ec_month_ticket_button',
74
- false
75
- );
76
-
77
- $view_args = array(
78
- 'title' => $title,
79
- 'type' => 'month',
80
- 'weekdays' => $this->get_weekdays(),
81
- 'cell_array' => $cell_array,
82
- 'show_location_in_title' => $settings->get( 'show_location_in_title' ),
83
- 'month_word_wrap' => $settings->get( 'month_word_wrap' ),
84
- 'post_ids' => join( ',', $args['post_ids'] ),
85
- 'data_type' => $args['data_type'],
86
- 'is_ticket_button_enabled' => $is_ticket_button_enabled,
87
- 'text_venue_separator' => __( '@ %s', AI1EC_PLUGIN_NAME ),
88
- 'pagination_links' => $pagination_links,
89
- );
90
-
91
- // Add navigation if requested.
92
- $view_args['navigation'] = $this->_get_navigation(
93
- array(
94
- 'no_navigation' => $args['no_navigation'],
95
- 'pagination_links' => $pagination_links,
96
- 'views_dropdown' => $args['views_dropdown'],
97
- 'below_toolbar' => apply_filters(
98
- 'ai1ec_below_toolbar',
99
- '',
100
- $this->get_name(),
101
- $args
102
- ),
103
- )
104
- );
105
-
106
- $view_args = $this->get_extra_template_arguments( $view_args );
107
-
108
- return
109
- $this->_registry->get( 'http.request' )->is_json_required(
110
- $args['request_format'], 'month'
111
- )
112
- ? $this->_apply_filters_to_args( $view_args )
113
- : $this->_get_view( $view_args );
114
- }
115
-
116
- /**
117
- * Returns a non-associative array of four links for the month view of the
118
- * calendar:
119
- * previous year, previous month, next month, and next year.
120
- * Each element is an associative array containing the link's enabled status
121
- * ['enabled'], CSS class ['class'], text ['text'] and value to assign to
122
- * link's href ['href'].
123
- *
124
- * @param array $args Current request arguments
125
- * @param string $title Title to display in datepicker button
126
- *
127
- * @return array Array of links
128
- */
129
- function get_month_pagination_links( $args, $title ) {
130
- $links = array();
131
-
132
- $local_date = $this->_registry
133
- ->get( 'date.time', $args['exact_date'], 'sys.default' );
134
- $orig_date = $this->_registry->get( 'date.time', $local_date );
135
- // =================
136
- // = Previous year =
137
- // =================
138
- // Align date to first of month, month offset applied, 1 year behind.
139
- $local_date
140
- ->set_date(
141
- $local_date->format( 'Y' ) -1,
142
- $local_date->format( 'm' ) + $args['month_offset'],
143
- 1
144
- )
145
- ->set_time( 0, 0, 0 );
146
-
147
- $args['exact_date'] = $local_date->format();
148
- $href = $this->_registry->get( 'html.element.href', $args );
149
- $links[] = array(
150
- 'enabled' => true,
151
- 'class'=> 'ai1ec-prev-year',
152
- 'text' =>
153
- '<i class="ai1ec-fa ai1ec-fa-angle-double-left"></i> ' .
154
- $local_date->format_i18n( 'Y' ),
155
- 'href' => $href->generate_href(),
156
- );
157
-
158
- // ==================
159
- // = Previous month =
160
- // ==================
161
- // Align date to first of month, month offset applied, 1 month behind.
162
- $local_date
163
- ->set_date(
164
- $local_date->format( 'Y' ) + 1,
165
- $local_date->format( 'm' ) - 1,
166
- 1
167
- );
168
- $args['exact_date'] = $local_date->format();
169
- $href = $this->_registry->get( 'html.element.href', $args );
170
- $links[] = array(
171
- 'enabled' => true,
172
- 'class'=> 'ai1ec-prev-month',
173
- 'text' => '<i class="ai1ec-fa ai1ec-fa-angle-left"></i> ' .
174
- $local_date->format_i18n( 'M' ),
175
- 'href' => $href->generate_href(),
176
- );
177
-
178
- // ======================
179
- // = Minical datepicker =
180
- // ======================
181
- // Align date to first of month, month offset applied.
182
-
183
- $orig_date
184
- ->set_timezone('UTC')
185
- ->set_date(
186
- $orig_date->format( 'Y' ),
187
- $orig_date->format( 'm' ) + $args['month_offset'],
188
- 1
189
- );
190
- $args['exact_date'] = $orig_date->format();
191
- $factory = $this->_registry->get( 'factory.html' );
192
- $links[] = $factory->create_datepicker_link(
193
- $args,
194
- $args['exact_date'],
195
- $title
196
- );
197
-
198
- // ==============
199
- // = Next month =
200
- // ==============
201
- // Align date to first of month, month offset applied, 1 month ahead.
202
- $orig_date
203
- ->set_date(
204
- $orig_date->format( 'Y' ),
205
- $orig_date->format( 'm' ) + 1,
206
- 1
207
- );
208
- $args['exact_date'] = $orig_date->format();
209
- $href = $this->_registry->get( 'html.element.href', $args );
210
- $links[] = array(
211
- 'enabled' => true,
212
- 'class'=> 'ai1ec-next-month',
213
- 'text' =>
214
- $orig_date->format_i18n( 'M' ) .
215
- ' <i class="ai1ec-fa ai1ec-fa-angle-right"></i>',
216
- 'href' => $href->generate_href(),
217
- );
218
-
219
- // =============
220
- // = Next year =
221
- // =============
222
- // Align date to first of month, month offset applied, 1 year ahead.
223
- $orig_date
224
- ->set_date(
225
- $orig_date->format( 'Y' ) + 1,
226
- $orig_date->format( 'm' ) - 1,
227
- 1
228
- );
229
- $args['exact_date'] = $orig_date->format();
230
- $href = $this->_registry->get( 'html.element.href', $args );
231
- $links[] = array(
232
- 'enabled' => true,
233
- 'class'=> 'ai1ec-next-year',
234
- 'text' =>
235
- $orig_date->format_i18n( 'Y' ) .
236
- ' <i class="ai1ec-fa ai1ec-fa-angle-double-right"></i>',
237
- 'href' => $href->generate_href(),
238
- );
239
-
240
- return $links;
241
- }
242
-
243
- /**
244
- * get_weekdays function
245
- *
246
- * Returns a list of abbreviated weekday names starting on the configured
247
- * week start day setting.
248
- *
249
- * @return array
250
- */
251
- protected function get_weekdays() {
252
- $settings = $this->_registry->get( 'model.settings' );
253
- static $weekdays;
254
-
255
- if ( ! isset( $weekdays ) ) {
256
- $time = $this->_registry->get(
257
- 'date.time',
258
- 'next Sunday',
259
- 'sys.default'
260
- );
261
- $time->adjust_day( $settings->get( 'week_start_day' ) );
262
-
263
- $weekdays = array();
264
- for( $i = 0; $i < 7; $i++ ) {
265
- $weekdays[] = $time->format_i18n( 'D' );
266
- $time->adjust_day( 1 );// Add a day
267
- }
268
- }
269
- return $weekdays;
270
- }
271
-
272
- /* (non-PHPdoc)
273
- * @see Ai1ec_Calendar_View_Abstract::_add_view_specific_runtime_properties()
274
- */
275
- protected function _add_view_specific_runtime_properties(
276
- Ai1ec_Event $event
277
- ) {
278
- $end_day = $this->_registry->get( 'date.time', $event->get( 'end' ) )
279
- ->adjust( -1, 'second' )
280
- ->format_i18n( 'd' );
281
- $event->set_runtime( 'multiday_end_day', $end_day );
282
- $event->set_runtime(
283
- 'start_day',
284
- $event->get( 'start' )->format( 'j' )
285
- );
286
- }
287
-
288
- /**
289
- * get_month_cell_array function
290
- *
291
- * Return an array of weeks, each containing an array of days, each
292
- * containing the date for the day ['date'] (if inside the month) and
293
- * the events ['events'] (if any) for the day, and a boolean ['today']
294
- * indicating whether that day is today.
295
- *
296
- * @param int $timestamp UNIX timestamp of the 1st day of the desired
297
- * month to display
298
- * @param array $days_events list of events for each day of the month in
299
- * the format returned by get_events_for_month()
300
- *
301
- * @return void
302
- */
303
- protected function get_month_cell_array( Ai1ec_Date_Time $timestamp, $days_events ) {
304
- $settings = $this->_registry->get( 'model.settings' );
305
- $date_system = $this->_registry->get( 'date.system' );
306
- $today = $this->_registry->get( 'date.time' );// Used to flag today's cell
307
-
308
- // Figure out index of first table cell
309
- $first_cell_index = $timestamp->format( 'w' );
310
- // Modify weekday based on start of week setting
311
- $first_cell_index = ( 7 + $first_cell_index - $settings->get( 'week_start_day' ) ) % 7;
312
-
313
- // Get the last day of the month
314
- $last_day = $timestamp->format( 't' );
315
- $last_timestamp = $this->_registry->get( 'date.time', $timestamp );
316
- $last_timestamp->set_date(
317
- $timestamp->format( 'Y' ),
318
- $timestamp->format( 'm' ),
319
- $last_day
320
- )->set_time( 0, 0, 0 );
321
- // Figure out index of last table cell
322
- $last_cell_index = $last_timestamp->format( 'w' );
323
- // Modify weekday based on start of week setting
324
- $last_cell_index = ( 7 + $last_cell_index - $settings->get( 'week_start_day' ) ) % 7;
325
-
326
- $weeks = array();
327
- $week = 0;
328
- $weeks[$week] = array();
329
-
330
- // Insert any needed blank cells into first week
331
- for( $i = 0; $i < $first_cell_index; $i++ ) {
332
- $weeks[$week][] = array(
333
- 'date' => null,
334
- 'events' => array(),
335
- 'date_link' => null
336
- );
337
- }
338
-
339
- // Insert each month's day and associated events
340
- for( $i = 1; $i <= $last_day; $i++ ) {
341
- $day = $this->_registry->get( 'date.time' )
342
- ->set_date(
343
- $timestamp->format( 'Y' ),
344
- $timestamp->format( 'm' ),
345
- $i
346
- )
347
- ->set_time( 0, 0, 0 )
348
- ->format();
349
- $exact_date = $date_system->format_date_for_url(
350
- $day,
351
- $settings->get( 'input_date_format' )
352
- );
353
- $events = array();
354
- foreach ( $days_events[$i] as $evt ){
355
- $event_data = array(
356
- 'filtered_title' => $evt->get_runtime( 'filtered_title' ),
357
- 'post_excerpt' => $evt->get_runtime( 'post_excerpt' ),
358
- 'color_style' => $evt->get_runtime( 'color_style' ),
359
- 'category_colors' => $evt->get_runtime( 'category_colors' ),
360
- 'permalink' => $evt->get_runtime( 'instance_permalink' ),
361
- 'ticket_url_label' => $evt->get_runtime( 'ticket_url_label' ),
362
- 'edit_post_link' => $evt->get_runtime( 'edit_post_link' ),
363
- 'short_start_time' => $evt->get_runtime( 'short_start_time' ),
364
- 'multiday_end_day' => $evt->get_runtime( 'multiday_end_day' ),
365
- 'start_day' => $evt->get_runtime( 'start_day' ),
366
- 'short_start_time' => $evt->get_runtime( 'short_start_time' ),
367
- 'instance_id' => $evt->get( 'instance_id' ),
368
- 'post_id' => $evt->get( 'post_id' ),
369
- 'is_allday' => $evt->is_allday(),
370
- 'is_multiday' => $evt->is_multiday(),
371
- 'venue' => $evt->get( 'venue' ),
372
- 'ticket_url' => $evt->get( 'ticket_url' ),
373
- 'start_truncated' => $evt->get( 'start_truncated' ),
374
- 'end_truncated' => $evt->get( 'end_truncated' ),
375
- 'popup_timespan' => $this->_registry
376
- ->get( 'twig.ai1ec-extension')->timespan( $evt, 'short' ),
377
- 'avatar' => $this->_registry
378
- ->get( 'twig.ai1ec-extension')->avatar(
379
- $evt,
380
- array(
381
- 'post_thumbnail',
382
- 'content_img',
383
- 'location_avatar',
384
- 'category_avatar',
385
- ),
386
- '',
387
- false ),
388
- );
389
- if (
390
- $this->_compatibility->use_backward_compatibility()
391
- ) {
392
- $event_data = $evt;
393
- }
394
- $events[] = $event_data;
395
- }
396
- $weeks[$week][] = array(
397
- 'date' => $i,
398
- 'date_link' => $this->_create_link_for_day_view( $exact_date ),
399
- 'today' =>
400
- $timestamp->format( 'Y' ) == $today->format( 'Y' ) &&
401
- $timestamp->format( 'm' ) == $today->format( 'm' ) &&
402
- $i == $today->format( 'j' ),
403
- 'events' => $events,
404
-
405
- );
406
- // If reached the end of the week, increment week
407
- if( count( $weeks[$week] ) == 7 )
408
- $week++;
409
- }
410
-
411
- // Insert any needed blank cells into last week
412
- for( $i = $last_cell_index + 1; $i < 7; $i++ ) {
413
- $weeks[$week][] = array( 'date' => null, 'events' => array() );
414
- }
415
-
416
- return $weeks;
417
- }
418
-
419
- /**
420
- * get_events_for_month function
421
- *
422
- * Return an array of all dates for the given month as an associative
423
- * array, with each element's value being another array of event objects
424
- * representing the events occuring on that date.
425
- *
426
- * @param int $time the UNIX timestamp of a date within the desired month
427
- * @param array $filter Array of filters for the events returned:
428
- * ['cat_ids'] => non-associatative array of category IDs
429
- * ['tag_ids'] => non-associatative array of tag IDs
430
- * ['post_ids'] => non-associatative array of post IDs
431
- * ['auth_ids'] => non-associatative array of author IDs
432
- *
433
- * @return array array of arrays as per function's description
434
- */
435
- protected function get_events_for_month(
436
- Ai1ec_Date_Time $time,
437
- $filter = array()
438
- ) {
439
- $last_day = $time->format( 't' );
440
-
441
- $day_entry = array(
442
- 'multi' => array(),
443
- 'allday' => array(),
444
- 'other' => array(),
445
- );
446
- $days_events = array_fill(
447
- 1,
448
- $last_day,
449
- $day_entry
450
- );
451
- unset( $day_entry );
452
- $start_time = $this->_registry->get( 'date.time', $time );
453
- $start_time->set_date(
454
- $time->format( 'Y' ),
455
- $time->format( 'm' ),
456
- 1
457
- )->set_time( 0, 0, 0 );
458
- $end_time = $this->_registry->get( 'date.time', $start_time );
459
-
460
- $end_time->adjust_month( 1 );
461
-
462
- $search = $this->_registry->get( 'model.search' );
463
- $month_events = $search->get_events_between(
464
- $start_time,
465
- $end_time,
466
- $filter,
467
- true
468
- );
469
- $start_time = $start_time->format();
470
- $end_time = $end_time->format();
471
- $this->_update_meta( $month_events );
472
- $this->_registry->get( 'controller.content-filter' )
473
- ->clear_the_content_filters();
474
- foreach ( $month_events as $event ) {
475
- $event_start = $event->get( 'start' )->format();
476
- $event_end = $event->get( 'end' )->format();
477
-
478
- /**
479
- * REASONING: we assume, that event spans multiple periods, one of
480
- * which happens to be current (month). Thus we mark, that current
481
- * event starts at the very first day of current month and further
482
- * we will mark it as having truncated beginning (unless it is not
483
- * overlapping period boundaries).
484
- * Although, if event starts after the first second of this period
485
- * it's start day will be decoded as time 'j' format (`int`-casted
486
- * to increase map access time), of it's actual start time.
487
- */
488
- $day = 1;
489
- if ( $event_start > $start_time ) {
490
- $day = (int)$event->get( 'start' )->format( 'j' );
491
- }
492
-
493
- // Set multiday properties. TODO: Should these be made event object
494
- // properties? They probably shouldn't be saved to the DB, so I'm
495
- // not sure. Just creating properties dynamically for now.
496
- if ( $event_start < $start_time ) {
497
- $event->set( 'start_truncated', true );
498
- }
499
- if ( $event_end >= $end_time ) {
500
- $event->set( 'end_truncated', true );
501
- }
502
-
503
- // Categorize event.
504
- $priority = 'other';
505
- if ( $event->is_allday() ) {
506
- $priority = 'allday';
507
- } elseif ( $event->is_multiday() ) {
508
- $priority = 'multi';
509
- }
510
- $this->_add_runtime_properties( $event );
511
- $days_events[$day][$priority][] = $event;
512
- }
513
- $this->_registry->get( 'controller.content-filter' )
514
- ->restore_the_content_filters();
515
- for ( $day = 1; $day <= $last_day; $day++ ) {
516
- $days_events[$day] = array_merge(
517
- $days_events[$day]['multi'],
518
- $days_events[$day]['allday'],
519
- $days_events[$day]['other']
520
- );
521
- }
522
-
523
- return apply_filters(
524
- 'ai1ec_get_events_for_month',
525
- $days_events,
526
- $time,
527
- $filter
528
- );
529
- }
530
-
531
- }
 
1
+ <?php
2
+
3
+ /**
4
+ * The concrete class for month view.
5
+ *
6
+ * @author Time.ly Network Inc.
7
+ * @since 2.0
8
+ *
9
+ * @package AI1EC
10
+ * @subpackage AI1EC.View
11
+ */
12
+ class Ai1ec_Calendar_View_Month extends Ai1ec_Calendar_View_Abstract {
13
+
14
+ /* (non-PHPdoc)
15
+ * @see Ai1ec_Calendar_View_Abstract::get_name()
16
+ */
17
+ public function get_name() {
18
+ return 'month';
19
+ }
20
+
21
+ /* (non-PHPdoc)
22
+ * @see Ai1ec_Calendar_View_Abstract::get_content()
23
+ */
24
+ public function get_content( array $view_args ) {
25
+ $date_system = $this->_registry->get( 'date.system' );
26
+ $settings = $this->_registry->get( 'model.settings' );
27
+ $defaults = array(
28
+ 'month_offset' => 0,
29
+ 'cat_ids' => array(),
30
+ 'auth_ids' => array(),
31
+ 'tag_ids' => array(),
32
+ 'post_ids' => array(),
33
+ 'instance_ids' => array(),
34
+ 'exact_date' => $date_system->current_time(),
35
+ );
36
+ $args = wp_parse_args( $view_args, $defaults );
37
+ $local_date = $this->_registry
38
+ ->get( 'date.time', $args['exact_date'], 'sys.default' );
39
+ $local_date->set_date(
40
+ $local_date->format( 'Y' ),
41
+ $local_date->format( 'm' ) + $args['month_offset'],
42
+ 1
43
+ )
44
+ ->set_time( 0, 0, 0 );
45
+
46
+ $days_events = $this->get_events_for_month(
47
+ $local_date,
48
+ apply_filters(
49
+ 'ai1ec_get_events_relative_to_filter',
50
+ array(
51
+ 'cat_ids' => $args['cat_ids'],
52
+ 'tag_ids' => $args['tag_ids'],
53
+ 'post_ids' => $args['post_ids'],
54
+ 'auth_ids' => $args['auth_ids'],
55
+ 'instance_ids' => $args['instance_ids'],
56
+ ),
57
+ $view_args,
58
+ apply_filters(
59
+ 'ai1ec_show_unique_events',
60
+ false
61
+ )
62
+ )
63
+ );
64
+ $cell_array = $this->get_month_cell_array(
65
+ $local_date,
66
+ $days_events
67
+ );
68
+ // Create pagination links.
69
+ $title = $local_date->format_i18n( 'F Y' );
70
+ $pagination_links = $this->_get_pagination( $args, $title );
71
+
72
+ $is_ticket_button_enabled = apply_filters(
73
+ 'ai1ec_month_ticket_button',
74
+ false
75
+ );
76
+
77
+ $view_args = array(
78
+ 'title' => $title,
79
+ 'type' => 'month',
80
+ 'weekdays' => $this->get_weekdays(),
81
+ 'cell_array' => $cell_array,
82
+ 'show_location_in_title' => $settings->get( 'show_location_in_title' ),
83
+ 'month_word_wrap' => $settings->get( 'month_word_wrap' ),
84
+ 'post_ids' => join( ',', $args['post_ids'] ),
85
+ 'data_type' => $args['data_type'],
86
+ 'is_ticket_button_enabled' => $is_ticket_button_enabled,
87
+ 'text_venue_separator' => __( '@ %s', AI1EC_PLUGIN_NAME ),
88
+ 'pagination_links' => $pagination_links,
89
+ );
90
+
91
+ // Add navigation if requested.
92
+ $view_args['navigation'] = $this->_get_navigation(
93
+ array(
94
+ 'no_navigation' => $args['no_navigation'],
95
+ 'pagination_links' => $pagination_links,
96
+ 'views_dropdown' => $args['views_dropdown'],
97
+ 'below_toolbar' => apply_filters(
98
+ 'ai1ec_below_toolbar',
99
+ '',
100
+ $this->get_name(),
101
+ $args
102
+ ),
103
+ )
104
+ );
105
+
106
+ $view_args = $this->get_extra_template_arguments( $view_args );
107
+
108
+ return
109
+ $this->_registry->get( 'http.request' )->is_json_required(
110
+ $args['request_format'], 'month'
111
+ )
112
+ ? $this->_apply_filters_to_args( $view_args )
113
+ : $this->_get_view( $view_args );
114
+ }
115
+
116
+ /**
117
+ * Returns a non-associative array of four links for the month view of the
118
+ * calendar:
119
+ * previous year, previous month, next month, and next year.
120
+ * Each element is an associative array containing the link's enabled status
121
+ * ['enabled'], CSS class ['class'], text ['text'] and value to assign to
122
+ * link's href ['href'].
123
+ *
124
+ * @param array $args Current request arguments
125
+ * @param string $title Title to display in datepicker button
126
+ *
127
+ * @return array Array of links
128
+ */
129
+ function get_month_pagination_links( $args, $title ) {
130
+ $links = array();
131
+
132
+ $local_date = $this->_registry
133
+ ->get( 'date.time', $args['exact_date'], 'sys.default' );
134
+ $orig_date = $this->_registry->get( 'date.time', $local_date );
135
+ $default_tz = $this->_registry->get( 'date.timezone' )->get_default_timezone();
136
+ // =================
137
+ // = Previous year =
138
+ // =================
139
+ // Align date to first of month, month offset applied, 1 year behind.
140
+ $local_date
141
+ ->set_timezone( $default_tz )
142
+ ->set_date(
143
+ $local_date->format( 'Y' ) -1,
144
+ $local_date->format( 'm' ) + $args['month_offset'],
145
+ 1
146
+ )
147
+ ->set_time( 0, 0, 0 );
148
+
149
+ $args['exact_date'] = $local_date->format();
150
+ $href = $this->_registry->get( 'html.element.href', $args );
151
+ $links[] = array(
152
+ 'enabled' => true,
153
+ 'class'=> 'ai1ec-prev-year',
154
+ 'text' => '<i class="ai1ec-fa ai1ec-fa-angle-double-left"></i> ' .
155
+ $local_date->format_i18n( 'Y' ),
156
+ 'href' => $href->generate_href(),
157
+ );
158
+
159
+ // ==================
160
+ // = Previous month =
161
+ // ==================
162
+ // Align date to first of month, month offset applied, 1 month behind.
163
+ $local_date
164
+ ->set_date(
165
+ $local_date->format( 'Y' ) + 1,
166
+ $local_date->format( 'm' ) - 1,
167
+ 1
168
+ );
169
+ $args['exact_date'] = $local_date->format();
170
+ $href = $this->_registry->get( 'html.element.href', $args );
171
+ $links[] = array(
172
+ 'enabled' => true,
173
+ 'class'=> 'ai1ec-prev-month',
174
+ 'text' => '<i class="ai1ec-fa ai1ec-fa-angle-left"></i> ' .
175
+ $local_date->format_i18n( 'M' ),
176
+ 'href' => $href->generate_href(),
177
+ );
178
+
179
+ // ======================
180
+ // = Minical datepicker =
181
+ // ======================
182
+ // Align date to first of month, month offset applied.
183
+
184
+ $orig_date
185
+ ->set_timezone('UTC')
186
+ ->set_date(
187
+ $orig_date->format( 'Y' ),
188
+ $orig_date->format( 'm' ) + $args['month_offset'],
189
+ 1
190
+ );
191
+ $args['exact_date'] = $orig_date->format();
192
+ $factory = $this->_registry->get( 'factory.html' );
193
+ $links[] = $factory->create_datepicker_link(
194
+ $args,
195
+ $args['exact_date'],
196
+ $title
197
+ );
198
+
199
+ // ==============
200
+ // = Next month =
201
+ // ==============
202
+ // Align date to first of month, month offset applied, 1 month ahead.
203
+ $orig_date
204
+ ->set_timezone( $default_tz )
205
+ ->set_date(
206
+ $orig_date->format( 'Y' ),
207
+ $orig_date->format( 'm' ) + 1,
208
+ 1
209
+ )
210
+ ->set_time( 0, 0, 0 );
211
+ $args['exact_date'] = $orig_date->format();
212
+ $href = $this->_registry->get( 'html.element.href', $args );
213
+ $links[] = array(
214
+ 'enabled' => true,
215
+ 'class'=> 'ai1ec-next-month',
216
+ 'text' => $orig_date->format_i18n( 'M' ) .
217
+ ' <i class="ai1ec-fa ai1ec-fa-angle-right"></i>',
218
+ 'href' => $href->generate_href(),
219
+ );
220
+
221
+ // =============
222
+ // = Next year =
223
+ // =============
224
+ // Align date to first of month, month offset applied, 1 year ahead.
225
+ $orig_date
226
+ ->set_date(
227
+ $orig_date->format( 'Y' ) + 1,
228
+ $orig_date->format( 'm' ) - 1,
229
+ 1
230
+ );
231
+ $args['exact_date'] = $orig_date->format();
232
+ $href = $this->_registry->get( 'html.element.href', $args );
233
+ $links[] = array(
234
+ 'enabled' => true,
235
+ 'class'=> 'ai1ec-next-year',
236
+ 'text' => $orig_date->format_i18n( 'Y' ) .
237
+ ' <i class="ai1ec-fa ai1ec-fa-angle-double-right"></i>',
238
+ 'href' => $href->generate_href(),
239
+ );
240
+
241
+ return $links;
242
+ }
243
+
244
+ /**
245
+ * get_weekdays function
246
+ *
247
+ * Returns a list of abbreviated weekday names starting on the configured
248
+ * week start day setting.
249
+ *
250
+ * @return array
251
+ */
252
+ protected function get_weekdays() {
253
+ $settings = $this->_registry->get( 'model.settings' );
254
+ static $weekdays;
255
+
256
+ if ( ! isset( $weekdays ) ) {
257
+ $time = $this->_registry->get(
258
+ 'date.time',
259
+ 'next Sunday',
260
+ 'sys.default'
261
+ );
262
+ $time->adjust_day( $settings->get( 'week_start_day' ) );
263
+
264
+ $weekdays = array();
265
+ for( $i = 0; $i < 7; $i++ ) {
266
+ $weekdays[] = $time->format_i18n( 'D' );
267
+ $time->adjust_day( 1 );// Add a day
268
+ }
269
+ }
270
+ return $weekdays;
271
+ }
272
+
273
+ /* (non-PHPdoc)
274
+ * @see Ai1ec_Calendar_View_Abstract::_add_view_specific_runtime_properties()
275
+ */
276
+ protected function _add_view_specific_runtime_properties(
277
+ Ai1ec_Event $event
278
+ ) {
279
+ $end_day = $this->_registry->get( 'date.time', $event->get( 'end' ) )
280
+ ->adjust( -1, 'second' )
281
+ ->format_i18n( 'd' );
282
+ $event->set_runtime( 'multiday_end_day', $end_day );
283
+ $event->set_runtime(
284
+ 'start_day',
285
+ $event->get( 'start' )->format( 'j' )
286
+ );
287
+ }
288
+
289
+ /**
290
+ * get_month_cell_array function
291
+ *
292
+ * Return an array of weeks, each containing an array of days, each
293
+ * containing the date for the day ['date'] (if inside the month) and
294
+ * the events ['events'] (if any) for the day, and a boolean ['today']
295
+ * indicating whether that day is today.
296
+ *
297
+ * @param int $timestamp UNIX timestamp of the 1st day of the desired
298
+ * month to display
299
+ * @param array $days_events list of events for each day of the month in
300
+ * the format returned by get_events_for_month()
301
+ *
302
+ * @return void
303
+ */
304
+ protected function get_month_cell_array( Ai1ec_Date_Time $timestamp, $days_events ) {
305
+ $settings = $this->_registry->get( 'model.settings' );
306
+ $date_system = $this->_registry->get( 'date.system' );
307
+ $today = $this->_registry->get( 'date.time' );// Used to flag today's cell
308
+
309
+ // Figure out index of first table cell
310
+ $first_cell_index = $timestamp->format( 'w' );
311
+ // Modify weekday based on start of week setting
312
+ $first_cell_index = ( 7 + $first_cell_index - $settings->get( 'week_start_day' ) ) % 7;
313
+
314
+ // Get the last day of the month
315
+ $last_day = $timestamp->format( 't' );
316
+ $last_timestamp = $this->_registry->get( 'date.time', $timestamp );
317
+ $last_timestamp->set_date(
318
+ $timestamp->format( 'Y' ),
319
+ $timestamp->format( 'm' ),
320
+ $last_day
321
+ )->set_time( 0, 0, 0 );
322
+ // Figure out index of last table cell
323
+ $last_cell_index = $last_timestamp->format( 'w' );
324
+ // Modify weekday based on start of week setting
325
+ $last_cell_index = ( 7 + $last_cell_index - $settings->get( 'week_start_day' ) ) % 7;
326
+
327
+ $weeks = array();
328
+ $week = 0;
329
+ $weeks[$week] = array();
330
+
331
+ // Insert any needed blank cells into first week
332
+ for( $i = 0; $i < $first_cell_index; $i++ ) {
333
+ $weeks[$week][] = array(
334
+ 'date' => null,
335
+ 'events' => array(),
336
+ 'date_link' => null
337
+ );
338
+ }
339
+
340
+ // Insert each month's day and associated events
341
+ for( $i = 1; $i <= $last_day; $i++ ) {
342
+ $day = $this->_registry->get( 'date.time' )
343
+ ->set_date(
344
+ $timestamp->format( 'Y' ),
345
+ $timestamp->format( 'm' ),
346
+ $i
347
+ )
348
+ ->set_time( 0, 0, 0 )
349
+ ->format();
350
+ $exact_date = $date_system->format_date_for_url(
351
+ $day,
352
+ $settings->get( 'input_date_format' )
353
+ );
354
+ $events = array();
355
+ foreach ( $days_events[$i] as $evt ){
356
+ $event_data = array(
357
+ 'filtered_title' => $evt->get_runtime( 'filtered_title' ),
358
+ 'post_excerpt' => $evt->get_runtime( 'post_excerpt' ),
359
+ 'color_style' => $evt->get_runtime( 'color_style' ),
360
+ 'category_colors' => $evt->get_runtime( 'category_colors' ),
361
+ 'permalink' => $evt->get_runtime( 'instance_permalink' ),
362
+ 'ticket_url_label' => $evt->get_runtime( 'ticket_url_label' ),
363
+ 'edit_post_link' => $evt->get_runtime( 'edit_post_link' ),
364
+ 'short_start_time' => $evt->get_runtime( 'short_start_time' ),
365
+ 'multiday_end_day' => $evt->get_runtime( 'multiday_end_day' ),
366
+ 'start_day' => $evt->get_runtime( 'start_day' ),
367
+ 'short_start_time' => $evt->get_runtime( 'short_start_time' ),
368
+ 'instance_id' => $evt->get( 'instance_id' ),
369
+ 'post_id' => $evt->get( 'post_id' ),
370
+ 'is_allday' => $evt->is_allday(),
371
+ 'is_multiday' => $evt->is_multiday(),
372
+ 'venue' => $evt->get( 'venue' ),
373
+ 'ticket_url' => $evt->get( 'ticket_url' ),
374
+ 'start_truncated' => $evt->get( 'start_truncated' ),
375
+ 'end_truncated' => $evt->get( 'end_truncated' ),
376
+ 'popup_timespan' => $this->_registry
377
+ ->get( 'twig.ai1ec-extension')->timespan( $evt, 'short' ),
378
+ 'avatar' => $this->_registry
379
+ ->get( 'twig.ai1ec-extension')->avatar(
380
+ $evt,
381
+ array(
382
+ 'post_thumbnail',
383
+ 'content_img',
384
+ 'location_avatar',
385
+ 'category_avatar',
386
+ ),
387
+ '',
388
+ false ),
389
+ );
390
+ if (
391
+ $this->_compatibility->use_backward_compatibility()
392
+ ) {
393
+ $event_data = $evt;
394
+ }
395
+ $events[] = $event_data;
396
+ }
397
+ $weeks[$week][] = array(
398
+ 'date' => $i,
399
+ 'date_link' => $this->_create_link_for_day_view( $exact_date ),
400
+ 'today' =>
401
+ $timestamp->format( 'Y' ) == $today->format( 'Y' ) &&
402
+ $timestamp->format( 'm' ) == $today->format( 'm' ) &&
403
+ $i == $today->format( 'j' ),
404
+ 'events' => $events,
405
+
406
+ );
407
+ // If reached the end of the week, increment week
408
+ if( count( $weeks[$week] ) == 7 )
409
+ $week++;
410
+ }
411
+
412
+ // Insert any needed blank cells into last week
413
+ for( $i = $last_cell_index + 1; $i < 7; $i++ ) {
414
+ $weeks[$week][] = array( 'date' => null, 'events' => array() );
415
+ }
416
+
417
+ return $weeks;
418
+ }
419
+
420
+ /**
421
+ * get_events_for_month function
422
+ *
423
+ * Return an array of all dates for the given month as an associative
424
+ * array, with each element's value being another array of event objects
425
+ * representing the events occuring on that date.
426
+ *
427
+ * @param int $time the UNIX timestamp of a date within the desired month
428
+ * @param array $filter Array of filters for the events returned:
429
+ * ['cat_ids'] => non-associatative array of category IDs
430
+ * ['tag_ids'] => non-associatative array of tag IDs
431
+ * ['post_ids'] => non-associatative array of post IDs
432
+ * ['auth_ids'] => non-associatative array of author IDs
433
+ *
434
+ * @return array array of arrays as per function's description
435
+ */
436
+ protected function get_events_for_month(
437
+ Ai1ec_Date_Time $time,
438
+ $filter = array()
439
+ ) {
440
+ $last_day = $time->format( 't' );
441
+
442
+ $day_entry = array(
443
+ 'multi' => array(),
444
+ 'allday' => array(),
445
+ 'other' => array(),
446
+ );
447
+ $days_events = array_fill(
448
+ 1,
449
+ $last_day,
450
+ $day_entry
451
+ );
452
+ unset( $day_entry );
453
+ $start_time = $this->_registry->get( 'date.time', $time );
454
+ $start_time->set_date(
455
+ $time->format( 'Y' ),
456
+ $time->format( 'm' ),
457
+ 1
458
+ )->set_time( 0, 0, 0 );
459
+ $end_time = $this->_registry->get( 'date.time', $start_time );
460
+
461
+ $end_time->adjust_month( 1 );
462
+
463
+ $search = $this->_registry->get( 'model.search' );
464
+ $month_events = $search->get_events_between(
465
+ $start_time,
466
+ $end_time,
467
+ $filter,
468
+ true
469
+ );
470
+ $start_time = $start_time->format();
471
+ $end_time = $end_time->format();
472
+ $this->_update_meta( $month_events );
473
+ $this->_registry->get( 'controller.content-filter' )
474
+ ->clear_the_content_filters();
475
+ foreach ( $month_events as $event ) {
476
+ $event_start = $event->get( 'start' )->format();
477
+ $event_end = $event->get( 'end' )->format();
478
+
479
+ /**
480
+ * REASONING: we assume, that event spans multiple periods, one of
481
+ * which happens to be current (month). Thus we mark, that current
482
+ * event starts at the very first day of current month and further
483
+ * we will mark it as having truncated beginning (unless it is not
484
+ * overlapping period boundaries).
485
+ * Although, if event starts after the first second of this period
486
+ * it's start day will be decoded as time 'j' format (`int`-casted
487
+ * to increase map access time), of it's actual start time.
488
+ */
489
+ $day = 1;
490
+ if ( $event_start > $start_time ) {
491
+ $day = (int)$event->get( 'start' )->format( 'j' );
492
+ }
493
+
494
+ // Set multiday properties. TODO: Should these be made event object
495
+ // properties? They probably shouldn't be saved to the DB, so I'm
496
+ // not sure. Just creating properties dynamically for now.
497
+ if ( $event_start < $start_time ) {
498
+ $event->set( 'start_truncated', true );
499
+ }
500
+ if ( $event_end >= $end_time ) {
501
+ $event->set( 'end_truncated', true );
502
+ }
503
+
504
+ // Categorize event.
505
+ $priority = 'other';
506
+ if ( $event->is_allday() ) {
507
+ $priority = 'allday';
508
+ } elseif ( $event->is_multiday() ) {
509
+ $priority = 'multi';
510
+ }
511
+ $this->_add_runtime_properties( $event );
512
+ $days_events[$day][$priority][] = $event;
513
+ }
514
+ $this->_registry->get( 'controller.content-filter' )
515
+ ->restore_the_content_filters();
516
+ for ( $day = 1; $day <= $last_day; $day++ ) {
517
+ $days_events[$day] = array_merge(
518
+ $days_events[$day]['multi'],
519
+ $days_events[$day]['allday'],
520
+ $days_events[$day]['other']
521
+ );
522
+ }
523
+
524
+ return apply_filters(
525
+ 'ai1ec_get_events_for_month',
526
+ $days_events,
527
+ $time,
528
+ $filter
529
+ );
530
+ }
531
+
532
+ }
public/admin/font/fontawesome-webfont.eot CHANGED
File without changes
public/admin/font/fontawesome-webfont.svg CHANGED
File without changes
public/admin/font/fontawesome-webfont.ttf CHANGED
File without changes
public/admin/font/fontawesome-webfont.woff CHANGED
File without changes
public/admin/img/ajax-loader-small.gif CHANGED
File without changes
public/admin/less/bootstrap/alerts.less CHANGED
File without changes
public/admin/less/bootstrap/badges.less CHANGED
File without changes
public/admin/less/bootstrap/bootstrap.less CHANGED
File without changes
public/admin/less/bootstrap/breadcrumbs.less CHANGED
File without changes
public/admin/less/bootstrap/button-groups.less CHANGED
File without changes
public/admin/less/bootstrap/buttons.less CHANGED
File without changes
public/admin/less/bootstrap/carousel.less CHANGED
File without changes
public/admin/less/bootstrap/close.less CHANGED
File without changes
public/admin/less/bootstrap/code.less CHANGED
File without changes
public/admin/less/bootstrap/component-animations.less CHANGED
File without changes
public/admin/less/bootstrap/dropdowns.less CHANGED
File without changes
public/admin/less/bootstrap/forms.less CHANGED
File without changes
public/admin/less/bootstrap/glyphicons.less CHANGED
File without changes
public/admin/less/bootstrap/grid.less CHANGED
File without changes
public/admin/less/bootstrap/input-groups.less CHANGED
File without changes
public/admin/less/bootstrap/jumbotron.less CHANGED
File without changes
public/admin/less/bootstrap/labels.less CHANGED
File without changes
public/admin/less/bootstrap/list-group.less CHANGED
File without changes
public/admin/less/bootstrap/media.less CHANGED
File without changes
public/admin/less/bootstrap/mixins.less CHANGED
File without changes
public/admin/less/bootstrap/modals.less CHANGED
File without changes
public/admin/less/bootstrap/navbar.less CHANGED
File without changes
public/admin/less/bootstrap/navs.less CHANGED
File without changes
public/admin/less/bootstrap/normalize.less CHANGED
File without changes
public/admin/less/bootstrap/pager.less CHANGED
File without changes
public/admin/less/bootstrap/pagination.less CHANGED
File without changes
public/admin/less/bootstrap/panels.less CHANGED
File without changes
public/admin/less/bootstrap/popovers.less CHANGED
File without changes
public/admin/less/bootstrap/print.less CHANGED
File without changes
public/admin/less/bootstrap/progress-bars.less CHANGED
File without changes
public/admin/less/bootstrap/responsive-utilities.less CHANGED
File without changes
public/admin/less/bootstrap/scaffolding.less CHANGED
File without changes
public/admin/less/bootstrap/tables.less CHANGED
File without changes
public/admin/less/bootstrap/theme.less CHANGED
File without changes
public/admin/less/bootstrap/thumbnails.less CHANGED
File without changes
public/admin/less/bootstrap/tooltip.less CHANGED
File without changes
public/admin/less/bootstrap/type.less CHANGED
File without changes
public/admin/less/bootstrap/utilities.less CHANGED
File without changes
public/admin/less/bootstrap/variables.less CHANGED
File without changes
public/admin/less/bootstrap/wells.less CHANGED
File without changes
public/admin/less/build-css.sh CHANGED
File without changes
public/admin/less/plugins/datepicker3.less CHANGED
File without changes
public/themes-ai1ec/vortex/font/ai1ec-icons.eot CHANGED
File without changes
public/themes-ai1ec/vortex/font/ai1ec-icons.svg CHANGED
File without changes
public/themes-ai1ec/vortex/font/ai1ec-icons.ttf CHANGED
File without changes
public/themes-ai1ec/vortex/font/ai1ec-icons.woff CHANGED
File without changes
public/themes-ai1ec/vortex/font/fontawesome-webfont.eot CHANGED
File without changes
public/themes-ai1ec/vortex/font/fontawesome-webfont.svg CHANGED
File without changes
public/themes-ai1ec/vortex/font/fontawesome-webfont.ttf CHANGED
File without changes
public/themes-ai1ec/vortex/font/fontawesome-webfont.woff CHANGED
File without changes
public/themes-ai1ec/vortex/img/ajax-loader-small.gif CHANGED
File without changes
public/themes-ai1ec/vortex/less/bootstrap/alerts.less CHANGED
File without changes
public/themes-ai1ec/vortex/less/bootstrap/badges.less CHANGED
File without changes
public/themes-ai1ec/vortex/less/bootstrap/bootstrap.less CHANGED
File without changes
public/themes-ai1ec/vortex/less/bootstrap/breadcrumbs.less CHANGED
File without changes
public/themes-ai1ec/vortex/less/bootstrap/button-groups.less CHANGED
File without changes
public/themes-ai1ec/vortex/less/bootstrap/buttons.less CHANGED
File without changes
public/themes-ai1ec/vortex/less/bootstrap/carousel.less CHANGED
File without changes
public/themes-ai1ec/vortex/less/bootstrap/close.less CHANGED
File without changes
public/themes-ai1ec/vortex/less/bootstrap/code.less CHANGED
File without changes
public/themes-ai1ec/vortex/less/bootstrap/component-animations.less CHANGED
File without changes
public/themes-ai1ec/vortex/less/bootstrap/dropdowns.less CHANGED
File without changes
public/themes-ai1ec/vortex/less/bootstrap/forms.less CHANGED
File without changes
public/themes-ai1ec/vortex/less/bootstrap/glyphicons.less CHANGED
File without changes
public/themes-ai1ec/vortex/less/bootstrap/grid.less CHANGED
File without changes
public/themes-ai1ec/vortex/less/bootstrap/input-groups.less CHANGED
File without changes
public/themes-ai1ec/vortex/less/bootstrap/jumbotron.less CHANGED
File without changes
public/themes-ai1ec/vortex/less/bootstrap/labels.less CHANGED
File without changes
public/themes-ai1ec/vortex/less/bootstrap/list-group.less CHANGED
File without changes
public/themes-ai1ec/vortex/less/bootstrap/media.less CHANGED
File without changes
public/themes-ai1ec/vortex/less/bootstrap/mixins.less CHANGED
File without changes
public/themes-ai1ec/vortex/less/bootstrap/modals.less CHANGED
File without changes
public/themes-ai1ec/vortex/less/bootstrap/navbar.less CHANGED
File without changes
public/themes-ai1ec/vortex/less/bootstrap/navs.less CHANGED
File without changes
public/themes-ai1ec/vortex/less/bootstrap/normalize.less CHANGED
File without changes
public/themes-ai1ec/vortex/less/bootstrap/pager.less CHANGED
File without changes
public/themes-ai1ec/vortex/less/bootstrap/pagination.less CHANGED
File without changes
public/themes-ai1ec/vortex/less/bootstrap/panels.less CHANGED
File without changes
public/themes-ai1ec/vortex/less/bootstrap/popovers.less CHANGED
File without changes
public/themes-ai1ec/vortex/less/bootstrap/print.less CHANGED
File without changes
public/themes-ai1ec/vortex/less/bootstrap/progress-bars.less CHANGED
File without changes
public/themes-ai1ec/vortex/less/bootstrap/responsive-utilities.less CHANGED
File without changes
public/themes-ai1ec/vortex/less/bootstrap/scaffolding.less CHANGED
File without changes
public/themes-ai1ec/vortex/less/bootstrap/tables.less CHANGED
File without changes
public/themes-ai1ec/vortex/less/bootstrap/theme.less CHANGED
File without changes
public/themes-ai1ec/vortex/less/bootstrap/thumbnails.less CHANGED
File without changes
public/themes-ai1ec/vortex/less/bootstrap/tooltip.less CHANGED
File without changes
public/themes-ai1ec/vortex/less/bootstrap/type.less CHANGED
File without changes
public/themes-ai1ec/vortex/less/bootstrap/utilities.less CHANGED
File without changes
public/themes-ai1ec/vortex/less/bootstrap/variables.less CHANGED
File without changes
public/themes-ai1ec/vortex/less/bootstrap/wells.less CHANGED
File without changes
public/themes-ai1ec/vortex/less/build-3rdparty-less.sh CHANGED
File without changes
public/themes-ai1ec/vortex/less/plugins/datepicker3.less CHANGED
File without changes
public/themes-ai1ec/vortex/less/plugins/timepicker.less CHANGED
File without changes
readme.txt CHANGED
@@ -5,7 +5,7 @@ calendar, ical, iCalendar, all-in-one, events sync, events widget,
5
  calendar widget
6
  Requires WordPress at least: 3.5
7
  Tested up to: 4.3
8
- Stable tag: 2.3.2
9
  License: GNU General Public License, version 3 (GPL-3.0)
10
 
11
  A calendar system with many views, upcoming events widget, color-coded
@@ -137,6 +137,9 @@ https://vimeo.com/135004810
137
 
138
  == Changelog ==
139
 
 
 
 
140
  = Version 2.3.2 =
141
  * Confirmed compatibility with WordPress 4.3
142
 
5
  calendar widget
6
  Requires WordPress at least: 3.5
7
  Tested up to: 4.3
8
+ Stable tag: 2.3.3
9
  License: GNU General Public License, version 3 (GPL-3.0)
10
 
11
  A calendar system with many views, upcoming events widget, color-coded
137
 
138
  == Changelog ==
139
 
140
+ = Version 2.3.3 =
141
+ * Fixed bug with month view navigation
142
+
143
  = Version 2.3.2 =
144
  * Confirmed compatibility with WordPress 4.3
145