File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 66 *
77 * @package osi
88 */
9+
10+ if ( ! class_exists ( 'Sugar_Calendar \\Requirements_Check ' ) ) {
11+ add_action ('init ' , function () {
12+ wp_safe_redirect ( home_url () );
13+ exit ;
14+ });
15+ }
16+
917$ display_type = isset ( $ _GET ['event-display ' ] ) ? sanitize_text_field ( wp_unslash ( $ _GET ['event-display ' ] ) ) : '' ; // phpcs:ignore WordPress.Security.NonceVerification.Recommended
1018$ event_post_type_slug = sugar_calendar_get_event_post_type_id ();
1119
Original file line number Diff line number Diff line change @@ -329,8 +329,9 @@ function osi_add_block_editor_assets() {
329329/**
330330 * Load the Sugar Calendar compatibility file.
331331 */
332- require get_template_directory () . '/inc/sugar-calendar.php ' ;
333-
332+ if ( class_exists ( 'Sugar_Calendar \\Requirements_Check ' ) ) {
333+ require get_template_directory () . '/inc/sugar-calendar.php ' ;
334+ }
334335/**
335336 * Register the "Footer - Above credits" sidebar.
336337 *
Original file line number Diff line number Diff line change 88 exit ;
99}
1010
11+ if ( ! class_exists ( 'Sugar_Calendar \\Requirements_Check ' ) ) {
12+ exit ;
13+ }
14+
1115use Sugar_Calendar \AddOn \Ticketing \Common \Functions as Functions ;
1216use Sugar_Calendar \AddOn \Ticketing \Frontend \Single as Single ;
1317
Original file line number Diff line number Diff line change 1313 <?php get_template_part ( 'template-parts/header-featured-image ' ); ?>
1414
1515 <div class="entry-content post--content">
16- <?php if ( get_post_type () !== sugar_calendar_get_event_post_type_id () ) { ?>
16+ <?php
17+ $ sugar_cal_post_type_id = 'placeholder ' ;
18+ if ( class_exists ( 'Sugar_Calendar \\Requirements_Check ' ) ) {
19+ $ sugar_cal_post_type_id = sugar_calendar_get_event_post_type_id ();
20+ }
21+ if ( $ sugar_cal_post_type_id !== get_post_type () ) { ?>
1722
1823 <div class="entry-meta post--byline">
1924 <?php osi_posted_on (); ?>
Original file line number Diff line number Diff line change 1313 <?php get_template_part ( 'template-parts/header-featured-image ' ); ?>
1414
1515 <div class="entry-content post--content">
16- <?php if ( get_post_type () !== sugar_calendar_get_event_post_type_id () ) { ?>
16+ <?php
17+ $ sugar_cal_post_type_id = 'placeholder ' ;
18+ if ( class_exists ( 'Sugar_Calendar \\Requirements_Check ' ) ) {
19+ $ sugar_cal_post_type_id = sugar_calendar_get_event_post_type_id ();
20+ }
21+ if ( $ sugar_cal_post_type_id !== get_post_type () ) { ?>
1722
1823 <div class="entry-meta post--byline">
1924 <?php osi_posted_on (); ?>
You can’t perform that action at this time.
0 commit comments