From 0a42e002995f95691a03b26313461b3a1de27e8d Mon Sep 17 00:00:00 2001 From: Javier Casares Date: Mon, 9 Feb 2026 12:00:11 +0000 Subject: [PATCH] v2.1.0 --- changelog.txt | 6 ++++ readme.txt | 4 +-- robotstxt-smtp-newsletter.php | 4 +-- uninstall.php | 59 +++++------------------------------ update.json | 19 +++++++++-- 5 files changed, 34 insertions(+), 58 deletions(-) diff --git a/changelog.txt b/changelog.txt index c27954e..356a8a7 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,3 +1,9 @@ += 2.1.0 = + +* Changed uninstall behavior: plugin no longer performs cleanup on uninstall, all data cleanup is now handled by the core SMTP plugin. +* This ensures Newsletter configuration is preserved when only the add-on is removed, and properly cleaned when the core plugin is uninstalled. +* Simplified uninstall.php to delegate all cleanup responsibility to core SMTP plugin. + = 2.0.1 = * Removed Network requirement from plugin headers to allow single-site activation. diff --git a/readme.txt b/readme.txt index 45ec4e1..3d87093 100644 --- a/readme.txt +++ b/readme.txt @@ -2,9 +2,9 @@ Contributors: robotstxt Tags: newsletter, smtp, email, bulk, amazonses Requires at least: 4.7 -Tested up to: 6.7 +Tested up to: 6.9 Requires PHP: 7.2 -Stable tag: 1.0.0 +Stable tag: 2.1.0 License: GPLv2 or later License URI: https://www.gnu.org/licenses/gpl-2.0.html diff --git a/robotstxt-smtp-newsletter.php b/robotstxt-smtp-newsletter.php index 690a8ab..d47e48d 100644 --- a/robotstxt-smtp-newsletter.php +++ b/robotstxt-smtp-newsletter.php @@ -3,7 +3,7 @@ * Plugin Name: Newsletter - SMTP (by ROBOTSTXT) * Plugin URI: https://git.robotstxt.es/ROBOTSTXT/robotstxt-smtp-newsletter * Description: Integrates ROBOTSTXT SMTP configuration with Newsletter plugin for efficient bulk email delivery with SMTPKeepAlive support. - * Version: 2.0.1 + * Version: 2.1.0 * Requires at least: 4.7 * Requires PHP: 7.2 * Security: robotstxt@robotstxt.es @@ -25,7 +25,7 @@ if ( ! defined( 'ABSPATH' ) ) { } // Plugin constants. -define( 'ROBOTSTXT_SMTP_NEWSLETTER_VERSION', '2.0.1' ); +define( 'ROBOTSTXT_SMTP_NEWSLETTER_VERSION', '2.1.0' ); define( 'ROBOTSTXT_SMTP_NEWSLETTER_FILE', __FILE__ ); define( 'ROBOTSTXT_SMTP_NEWSLETTER_PATH', plugin_dir_path( __FILE__ ) ); define( 'ROBOTSTXT_SMTP_NEWSLETTER_URL', plugin_dir_url( __FILE__ ) ); diff --git a/uninstall.php b/uninstall.php index a55a8f3..88dfb7d 100644 --- a/uninstall.php +++ b/uninstall.php @@ -2,8 +2,13 @@ /** * Uninstall script for Newsletter - SMTP (by ROBOTSTXT). * - * This file is called when the plugin is deleted via WordPress admin. - * It removes all plugin data from the database. + * This add-on does not perform any cleanup on uninstall. All data cleanup + * (including Newsletter plugin options) is handled by the core SMTP plugin + * when it is uninstalled. + * + * This ensures that: + * - If only the Newsletter add-on is removed, the configuration remains intact + * - If the core SMTP plugin is removed, all data (including add-on data) is cleaned up * * @package ROBOTSTXT_SMTP_Newsletter */ @@ -13,52 +18,4 @@ if ( ! defined( 'WP_UNINSTALL_PLUGIN' ) ) { exit; } -/** - * Delete plugin options and transients. - * - * @param int $site_id Site ID (for multisite). - * @return void - */ -function robotstxt_smtp_newsletter_delete_site_data( $site_id = null ) { - // Switch to site if multisite. - if ( is_multisite() && $site_id ) { - switch_to_blog( $site_id ); - } - - // Delete plugin options. - delete_option( 'robotstxt_smtp_newsletter_options' ); - - // Delete updater cache transients. - $plugin_basename = 'robotstxt-smtp-newsletter/robotstxt-smtp-newsletter.php'; - $cache_key = 'robotstxt_updater_' . md5( $plugin_basename ); - delete_site_transient( $cache_key ); - - // Restore current blog if multisite. - if ( is_multisite() && $site_id ) { - restore_current_blog(); - } -} - -// Single site installation. -if ( ! is_multisite() ) { - robotstxt_smtp_newsletter_delete_site_data(); -} else { - // Multisite installation. - global $wpdb; - - // Get all blog IDs. - $blog_ids = $wpdb->get_col( "SELECT blog_id FROM {$wpdb->blogs}" ); - - // Delete data for each site. - foreach ( $blog_ids as $blog_id ) { - robotstxt_smtp_newsletter_delete_site_data( $blog_id ); - } - - // Delete network-wide updater cache. - $plugin_basename = 'robotstxt-smtp-newsletter/robotstxt-smtp-newsletter.php'; - $cache_key = 'robotstxt_updater_' . md5( $plugin_basename ); - delete_site_transient( $cache_key ); -} - -// Clear WordPress update cache to remove our plugin from the list. -delete_site_transient( 'update_plugins' ); +// No cleanup needed - handled by core SMTP plugin uninstall. diff --git a/update.json b/update.json index 4b7776d..eaaebc5 100644 --- a/update.json +++ b/update.json @@ -1,13 +1,26 @@ { "name": "Newsletter - SMTP (by ROBOTSTXT)", "slug": "robotstxt-smtp-newsletter", - "version": "2.0.1", + "version": "2.1.0", "author": "ROBOTSTXT", "homepage": "https://git.robotstxt.es/ROBOTSTXT/robotstxt-smtp-newsletter", - "download_url": "https://git.robotstxt.es/ROBOTSTXT/robotstxt-smtp-newsletter/releases/download/2.0.1/robotstxt-smtp-newsletter-2.0.1.zip", + "download_url": "https://git.robotstxt.es/ROBOTSTXT/robotstxt-smtp-newsletter/releases/download/2.1.0/robotstxt-smtp-newsletter-2.1.0.zip", "requires": "4.7", "tested": "6.9", "requires_php": "7.2", + "last_updated": "2026-02-09", "description": "Integrates ROBOTSTXT SMTP configuration with Newsletter plugin for efficient bulk email delivery with SMTPKeepAlive support. Achieves 20-30x faster bulk sending compared to standard wp_mail().", - "changelog": "

2.0.1 - 2026-01-29

2.0.0 - 2026-01-29

1.0.0 - 2026-01-29

" + "changelog": "

2.1.0 - 2026-02-09

2.0.1 - 2026-01-29

2.0.0 - 2026-01-29

1.0.0 - 2026-01-29

", + "sections": { + "description": "Integrates ROBOTSTXT SMTP configuration with Newsletter plugin for efficient bulk email delivery with SMTPKeepAlive support. Achieves 20-30x faster bulk sending compared to standard wp_mail().", + "changelog": "

2.1.0 - 2026-02-09

2.0.1 - 2026-01-29

2.0.0 - 2026-01-29

1.0.0 - 2026-01-29

" + }, + "banners": { + "low": "", + "high": "" + }, + "icons": { + "1x": "", + "2x": "" + } }