From f446ba2fdde524fd5b4a8b1907a61b08f0e80e31 Mon Sep 17 00:00:00 2001 From: StevenDufresne Date: Wed, 6 Sep 2023 11:09:58 +0900 Subject: [PATCH] Update conditional inclusion logic for plugin. --- .../camptix-attendee-survey.php | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/public_html/wp-content/plugins/camptix-attendee-survey/camptix-attendee-survey.php b/public_html/wp-content/plugins/camptix-attendee-survey/camptix-attendee-survey.php index 785324fd1d..0df1f658ba 100644 --- a/public_html/wp-content/plugins/camptix-attendee-survey/camptix-attendee-survey.php +++ b/public_html/wp-content/plugins/camptix-attendee-survey/camptix-attendee-survey.php @@ -66,13 +66,10 @@ function load() { require_once get_includes_path() . 'admin-page.php'; } - if ( ! is_wordcamp_type( 'next-gen' ) ) { - return; + if ( is_wordcamp_type( 'next-gen' ) ) { + require_once get_includes_path() . 'cron.php'; + add_action( 'init', __NAMESPACE__ . '\activate_on_current_site' ); } - - require_once get_includes_path() . 'cron.php'; - - add_action( 'init', __NAMESPACE__ . '\maybe_activate_on_current_site' ); } /** @@ -80,13 +77,7 @@ function load() { * * @return void */ -function maybe_activate_on_current_site() { - - // Currently only running this for events that are next-gen. - if ( ! is_wordcamp_type( 'next-gen' ) ) { - return; - } - +function activate_on_current_site() { add_page(); add_email();