| @@ -5,8 +5,12 @@ | ||
| 5 | 5 | * |
| 6 | 6 | * @package automattic/jetpack |
| 7 | 7 | */ |
| 8 | 8 | |
| 9 | +if ( ! defined( 'ABSPATH' ) ) { | |
| 10 | + exit( 0 ); | |
| 11 | +} | |
| 12 | + | |
| 9 | 13 | /** |
| 10 | 14 | * Register a upcomingevents shortcode. |
| 11 | 15 | * Most of the heavy lifting done in iCalendarReader class, |
| 12 | 16 | * where the icalendar_render_events() function controls the display. |
| @@ -62,5 +66,5 @@ | ||
| 62 | 66 | private static function no_upcoming_event_text() { |
| 63 | 67 | return sprintf( '<p>%s</p>', __( 'No upcoming events', 'jetpack' ) ); |
| 64 | 68 | } |
| 65 | 69 | } |
| 66 | -add_action( 'plugins_loaded', array( 'Upcoming_Events_Shortcode', 'init' ), 101 ); | |
| 70 | +add_action( 'after_setup_theme', array( 'Upcoming_Events_Shortcode', 'init' ), 2 ); | |