From d6b89887fcc380b80e6a887e5042c9feaa9aea85 Mon Sep 17 00:00:00 2001 From: Marcus Quinn <6428977+marcusquinn@users.noreply.github.com> Date: Thu, 10 Apr 2025 00:15:16 +0100 Subject: [PATCH] Add instructional notification for users (v1.3.1) --- CHANGELOG.md | 6 ++++++ README.md | 7 ++++++- plugin-reference-cleaner.php | 15 ++++++++++++++- readme.txt | 7 ++++++- 4 files changed, 32 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0e5ae4b..5fcb281 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,12 @@ All notable changes to this project will be documented in this file. +## [1.3.1] - 2023-10-05 +### Added +- Instructional notification explaining how to use the plugin +- Step-by-step guidance for removing plugin references +- Clear visual indicators for missing plugins + ## [1.3.0] - 2023-10-05 ### Changed - Complete redesign for maximum compatibility with all WordPress themes diff --git a/README.md b/README.md index 95a758f..4ea8d20 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # Plugin Reference Cleaner Author: Marcus Quinn Author URI: https://www.wpallstars.com -Version: 1.3.0 +Version: 1.3.1 License: GPL-2.0+ ## Description @@ -47,6 +47,11 @@ If you don't have this notification perpetually showing on your /wp-admin/plugin ## Changelog +### 1.3.1 +* Added instructional notification explaining how to use the plugin +* Improved user guidance with step-by-step instructions +* Enhanced visual identification of missing plugins + ### 1.3.0 * Complete redesign for maximum compatibility with all WordPress themes * Now adds missing plugins directly to the plugins list table diff --git a/plugin-reference-cleaner.php b/plugin-reference-cleaner.php index 8de4c7a..7f58730 100644 --- a/plugin-reference-cleaner.php +++ b/plugin-reference-cleaner.php @@ -2,7 +2,7 @@ /* * Plugin Name: Plugin Reference Cleaner * Description: Adds a "Remove Reference" button to plugin deactivation error notices, allowing users to clean up invalid plugin entries. - * Version: 1.3.0 + * Version: 1.3.1 * Author: Marcus Quinn * Author URI: https://www.wpallstars.com * License: GPL-2.0+ @@ -150,6 +150,19 @@ class Plugin_Reference_Cleaner { return; } + // Get invalid plugins + $invalid_plugins = $this->get_invalid_plugins(); + + // Display instructional notice if there are invalid plugins + if (!empty($invalid_plugins)) { + echo '
Missing plugin files detected: The plugins listed below with (File Missing) tag no longer exist but are still referenced in your database.
'; + echo 'How to fix: Click the "Remove Reference" link next to each missing plugin to safely remove it from your active plugins list.
'; + echo 'This will clean up your database and remove the error notifications.
'; + echo 'Plugin reference removed successfully.