=== GoValid QR ===
Contributors: govalid
Tags: qr code, qr, barcode, govalid, analytics
Requires at least: 5.8
Tested up to: 6.9
Requires PHP: 7.4
Stable tag: 3.6.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Generate, embed, and track QR codes from your GoValid account directly in WordPress.

== Description ==

**GoValid QR** connects your WordPress site to your [GoValid](https://govalid.org) account, letting you generate, embed, and track QR codes without leaving your WordPress admin.

= Features =

* **QR Code Generator** — Create QR codes for URLs, text, email, phone, SMS, WiFi, and vCards right from your WordPress admin
* **Gutenberg Block** — Add QR codes to any post or page with a visual picker
* **Shortcode** — Embed QR codes anywhere using `[govalid_qr id="uuid"]`
* **Scan Analytics** — Dashboard widget showing total scans, recent activity, and top QR codes
* **Secure Connection** — OAuth 2.0 with PKCE (S256) for secure authentication
* **Image Caching** — QR images cached locally for fast page loads
* **i18n Ready** — Fully translatable

= How It Works =

1. Register an OAuth application in your GoValid dashboard
2. Enter your Client ID and Secret in the plugin settings
3. Click "Connect with GoValid" to authorize
4. Start creating and embedding QR codes!

= Requirements =

* A [GoValid](https://govalid.org) account
* WordPress 5.8 or later
* PHP 7.4 or later

== Installation ==

1. Upload the `govalid-qr` folder to `/wp-content/plugins/`
2. Activate the plugin through the 'Plugins' menu
3. Go to **GoValid QR > Settings** and enter your OAuth credentials
4. Click **Connect with GoValid** to authorize the connection

== Frequently Asked Questions ==

= Do I need a GoValid account? =

Yes. You need an active GoValid account to use this plugin. Sign up at [govalid.org](https://govalid.org).

= How do I get OAuth credentials? =

Log in to your GoValid dashboard, go to **Settings > OAuth Applications**, and create a new application. Copy the Client ID and Client Secret into the plugin settings.

= Is my data secure? =

Yes. OAuth tokens are encrypted with AES-256-CBC using your WordPress security keys. The connection uses PKCE (S256) for additional security. Your Client Secret is never exposed to the browser.

= Can I use the shortcode in widgets? =

Yes. The `[govalid_qr]` shortcode works in posts, pages, and any widget that supports shortcodes.

== Screenshots ==

1. Settings page — connect to your GoValid account
2. QR Code Generator — create QR codes from the admin
3. Gutenberg block — visual QR code picker
4. Dashboard widget — scan analytics at a glance

== Changelog ==

= 3.1.3 =
* NEW: QR Label Layout — design and export printable QR label sheets (PDF/PNG/JPG/Print)
* NEW: 16 unique frame styles (Pill, Groove, Ridge, Inset, Outset, Ticket, Elegant, Glow, Stamp + originals)
* Fix: Correct QR card selectors for label layout data collection

= 3.1.1 =
* Fix: Replace %i SQL placeholders for WP 5.8 compatibility
* Fix: Bundle SortableJS locally instead of loading from CDN
* Fix: Add missing output escaping across all templates
* Fix: Add translators comments for i18n placeholders
* Fix: Use wp_safe_redirect() instead of wp_redirect()
* Fix: Remove debug error_log() calls from production code
* Fix: Add database query caching and proper LIKE wildcard escaping
* Fix: Prefix all global template variables with plugin prefix
* Fix: Sanitize file upload and URL inputs
* Fix: Add phpcs annotations for nonce-delegated methods and DB queries

= 2.0.1 =
* NEW: Shortcode-based verification page — customizable via WordPress page editor
* NEW: [govalid_verify_result] shortcode for full verification card
* NEW: Individual field shortcodes ([govalid_verify_field], [govalid_verify_status], [govalid_verify_alerts], [govalid_powered_by])
* NEW: Custom Verification settings tab with setup guide and shortcode reference
* NEW: One-click verification page creation
* Server-side API verification (no client-side JavaScript needed)

= 2.0.0 =
* NEW: Custom verification page — serve QR verification at yoursite.com/v/{token}
* NEW: Settings toggle to enable/disable custom verification route
* NEW: Smart Verify widget recognizes the site's own /v/ URLs
* Automatic rewrite rule management on toggle/activation/deactivation

= 1.0.0 =
* Initial release
* QR Code Generator with multiple types
* Gutenberg block with visual picker
* Shortcode support
* Dashboard scan analytics widget
* OAuth 2.0 + PKCE connection
* Local image caching

== Upgrade Notice ==

= 1.0.0 =
Initial release of GoValid QR for WordPress.
