=== Vanguard Admin Protection & Notifications ===
Contributors: luisescoffie
Tags: security, admin, protection, audit, notifications
Requires at least: 6.9
Tested up to: 6.9
Requires PHP: 7.4
Stable tag: 4.0.4
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Donate Link: https://paypal.me/luisescoffie?locale.x=es_XC&country.x=MX

Advanced protection against unauthorized administrator creation, role changes, and direct database access.

== Description ==

Vanguard Admin Protection & Notifications is a vital and strict security plugin for WordPress that shields your site against vulnerabilities, malicious plugins, and direct database access attempts to escalate privileges or create unauthorized administrator users.

**MAIN FEATURES:**
* **RESTRICTED ADMINISTRATORS:** Delegate administrator access safely! Allow your team to manage plugins, themes, and content, while strictly blocking their ability to create or promote new administrators.
* 6 Real-time protection levels against privilege escalation.
* Strict WP-CLI blocking for user creation and updates.
* **Configurable Scan Frequency:** Adjust the database integrity scan interval to 30 minutes, 1, 3, 6, 12, or 24 hours.
* **External Cron Support:** Fully supports ultra-efficient database integrity scanning triggered by your server's Cron via a secure, token-protected REST API endpoint.
* **Visual Scan Tracking:** Real-time visibility of the last exact time the cron executed in your dashboard.
* Monitoring and automatic degradation of unauthorized administrators.
* Detailed audit log table with 90-day automatic retention and CSV export.
* Periodic integrity verification of wp-config.php.
* Prevention of unauthorized plugin deactivation and deletion.

== Disclaimer ==

WordPress® is a registered trademark of the WordPress Foundation. This plugin, "Vanguard Admin Protection & Notifications", is an independent software developed by @luisescoffie and is not affiliated with, sponsored by, endorsed by, or associated with the WordPress Foundation, Automattic Inc., or any of their products or services. The use of the "WordPress" name is for descriptive and compatibility purposes only.

== Installation ==

1. Download the `vanguard-admin-protection` folder.
2. Upload it to the `/wp-content/plugins/` directory.
3. Activate the plugin.
4. Go to Vanguard Admin Protection in the sidebar menu to manage settings.

== Frequently Asked Questions ==

= How does the Restricted Administrators feature work? =
Introduced in v4.0.0, this feature allows you to keep members of your team as Administrators so they can manage content and plugins, but completely blocks their ability to assign the Administrator role to others or edit existing Full Administrators.

= What will this plugin solve? =
This plugin solves the critical vulnerability of unauthorized administrator account creation. It protects against privilege escalation, even via WP-CLI or direct database access.

== Upgrade Notice ==

= 4.0.4 =
Minor core update to allow extensibility and official Pro integrations.

= 4.0.3 =
Critical internal vulnerability patch regarding capability boundaries and log injection. Upgrade immediately.

= 4.0.2 =
Minor security update: Sanitized variables to comply with best practices.

= 4.0.1 =
Minor update: Added legal trademark disclaimer and improved UI consistency.

== Changelog ==

= 4.0.4 =
*   **FEATURE:** Added core hooks (`do_action`) to `audit.php` to permit extensibility and integrations with the new Pro Add-On (Slack, Telegram, etc).
*   **VERSIONING:** Core bump to 4.0.4.

= 4.0.3 =
*   **VULNERABILITY PATCH (Privilege Bypass):** Prevented Restricted Administrators from arbitrarily accessing the Audit Log tools via direct URLs which allowed them to read and wipe audit traces.
*   **VULNERABILITY PATCH (Programmatic Bypass):** Replaced UI-only deactivation hooks (`plugin_action_links`) with strict internal programmatic hooks (`deactivate_plugin` and `delete_plugin`) preventing rogue administrators from intentionally deactivating the plugin using forced/fabricated direct wp-admin URL actions.
*   **SECURITY ENHANCEMENT:** Patched CSV Injection Vulnerabilities during log exports. Escapes characters preventing arbitrary formula executions in Excel/Sheets.
*   **VERSIONING:** Core bump to 4.0.3.

= 4.0.2 =
*   **SECURITY:** Fixed non-sanitized input array warnings reported by WordPress Plugin Check.
*   **COMPLIANCE:** Limited plugin tags to 5 to comply with WordPress.org repository guidelines.
*   **VERSIONING:** Synchronized all project files to version 4.0.2.

= 4.0.1 =
*   **FIX:** Corrected syntax errors in vanguard-admin-protection.php and other includes.
*   **TRADEMARK COMPLIANCE:** Added legal disclaimer regarding WordPress® trademark in footer and documentation.
*   **VERSIONING:** Synchronized all project files to version 4.0.1.

= 4.0.0 (MAJOR RELEASE) =
*   **FEATURE (Restricted Admins):** Support for two tiers of administrators. "Authorized" (Full) and "Restricted" (Maintenance).
*   **UI UPGRADE:** New dropdown interface for role management.

== Screenshots ==

1. On the Dashboard you will find the Overview of the WordPress Installation like: Last System Scan, Total Events, Unauthorized Attemps, Blocked Promotions, Ghost Admins Removed and Rejected Promotions.
2. On the Settings tab you will Manage the Administrators and Give them an Access level, settings on the Scan Frequency and the settings for the external CRON that you can setup on a cronjob for custom scanning intervals.
3. On the Athorize Admin tab you will see new admins waiting on approval.