31 lines
951 B
PHP
31 lines
951 B
PHP
<?php
|
|
/**
|
|
* Plugin Name: CF7 Spam → Telegram
|
|
* Description: Пересылает spam-заявки Contact Form 7 в Telegram-группу с эвристической оценкой.
|
|
* Version: 1.1.0
|
|
* Author: Vladimir Bryzgalov
|
|
* Requires PHP: 7.4
|
|
* Requires at least: 6.0
|
|
* License: GPLv2 or later
|
|
* Text Domain: cf7-spam-to-telegram
|
|
*/
|
|
|
|
declare(strict_types=1);
|
|
|
|
if (!defined('ABSPATH')) exit;
|
|
|
|
define('CF7STG_PLUGIN_FILE', __FILE__);
|
|
define('CF7STG_PLUGIN_DIR', plugin_dir_path(__FILE__));
|
|
define('CF7STG_PLUGIN_URL', plugin_dir_url(__FILE__));
|
|
define('CF7STG_VERSION', '1.1.0');
|
|
|
|
require_once CF7STG_PLUGIN_DIR . 'includes/class-plugin.php';
|
|
\Cf7stg\Plugin::register_autoloader();
|
|
|
|
register_activation_hook(__FILE__, ['\\Cf7stg\\Activator', 'activate']);
|
|
register_deactivation_hook(__FILE__, ['\\Cf7stg\\Activator', 'deactivate']);
|
|
|
|
add_action('plugins_loaded', static function (): void {
|
|
\Cf7stg\Plugin::instance()->boot();
|
|
});
|