=== CertWright ===
Contributors: mikeyh874
Tags: certificates, pdf, forms, verification, email
Requires at least: 6.2
Tested up to: 7.1
Requires PHP: 8.1
Stable tag: 1.0.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Create, email and publicly verify certificates from submissions made through your preferred WordPress form plugin.

== Description ==

CertWright Core provides a complete free certificate workflow. Choose a supported form provider, map its fields, generate a PDF certificate after an ordinary form submission, deliver it through the WordPress email system and provide public verification by search or QR code.

Supported form providers:

* Formidable Forms
* Gravity Forms
* Fluent Forms
* WPForms
* Contact Form 7
* Ninja Forms
* Forminator

CertWright does not require one preferred form plugin. Install the supported form maker of your choice and select it under CertWright > Form Mapping.

Core includes one active form mapping, one Primary Certificate and sequence, portrait and landscape layouts, global branding, PDF generation, queued email delivery, public verification, certificate status management and diagnostic logs.

An optional separately distributed CertWright Pro add-on is planned for organisations that need multiple mappings and certificate programmes, conditional routing, reusable templates and brands, bulk issuing, scheduling, reminders and developer integrations. Pro implementation code is not included in this WordPress.org plugin. Removing Pro will never invalidate certificates already issued.

== Installation ==

CertWright requires PHP 8.1 or newer. The PHP DOM, mbstring and GD extensions must also be enabled so CertWright can process images and generate PDF certificates.

1. Install and activate CertWright.
2. Install and activate one supported form plugin.
3. Create a form containing Email and either one Name field or separate Given Name and Family Name fields.
4. Open CertWright > Form Mapping, select the provider and form, and load its fields.
5. Map Email and the appropriate name fields, then save.
6. Configure the Primary Certificate, Template Designer and Settings pages.
7. Submit the form and confirm the certificate, PDF and email-queue record are created.

== Frequently Asked Questions ==

= Must I use Formidable Forms? =

No. Choose any installed provider shown on the Form Mapping page.

= What happens when a form has one full-name field? =

Map it to Name and leave Given Name, Middle Name and Family Name unmapped. One word is retained as the given name; two words are treated as given and family names; with three or more words, the first is given, the last is family and intervening words become middle names.

= Will removing Pro invalidate existing certificates? =

No. Existing certificates and their public verification records remain valid.

= Does CertWright send data to an external service? =

Core does not transmit analytics or certificate records to CertWright. The external QR service is disabled by default and is contacted only after an administrator gives explicit consent in CertWright Settings. Email delivery uses the WordPress mail system and any mail transport configured by the site administrator.

== External Services ==

CertWright can use the QR Server API operated by goQR.me to turn a certificate's public verification URL into a PNG QR image. This optional service is disabled by default. An administrator must explicitly enable the consent setting before any request is made. The request occurs only when CertWright needs to generate or replace a certificate QR image. The submitted data is the same public verification URL that the QR code represents; no recipient name, email address, form contents or administrator credential is submitted by CertWright. The returned image is stored locally in the WordPress uploads directory.

Service information: https://goqr.me/api/
Privacy policy: https://goqr.me/privacy-safety-security/

== Privacy ==

CertWright stores certificate and form-mapping information in the site's WordPress database and generated files in the site's uploads storage. Administrators decide which submitted fields are mapped. Core does not perform telemetry or send certificate information to CertWright servers. The public verification URL is sent to the disclosed QR Server API only after the administrator has explicitly opted in. Site owners remain responsible for their privacy notice, retention policy and the behaviour of their chosen form and email plugins.

== Screenshots ==

1. A sample personalised certificate with branding and a QR code for verification.
2. Find and manage issued certificates, view their status and download PDFs.
3. Map fields from your chosen form provider to certificate details.
4. Position certificate elements and adjust their appearance in the Template Designer.
5. Search for a certificate and view its status through a public verification page.

== Changelog ==

= 1.0.0 =
* Initial WordPress.org release of CertWright Core.
* Supports Formidable Forms, Gravity Forms, Fluent Forms, WPForms, Contact Form 7, Ninja Forms and Forminator.
* Includes the complete single-mapping certificate, PDF, queued email and public-verification workflow.
* Includes portrait and landscape certificate layouts, branding-image processing and a visual Template Designer.
* Keeps certificate orientation and branding artwork synchronised and validates uploaded backgrounds and optional frames.
* Reuses prepared A4 branding images during submissions and continues safely when an optional image is unavailable.
* Uses the DejaVu fonts bundled with Dompdf without requiring an additional custom-font directory.
* Adds public-search and QR-code rate limiting and protects sensitive diagnostic information.
* Associates PDF renderer errors with the affected certificate diagnostic report.
* Documents the external QR image service and the public verification URL sent to it.
* Adds a Contact Support link to the CertWright administration menu.
