summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/jetpack/modules/shortcodes/upcoming-events.php')
-rw-r--r--plugins/jetpack/modules/shortcodes/upcoming-events.php36
1 files changed, 0 insertions, 36 deletions
diff --git a/plugins/jetpack/modules/shortcodes/upcoming-events.php b/plugins/jetpack/modules/shortcodes/upcoming-events.php
deleted file mode 100644
index 02f6dda1..00000000
--- a/plugins/jetpack/modules/shortcodes/upcoming-events.php
+++ /dev/null
@@ -1,36 +0,0 @@
-<?php
-
-/**
- * Most of the heavy lifting done in iCalendarReader class
- */
-class Upcoming_Events_Shortcode {
-
- public static function init() {
- add_shortcode( 'upcomingevents', array( __CLASS__, 'shortcode' ) );
- }
-
- public static function shortcode( $atts = array() ) {
- jetpack_require_lib( 'icalendar-reader' );
- $atts = shortcode_atts(
- array(
- 'url' => '',
- 'number' => 0,
- ),
- $atts,
- 'upcomingevents'
- );
- $args = array(
- 'context' => 'shortcode',
- 'number' => absint( $atts['number'] ),
- );
- $events = icalendar_render_events( $atts['url'], $args );
-
- if ( ! $events ) {
- $events = sprintf( '<p>%s</p>', __( 'No upcoming events', 'jetpack' ) );
- }
-
- return $events;
- }
-}
-
-add_action( 'plugins_loaded', array( 'Upcoming_Events_Shortcode', 'init' ), 101 );