Skip to content

Commit

Permalink
Update conditional inclusion logic for plugin.
Browse files Browse the repository at this point in the history
  • Loading branch information
StevenDufresne committed Sep 6, 2023
1 parent f72f387 commit f446ba2
Showing 1 changed file with 4 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -66,27 +66,18 @@ 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' );
}

/**
* The activation routine for a single site.
*
* @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();

Expand Down

0 comments on commit f446ba2

Please sign in to comment.