=== Student Certificate Generator & Verifier — Limited Demo ===
Contributors: creativedeep
Author: Creativedeep
Author URI: https://www.creativedeep.net
Plugin URI: https://certificateverificationplugin.com
Tags: certificate, verification, students, generator
Requires at least: 5.8
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 1.4.1-demo.1
License: GPLv2 or later

Add students, design beautiful certificates with drag & drop, and let anyone verify and download certificates by certificate number.

== Description ==

LIMITED DEMO: all certificate tools with one student record per WordPress site.
The student can be edited, but cannot be deleted or assigned a new certificate
number. Extra records are blocked through forms, CSV and backup restore.
Replace-all restore is unavailable. Upgrade for unlimited students:
https://certificateverificationplugin.com/product/student-certificate-generator-verifier/
One-time payment. Lifetime access. No recurring subscription.


Student Certificate Generator & Verifier is built for non-technical users:

* Add students with your own custom fields (add, rename, reorder, delete fields any time)
* Drag-and-drop Certificate Designer — background image or colour, logos, signatures, any font, size, colour, alignment, letter spacing
* Save the template once: every student's certificate updates automatically
* Professional dashboard with consistent navigation, student totals, improved forms and responsive tables
* Verification Page editor with live desktop/mobile previews, logo, editable text, colour presets, fonts, spacing, layout, and download-button visibility
* Public verification page — students type their certificate number and instantly see their verified details
* Students download their certificate as PDF or PNG
* Only filled fields are shown on verification; blank fields are hidden
* Details-only mode: turn the certificate off per student with a toggle
* Auto-generated certificate numbers (with custom prefix and padding) — or type your own
* Bulk import students by CSV, export students to CSV
* Full backup export/import (students + fields + template + settings) in one file
* Built-in security: nonces, capability checks, prepared SQL statements, input sanitising, output escaping, and rate-limited public verification
* 16 ready-made professional certificate backgrounds (landscape + portrait) built into the Designer — or upload your own
* Google Fonts support: add any font by name (works for Punjabi, Hindi, Arabic and other scripts)
* Upload your own TTF / OTF font files for fully custom or regional-language typography
* Verification page text fully editable, so the public page can run in any language (English by default)
* Student photo: attach a photo to a student, place a Photo box on the certificate, photo also shows on the verification result
* Optional QR codes: scanning the certificate opens your verification page and verifies automatically (enable/disable in Settings)
* Email certificates to students: store an email in the student details (kept private, never shown on the verification page) and send the certificate as a PDF — one student at a time or to everyone in bulk with one click
* Deliverability-aware emails: domain-matched sender, Reply-To, multipart HTML + plain text and a clean Message-ID help certificates land in the inbox instead of spam
* Use the designed template OR upload your own certificate per student: turn on "Allow custom certificate uploads" in Settings, then attach a ready-made PDF/JPG/PNG to any student. When set, it overrides the design for that student on verification, download and email; students without a file keep using your designed template

== Quick start (3 steps) ==

1. Install and activate the plugin. A "Certificates" menu appears in your dashboard.
2. Open **Certificates → Certificate Designer**, drag your fields onto the page, choose a background and logo, click **Save Template**.
3. Create a page (e.g. "Verify Certificate") and put this shortcode on it:

`[scgv_verify]`

Then add students under **Certificates → Add Student** (or import a CSV). Done — students can verify and download immediately.

== Customise the verification page ==

Open **Certificates → Verification Page**. Use Content for your title, logo, labels and messages; Style for colours and typography; and Layout for spacing, alignment, language direction and visible elements. Preview Search, Verified and Error states, then click **Save changes**. All pages using `[scgv_verify]` use this saved design. The certificate itself is still edited in Certificate Designer.

The editor styles the verification area inside the shortcode. Your WordPress theme or page builder continues to control the outer page, including its header and footer.

== Updating from 1.3.2 ==

Back up your WordPress database and uploads first. In Plugins → Add New → Upload Plugin, select the complete 1.4.0 ZIP and choose to replace the installed plugin. Keep the folder name `student-certificate-generator`. Your student records, fields, template, uploads and existing settings remain in place. If you use a cache plugin, clear its page cache after updating or changing the verification design.

== CSV format ==

First row = column headers. Example:

`cert_number,cert_enabled,student_name,course_name,grade,issue_date,student_email`
`,1,Aarav Sharma,Web Development,A+,2026-06-10`

* cert_number blank = auto-generated.
* cert_enabled: 1 = certificate on, 0 = details only.
* You can also use your field labels as headers (e.g. "Student Name").

== Support ==

* Author: Creativedeep — https://www.creativedeep.net
* Plugin support & documentation: Certificate Verification Plugins — https://certificateverificationplugin.com/
* Video tutorials: https://www.youtube.com/channel/UCILJ4-M-b2qjzOyOLPSRxgg

== Changelog ==

= 1.4.1 =
* Fix Media Library certificate attachment resolution, including encoded filenames.
* Preview uploaded PDFs with bundled PDF.js; keep original files for download and email.
* Bundle PDF generation assets to remove the CDN dependency.
* Fix email rendering lifecycle, prevent overlapping sends and restore controls after failures.
* Report WordPress mail and upload errors; clean up generated temporary attachments.


= 1.4.0 =
* Redesigned plugin dashboard: consistent workspace navigation, student summary cards, forms, tables and certificate designer panels.
* Added Verification Page editor with saved branding, editable page text, colour presets, typography, spacing, responsive previews, left-to-right/right-to-left layout and display controls.
* Verification designs are included in settings backups. Older backups remain compatible.
* Improved certificate rendering state and download readiness on the public page.
* Applied Mozilla's disable-evaluation mitigation to the existing uploaded PDF preview library.
* No student database schema changes.


= 1.3.2 =
* Fixed: "Send Certificates" emails failing on many hosts. Certificates are now uploaded as real binary files (~40% smaller) instead of giant base64 text, which server limits and encoding corruption used to break.
* Improved: clear error messages when sending fails — the plugin now tells you if the file exceeds your server's post_max_size / upload_max_filesize, if a firewall blocked the request, or if your session expired.
* Fixed: base64 fallback path now repairs "+"-to-space corruption caused by some servers.
* Fixed: per-student custom certificate attachments keep working after an http-to-https site migration.
* Security: uploaded certificate files are validated by extension, size and file signature (magic bytes).

= 1.3.1 =
* Uploaded PDF certificates now show a real visual preview on the verification page (first page rendered), instead of a placeholder icon.

= 1.3.0 =
* Per-student custom certificate uploads with master on/off switch in Settings. Uploaded files override the designed template per student across verification, download and email.

= 1.2.0 =
* New "Send Certificates" page: email certificates to students as PDF/PNG attachments, individually or in bulk with one click. Email field is hidden on the public verification page. Deliverability best-practices built in.

= 1.1.1 =
* Simplified Settings page. New Help page with step-by-step tutorial, shortcode copy button and video tutorials link. New About Us page.

= 1.1.0 =
* 16 bundled background designs, Google Fonts + TTF/OTF upload, multi-language verification page, student photos, optional QR verification.

= 1.0.0 =
* First release.
