Install
This is the repository archive. It installs, but the folder name will carry the branch suffix and updates will not flow.
Install straight from GitHub with WP-CLI:
wp plugin install https://github.com/boileau-co/vcard-generator/archive/refs/heads/main.zipWordPress plugin — manage employee contact records and serve them as downloadable .vcf files at clean public URLs, with QR code generation and scan tracking.
Requirements
- WordPress 6.4+
- PHP 8.1+
- Composer (for initial setup)
Setup
composer install --no-dev --optimize-autoloader
Then activate the plugin in WP Admin. Visit vCards → Settings to configure organization defaults before creating vCards.
File structure
vcard-generator/
├── vcard-generator.php # Main plugin file; PSR-4 autoloader
├── composer.json
├── uninstall.php
├── src/
│ ├── Plugin.php # Bootstrap; registers all components
│ ├── PostType.php # CPT registration; title sync
│ ├── Fields.php # Meta box; save/validate per-employee fields
│ ├── Settings.php # Settings page (org defaults, URL base, QR, tracking)
│ ├── Rewrite.php # Rewrite rule; template_redirect handler
│ ├── VCardFormatter.php # vCard 3.0 string builder
│ ├── QrGenerator.php # chillerlan/php-qrcode wrapper (SVG + PNG)
│ ├── ScanTracker.php # Scan counting; bot filter
│ ├── AdminColumns.php # List columns; QR meta box; AJAX download handlers
│ ├── PhoneNormalizer.php# E.164 normalization
│ └── Helpers.php # vCard escaping; RFC 6350 line folding; URL builder
├── assets/
│ ├── css/admin.css
│ └── js/admin.js # Copy-URL button; QR modal
└── vendor/ # chillerlan/php-qrcode (committed after composer install)
Public URL
https://example.com/v/{slug}
The slug base (v) is configurable in Settings → vCard Generator → URL Configuration. Changing it flushes rewrite rules automatically.
vCard format
vCard 3.0, UTF-8, CRLF line endings, RFC 6350 line folding for lines over 75 bytes. Empty fields are omitted. Phone numbers are normalized to E.164 on save.
QR codes
Generated by chillerlan/php-qrcode (MIT). SVG is the primary format; PNG (1024×1024) is the fallback. Quiet zone is always 4 modules. Error correction level defaults to M (15%) and is configurable per-site in Settings.
Scan tracking
When enabled, each hit on /v/{slug} increments _vcard_generator_scan_count and updates _vcard_generator_last_scanned. HEAD requests and known bot user agents are excluded. No personal data is stored. The bot list is extensible via the vcard_generator_bot_user_agents filter.
Hooks
| Hook | Type | Description |
|---|---|---|
vcard_generator_bot_user_agents |
filter | Array of bot user-agent substrings to skip when counting scans |