PluginProbe
Event Post / 6.1.2
Event Post v6.1.2
6.1.2 6.1.1 6.1.0 6.0.1 6.0.0 5.12.0 trunk 3.9 4.0 4.2 4.3 4.4 4.5 5.0 5.1 5.10.0 5.10.1 5.10.2 5.10.3 5.10.4 5.11.0 5.11.1 5.2 5.5 5.6 All 47 releases
← All changes | inc/class-shortcodes.php +14 -3 6.0.0 → 6.1.2 View file →
@@ -2,9 +2,9 @@
2 2 /**
3 3 * Implements all shortcodes features
4 4 *
5 5 * @package event-post
6 - * @version 6.0.0
6 + * @version 6.1.2
7 7 * @since 5.0.0
8 8 */
9 9
10 10 namespace EventPost;
@@ -201,9 +201,12 @@
201 201 */
202 202 public function shortcode_timeline($_atts, $content='', $block=null) {
203 203 $atts = shortcode_atts(apply_filters('eventpost_params', array(
204 204 // Filters
205 - 'nb' => 0,
205 + 'nb' => 3,
206 + 'nb_desktop' => 0,
207 + 'nb_tablet' => 0,
208 + 'nb_mobile' => 0,
206 209 'future' => true,
207 210 'past' => false,
208 211 'geo' => 0,
209 212 'cat' => '',
@@ -223,14 +226,19 @@
223 226 'container_schema' => EventPost()->timeline_shema['container'],
224 227 'item_schema' => EventPost()->timeline_shema['item'],
225 228 'className' => '',
226 229 'order' => 'ASC',
230 + 'direction' => 'horizontal',
227 231 'separate_years' => false,
228 232 'separate_months' => false,
233 + 'size' => 2,
234 + 'color' => '#000000',
229 235 ), 'shortcode_list'), $_atts);
230 236
231 - $atts['className'] .= ' direction-'.$_atts['direction'];
237 + $atts['className'] .= ' direction-'.$atts['direction'];
232 238
239 + wp_enqueue_script('event-post-timeline');
240 +
233 241 if ($atts['container_schema'] != EventPost()->timeline_shema['container'])
234 242 $atts['container_schema'] = html_entity_decode($atts['container_schema']);
235 243 if ($atts['item_schema'] != EventPost()->timeline_shema['item'])
236 244 $atts['item_schema'] = html_entity_decode($atts['item_schema']);
@@ -318,8 +326,9 @@
318 326 'cat' => '',
319 327 'mondayfirst' => 0, // 1 : weeks starts on monday
320 328 'display_title' => 0,
321 329 'datepicker' => 1,
330 + 'swipe' => false,
322 331 'tax_name' => '',
323 332 'tax_term' => '',
324 333 'thumbnail' => '',
325 334 'align' => '',
@@ -331,8 +340,9 @@
331 340 'cat' => sanitize_text_field($atts['cat']),
332 341 'mondayfirst' => intval($atts['mondayfirst']),
333 342 'display_title' => intval($atts['display_title']),
334 343 'datepicker' => intval($atts['datepicker']),
344 + 'swipe' => intval($atts['swipe']),
335 345 'tax_name' => sanitize_text_field($atts['tax_name']),
336 346 'tax_term' => sanitize_text_field($atts['tax_term']),
337 347 'thumbnail' => sanitize_text_field($atts['thumbnail']),
338 348 'className' => esc_attr($atts['className']),
@@ -351,8 +361,9 @@
351 361 data-date="' . esc_attr($date) . '"
352 362 data-mf="' . esc_attr($mondayfirst) . '"
353 363 data-dp="' . esc_attr($datepicker) . '"
354 364 data-title="'. esc_attr($display_title) .'"
365 + data-swipe="'. esc_attr($swipe) .'"
355 366 >'
356 367 . wp_kses_post(EventPost()->calendar($atts))
357 368 . '</div>';
358 369 }