Skip to content

Commit 4c95352

Browse files
authored
Merge pull request #68 from OpenSourceOrg/merge/pr_66_to_dev
Second try for autodeployment
2 parents 65978c8 + f241c9d commit 4c95352

5 files changed

Lines changed: 10 additions & 4 deletions

File tree

themes/osi/archive-sc_event.php

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,12 @@
88
*/
99

1010
if ( ! class_exists( 'Sugar_Calendar\\Requirements_Check' ) ) {
11-
add_action('init', function() {
12-
wp_safe_redirect( home_url() );
13-
exit;
14-
});
11+
add_action('init',
12+
function() {
13+
wp_safe_redirect( home_url() );
14+
exit;
15+
}
16+
);
1517
}
1618

1719
$display_type = isset( $_GET['event-display'] ) ? sanitize_text_field( wp_unslash( $_GET['event-display'] ) ) : ''; // phpcs:ignore WordPress.Security.NonceVerification.Recommended

themes/osi/functions.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -315,6 +315,7 @@ function osi_add_block_editor_assets() {
315315
if ( class_exists( 'Sugar_Calendar\\Requirements_Check' ) ) {
316316
require get_template_directory() . '/inc/sugar-calendar.php';
317317
}
318+
318319
/**
319320
* Register the "Footer - Above credits" sidebar.
320321
*/

themes/osi/inc/sugar-calendar.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
exit;
99
}
1010

11+
// Exit if Sugar Calendar isn't active
1112
if ( ! class_exists( 'Sugar_Calendar\\Requirements_Check' ) ) {
1213
exit;
1314
}

themes/osi/template-parts/content-press-mentions.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
<div class="entry-content post--content">
1616
<?php
1717
$sugar_cal_post_type_id = 'placeholder';
18+
1819
if ( class_exists( 'Sugar_Calendar\\Requirements_Check' ) ) {
1920
$sugar_cal_post_type_id = sugar_calendar_get_event_post_type_id();
2021
}

themes/osi/template-parts/content.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
<div class="entry-content post--content">
1616
<?php
1717
$sugar_cal_post_type_id = 'placeholder';
18+
1819
if ( class_exists( 'Sugar_Calendar\\Requirements_Check' ) ) {
1920
$sugar_cal_post_type_id = sugar_calendar_get_event_post_type_id();
2021
}

0 commit comments

Comments
 (0)