chore: uninstall cleanup, WP readme
This commit is contained in:
+28
@@ -0,0 +1,28 @@
|
|||||||
|
=== CF7 Spam → Telegram ===
|
||||||
|
Contributors: vbryzgalov
|
||||||
|
Tags: contact-form-7, telegram, spam, flamingo
|
||||||
|
Requires at least: 6.0
|
||||||
|
Tested up to: 6.9
|
||||||
|
Requires PHP: 7.4
|
||||||
|
Stable tag: 1.0.0
|
||||||
|
License: GPLv2 or later
|
||||||
|
|
||||||
|
Пересылает в Telegram-группу submissions CF7, помеченные как спам, с эвристической оценкой «похоже клиент / неясно / похоже спам».
|
||||||
|
|
||||||
|
== Description ==
|
||||||
|
|
||||||
|
Решает узкую задачу: среди отсечённого Akismet/Honeypot спама иногда встречаются реальные заявки клиентов. Плагин пересылает всё содержимое таких submissions в общую TG-группу с пометкой классификации (🟢/🟡/🔴), причиной попадания в спам, IP/UA, UTM.
|
||||||
|
|
||||||
|
Требует установленных плагинов Contact Form 7 и Flamingo.
|
||||||
|
|
||||||
|
== Installation ==
|
||||||
|
|
||||||
|
1. Загрузите папку `cf7-spam-to-telegram` в `/wp-content/plugins/`.
|
||||||
|
2. Активируйте плагин в меню «Плагины».
|
||||||
|
3. Откройте «Настройки → CF7 Spam → TG», укажите Bot Token и Chat ID группы, сохраните.
|
||||||
|
4. Нажмите «Отправить тестовое сообщение», чтобы проверить.
|
||||||
|
|
||||||
|
== Changelog ==
|
||||||
|
|
||||||
|
= 1.0.0 =
|
||||||
|
* Первый релиз.
|
||||||
@@ -0,0 +1,21 @@
|
|||||||
|
<?php
|
||||||
|
// If uninstall not called from WordPress, exit.
|
||||||
|
if (!defined('WP_UNINSTALL_PLUGIN')) exit;
|
||||||
|
|
||||||
|
global $wpdb;
|
||||||
|
$table = $wpdb->prefix . 'cf7stg_queue';
|
||||||
|
$wpdb->query("DROP TABLE IF EXISTS {$table}");
|
||||||
|
|
||||||
|
$options = [
|
||||||
|
'cf7stg_bot_token_enc',
|
||||||
|
'cf7stg_chat_id',
|
||||||
|
'cf7stg_site_title',
|
||||||
|
'cf7stg_last_test',
|
||||||
|
'cf7stg_db_version',
|
||||||
|
];
|
||||||
|
foreach ($options as $opt) {
|
||||||
|
delete_option($opt);
|
||||||
|
}
|
||||||
|
|
||||||
|
wp_clear_scheduled_hook('cf7stg_dispatch');
|
||||||
|
wp_clear_scheduled_hook('cf7stg_cleanup');
|
||||||
Reference in New Issue
Block a user