=== 24TT Document Verifier ===
Contributors: 24techtime, johniouspatriot
Tags: document verification, certificate validation, authenticity, enterprise security, portal
Requires at least: 5.8
Tested up to: 7.0
Stable tag: 2.2.0
License: GPL-2.0+
License URI: http://www.gnu.org/licenses/gpl-2.0.txt

== Short Description ==
The ultimate enterprise-grade document verification system. Securely issue and verify certificates, ID cards, letters, and receipts directly on your WordPress website.

== Description ==
The **24TT Document Verifier** is a powerful, enterprise-grade solution designed for institutions, universities, businesses, and government bodies globally to prove the authenticity of their issued documents. 

By embedding a secure verification portal directly into your WordPress website, you instantly protect your institution's credibility and prevent the dissemination of counterfeit certificates, fake ID cards, and forged official letters. 

### 🚀 What's New in Version 2.2.0? (Expiration Engine & Future-Proofing)
Version 2.2.0 brings crucial compliance tools and prepares the plugin for an exciting future!
* **Document Expiration Engine:** You can now set strict "Valid Until" / Expiration dates for time-sensitive documents (like annual licenses, temporary IDs, or limited-term contracts).
* **Bulk Upload Expiration Support:** The Bulk Add tool has been fully upgraded to allow mass-importing of expiration dates directly into your database.
* **Opt-In & Upgrade Bridge:** We've integrated a secure, optional connectivity engine (powered by Freemius) to keep you updated on security patches and pave the way for upcoming premium features!

### 🎨 Version 2.1.0 Highlights (Branding & Data Integrity)
* **Custom Branding Engine:** Match your institution's exact brand colors using new intuitive color pickers for the frontend portal (Background, Button, and Hover states).
* **Duplicate Data Shield:** A strict new database constraint automatically prevents administrators from accidentally creating multiple documents with the exact same Verification ID via the standard editor or the Bulk Upload tool.
* **Legacy Duplicate Cleaner:** An automated background sweep that instantly detects and neutralizes any existing duplicate IDs in your database to protect systemic integrity.

### 🌟 Version 2.0.0 Highlights (The Architecture Overhaul)
* **The "Kill Switch" (Global Settings):** Instant, granular control over your data. Easily toggle which document categories are accessible via the public search portal.
* **Native File Uploads:** Integrates directly with the native WordPress Media Library to visually upload and attach PDF or JPG files to any document record.
* **Dynamic UI Customizer:** Change the frontend search label instantly from the Settings dashboard.
* **The "Clean Workspace" Engine:** A premium admin dashboard that suppresses third-party marketing banners for a professional workspace.
* **Smart Front-End Rendering:** A modern success card that intelligently hides empty data fields for a flawless user presentation.

### Core Features:
* **Custom Verification Database:** Manage thousands of verifiable documents directly within a secure WordPress interface.
* **Comprehensive Data Fields:** Store exact details including Verification ID, Recipient Name, Grade/Performance, Issuing Authority, Expiration Dates, and PDF links.
* **Bulk Upload Tool:** Massively accelerate your workflow with dynamic, auto-expanding data rows.
* **Frontend Verification Portal:** Paste the `[ttdvr_verify_document]` shortcode on any page to deploy a beautiful, responsive search form.
* **Category Segmentation:** Organize records effortlessly using custom taxonomy tags.

== Installation ==

**From your WordPress Dashboard:**
1. Navigate to 'Plugins' > 'Add New'.
2. Search for '24TT Document Verifier'.
3. Click 'Install Now' and then 'Activate'.

**Manual Installation:**
1. Download the plugin ZIP file.
2. Go to your WordPress dashboard, navigate to 'Plugins' > 'Add New'.
3. Click 'Upload Plugin', select the ZIP file, and install.
4. Activate the plugin.

**Quick Start Guide:**
1. **Set Up Categories:** Go to *24TT Document Verifier > Categories*.
2. **Configure Security & Branding:** Visit *Global Settings* to configure your custom colors, labels, and "Kill Switch" settings.
3. **Add Documents:** Use *Add New Document* or the *Bulk Add Documents* tool.
4. **Deploy the Portal:** Paste the shortcode `[ttdvr_verify_document]` into any WordPress page.

== Screenshots ==

1. **The Premium Dashboard:** A clean, ad-free workspace with quick links to your shortcode, settings, and community support.
2. **Global Settings:** Centralized control over your verification portal's security, visibility, and behavior.
3. **Dynamic UI Customizer:** Easily change the frontend search labels and PDF display preferences without touching a single line of code.
4. **Verification "Kill Switch":** Granular control over category privacy. Instantly hide sensitive document categories from the public portal.
5. **Quick Start Guide:** Built-in guidance to help you set up your verification system in minutes.
6. **Document Management:** Easily manage, filter, and review all your verifiable documents from a clean interface.
7. **Document Categories:** Organize records effortlessly (e.g., 2025 Certificates, Employee IDs) using custom taxonomy tags.
8. **Bulk Add Tool:** Massively accelerate your workflow by uploading multiple documents at once with auto-expanding data rows.
9. **Frontend Verification Portal:** The beautiful, responsive search interface deployed easily via shortcode.
10. **Verification Success Card:** The dynamic, intelligent results panel proving document authenticity and intelligently hiding empty fields.
11. **Secure Error Handling:** Clear, professional "Document Not Found" messages when an invalid or restricted ID is searched.

== Changelog ==

= 2.2.0 =
* **New Feature:** Added "Valid Until" (Expiration Date) field for time-sensitive documents.
* **Enhancement:** Upgraded the Bulk Add tool to support dynamic Expiration Date inputs.
* **Infrastructure:** Integrated Freemius SDK to provide optional usage tracking, better support, and prepare the bridge for future premium upgrades.

= 2.1.0 =
* **New Feature:** Frontend Appearance & Branding (Color pickers for background, button, and hover).
* **Security/Data Integrity:** Engineered "Duplicate ID Shield" to prevent duplicate ID creation.
* **Maintenance:** Added background Database Cleaner to neutralize legacy duplicate IDs.
* **Fix:** Cleaned up MVC architecture for Global Settings and Bulk Upload processing.

= 2.0.0 =
* **Major Update:** Complete architectural overhaul.
* **New Feature:** Global Settings panel, Verification "Kill Switch", Native Media Library integration.
* **Security:** Enforced strict Role-Based Access Control (`manage_ttdvr_documents`).

= 1.1.3 =
* Maintenance: Updated version compatibility for WordPress 7.0.

= 1.1.2 =
* Security: Implemented `wp_unslash()` and input sanitization.

= 1.1.1 =
* Fix: Renamed plugin to "24TT Document Verifier".

= 1.1.0 =
* Fix: Resolved shortcode rendering errors.

= 1.0.5 =
* New Feature: Implemented "Bulk Add Documents" functionality.

= 1.0.0 =
* Initial release.

== Upgrade Notice ==

= 2.2.0 =
This update adds highly requested Expiration Date tracking for time-sensitive documents and introduces a secure opt-in system to help us improve the plugin.

= 2.1.0 =
This update introduces powerful new branding features and critical data-integrity enhancements. A background scanner will securely neutralize any legacy duplicate Document IDs.

= 2.0.0 =
⚠️ CRITICAL UPDATE: Version 2.0.0 is a major architectural overhaul. **PLEASE BACKUP YOUR DATABASE** before updating.

== Frequently Asked Questions ==

**How do I deploy the verification search bar?**
Simply create a new WordPress page (or edit an existing one) and paste the shortcode `[ttdvr_verify_document]` into the content area. Publish the page, and your public portal is live.

**Can I change the text above the search bar?**
Yes! In Version 2.0.0, we introduced a Dynamic UI Customizer. Navigate to *24TT Document Verifier > Global Settings* and you can easily change the search label to match your specific needs (e.g., "Enter Student ID", "Check Employee Number").

**How do I prevent the public from searching for internal documents like Receipts?**
Use the Verification "Kill Switch". Go to *Global Settings* and simply uncheck the "Publicly Verifiable" box next to the "Receipts" category. Any public search for those document IDs will return a secure "Not Found" message.

**How do I attach a PDF of the actual document?**
When adding or editing a document, scroll to the "Document File" section. Click the "Upload File" button to seamlessly use the WordPress Media Library to attach a PDF or JPG. You can then choose in your Global Settings if you want a "Download / View" link to appear on the public success screen.

**Is there a limit to how many documents I can verify?**
No. The system utilizes Custom Post Types (CPT) and efficient WP_Query architecture, meaning it can scale to handle thousands of verifiable records without slowing down your site. 

**Is the data secure?**
Absolutely. The plugin employs strict Role-Based Access Control (RBAC), meaning only authorized administrators can view, add, or edit the document database. The frontend utilizes cryptographic nonces to protect against CSRF attacks during the verification search process.

**Do the developers have access to my documents or database?**
No, never. 24TT Document Verifier is a 100% self-hosted solution. All document data, recipient details, and uploaded files are stored strictly on your own WordPress database and server. We (24 Tech Time) have absolutely zero access to your records, meaning your institution maintains complete data ownership, security, and privacy compliance.

**What happens to my data if I deactivate or delete the plugin?**
Your data belongs to you. If you deactivate or delete the plugin, your document records remain safely stored in your WordPress database. We deliberately do not erase your records upon deletion to prevent accidental data loss.