' . esc_html__( 'An older copy of Spam Eater (in the "spam-eater" folder) is still active, so AccessNow Spam Eater is waiting. Deactivate the older copy: AccessNow Spam Eater takes over with the same settings.', 'accessnow-spam-eater' ); if ( is_plugin_active( $old ) ) { $url = wp_nonce_url( admin_url( 'plugins.php?action=deactivate&plugin=' . rawurlencode( $old ) ), 'deactivate-plugin_' . $old ); echo ' ' . esc_html__( 'Deactivate the older copy', 'accessnow-spam-eater' ) . ''; } echo '

'; } ); return; } unset( $accessnow_spam_eater_old_copy ); define( 'ACCESSNOW_SPAM_EATER_VERSION', '3.0.0' ); define( 'ACCESSNOW_SPAM_EATER_FILE', __FILE__ ); define( 'ACCESSNOW_SPAM_EATER_DIR', plugin_dir_path( __FILE__ ) ); // Help and support links (includes/support-links.php). The wordpress.org slug stays empty until // the plugin is listed: until then its forum and listing do not exist. define( 'ACCESSNOW_SPAM_EATER_HELP_URL', 'https://support.accessnow.com.au/help/workspace-accessnow/accessnow-spam-eater' ); define( 'ACCESSNOW_SPAM_EATER_PROJECT_URL', 'https://www.accessnow.com.au/projects/spam-eater/' ); define( 'ACCESSNOW_SPAM_EATER_WPORG_SLUG', '' ); /* * The checks shared with Spam Eater for PHP forms (github.com/scratchy-76/spam-eater-php, MIT), * copied in by bin/sync-engine.sh. A site that already loads that package through Composer * keeps its own copy: declaring the classes twice would stop the site. */ foreach ( array( 'Ip', 'Content', 'Tokens' ) as $accessnow_spam_eater_class ) { if ( ! class_exists( 'AccessNow\\SpamEater\\' . $accessnow_spam_eater_class ) ) { require_once ACCESSNOW_SPAM_EATER_DIR . 'includes/engine/' . $accessnow_spam_eater_class . '.php'; } } unset( $accessnow_spam_eater_class ); require_once ACCESSNOW_SPAM_EATER_DIR . 'includes/class-plugin.php'; require_once ACCESSNOW_SPAM_EATER_DIR . 'includes/class-dashboard.php'; require_once ACCESSNOW_SPAM_EATER_DIR . 'includes/api.php'; require_once ACCESSNOW_SPAM_EATER_DIR . 'includes/support-links.php'; \AccessNow\SpamEater\Plugin::instance(); if ( defined( 'WP_CLI' ) && WP_CLI ) { require_once ACCESSNOW_SPAM_EATER_DIR . 'includes/class-cli.php'; \AccessNow\SpamEater\CLI::register(); } // Deactivating stops the weekly summary; it is scheduled again on the next visit to wp-admin. register_deactivation_hook( __FILE__, function () { wp_clear_scheduled_hook( 'accessnow_spam_eater_weekly_summary' ); } );