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.php21
1 files changed, 18 insertions, 3 deletions
diff --git a/plugins/jetpack/modules/shortcodes/upcoming-events.php b/plugins/jetpack/modules/shortcodes/upcoming-events.php
index 02f6dda1..69ef9bda 100644
--- a/plugins/jetpack/modules/shortcodes/upcoming-events.php
+++ b/plugins/jetpack/modules/shortcodes/upcoming-events.php
@@ -1,14 +1,30 @@
-<?php
+<?php // phpcs:ignore WordPress.Files.FileName.InvalidClassFileName
/**
- * Most of the heavy lifting done in iCalendarReader class
+ * Display a list of upcoming events from a calendar.
+ *
+ * @package Jetpack
+ */
+
+/**
+ * Register a upcomingevents shortcode.
+ * Most of the heavy lifting done in iCalendarReader class,
+ * where the icalendar_render_events() function controls the display.
*/
class Upcoming_Events_Shortcode {
+ /**
+ * Register things.
+ */
public static function init() {
add_shortcode( 'upcomingevents', array( __CLASS__, 'shortcode' ) );
}
+ /**
+ * Register the shortcode.
+ *
+ * @param array $atts Shortcode attributes.
+ */
public static function shortcode( $atts = array() ) {
jetpack_require_lib( 'icalendar-reader' );
$atts = shortcode_atts(
@@ -32,5 +48,4 @@ class Upcoming_Events_Shortcode {
return $events;
}
}
-
add_action( 'plugins_loaded', array( 'Upcoming_Events_Shortcode', 'init' ), 101 );