=== Mantle Connector ===
Contributors: mantlewp
Tags: maintenance, care plan, client report, site health, white-label
Requires at least: 6.4
Tested up to: 6.9
Requires PHP: 8.2
Stable tag: 1.0.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Connects your WordPress site to MantleWP for automated health reporting. Zero frontend impact.

== Description ==

MantleWP Connector links your WordPress site to [MantleWP](https://mantlewp.com), the automated client reporting tool built for WordPress agencies selling care and maintenance plans.

**What it does:**

* Collects site health metadata (WordPress version, PHP version, plugin inventory, SSL status, server info)
* Sends data securely to your MantleWP dashboard — health checks every hour, plugin inventory every 6 hours
* Provides a REST endpoint for uptime monitoring from the MantleWP server
* Powers automated, white-labeled PDF reports you send to clients to prove your care plan value

**What it does NOT do:**

* No frontend JavaScript, CSS, or HTTP requests — zero impact on your site's performance or Lighthouse scores
* No user content collection — we never access posts, pages, media, or customer data
* No tracking scripts or analytics on the public side of your site

**Built for agencies running care plans.** If you charge clients for WordPress maintenance, MantleWP generates the professional reports that prove your value — so you stop spending hours on manual reporting and start retaining more clients.

**Data collected (and only this data):**

* WordPress, PHP, and MySQL/MariaDB versions
* Active theme name and version
* Plugin inventory: name, version, active status, update availability
* SSL certificate status and expiry date
* Server software (Apache/Nginx)
* Multisite status
* WordPress security constants (WP_DEBUG, DISALLOW_FILE_EDIT, etc.)
* WordPress Site Health test results
* Database size
* Privacy & compliance indicators: consent plugin detection, data processing plugin inventory, and MaxtDesign Cookie Consent deep integration (Google Consent Mode v2 configuration)

All data is transmitted over HTTPS and authenticated with your unique API key.

== Installation ==

1. Upload `mantle-connector` to the `/wp-content/plugins/` directory, or install directly from WordPress.org
2. Activate the plugin through the Plugins menu in WordPress
3. Go to Settings → MantleWP and enter your API key
4. Get your API key from [mantlewp.com/dashboard](https://mantlewp.com/dashboard/sites)
5. Click "Test Connection" to verify everything works
6. Data syncs automatically — health checks every hour, plugin inventory every 6 hours

Use the "Sync Now" button for an immediate sync at any time.

== Frequently Asked Questions ==

= Does this plugin affect my site's frontend performance? =

No. The plugin has zero frontend footprint — no JavaScript, no CSS, no HTTP requests on public-facing pages. It only runs in the WordPress admin area and via WP-Cron in the background. A Lighthouse audit of your site will show zero impact from this plugin.

= What data does the plugin collect? =

Only technical site health metadata: WordPress/PHP/MySQL versions, active theme, plugin inventory (names, versions, update status), SSL certificate status, server software, WordPress security constants, Site Health results, and database size. We never access post content, user data, media files, or customer information.

= Do I need a MantleWP account? =

Yes. The plugin requires an API key from [mantlewp.com](https://mantlewp.com). Free accounts include up to 3 sites with no credit card required.

= How often does it sync? =

Health data syncs every hour. Plugin inventory syncs every 6 hours. Both run via WP-Cron. You can trigger a manual sync from the settings page at any time.

= Is the data transmitted securely? =

Yes. All communication uses HTTPS. Your data is authenticated with a unique API key sent via the X-MantleWP-Key header.

= Can I test the connection before waiting for the first sync? =

Yes. After entering your API key, click "Test Connection" on the settings page. It sends a lightweight ping to verify your API key is valid and the MantleWP server is reachable.

= Does the plugin work on multisite? =

The plugin can be installed on individual sites within a multisite network. Network-wide activation is not currently supported.

= What WordPress versions are supported? =

WordPress 6.4 or higher, running on PHP 8.2 or higher.

= Does this plugin work with MaxtDesign Cookie Consent? =

Yes! When MaxtDesign Cookie Consent is installed, the connector reads its full configuration including Google Consent Mode v2 signals, providing the deepest compliance verification available in MantleWP's GDPR reports.

= What privacy data does the connector collect? =

The connector detects installed consent plugins (10+ supported), data processing plugins (forms, ecommerce, analytics, etc.), privacy policy page status, and for MaxtDesign Cookie Consent specifically, the full Google Consent Mode v2 configuration. No personal visitor data is ever collected.

== Screenshots ==

1. Settings page with API key input and connection status indicator
2. Connected state showing last sync time and next scheduled syncs
3. Test Connection and Sync Now action buttons
4. Sample client health report generated from collected data in MantleWP dashboard

== Changelog ==

= 1.0.0 =
* Initial release
* Hourly site health data collection via WP-Cron
* Plugin inventory sync every 6 hours
* REST API heartbeat endpoint for uptime monitoring
* Admin settings page under Settings → MantleWP
* Test Connection button for API key validation
* Manual Sync Now button
* Rate limiting (max 1 health request per hour)
* Privacy indicators module: consent plugin detection (10+ plugins supported)
* Data processing plugin detection (forms, ecommerce, analytics, marketing, security, comments)
* MaxtDesign Cookie Consent deep bridge: reads full Google Consent Mode v2 configuration
* Privacy policy page detection
* `mantlewp_privacy_indicators` filter for third-party extensibility
* Full i18n support with text domain
* Zero frontend footprint — no JS, CSS, or HTTP requests on public pages

== Upgrade Notice ==

= 1.0.0 =
Initial release. Install, enter your API key, and start generating automated client reports.
