Documentation

Technical information about QR Code Management for developers.

Shortcodes

[qrcm]

Displays a QR code image.

AttributeDescription
post_idDisplay the QR code of the specified post
user_idDisplay the QR code of the specified user
(no attribute)On a singular page, displays the QR code of the current post (only for post types enabled in the role settings); on an author archive, displays the QR code of that user

[qrcm_scanner]

Displays a UI that reads a QR code with the camera and, after confirmation, redirects to the scanned URL. It has no attributes.

How the redirect works

When the redirect setting is enabled, QR codes embed a shortened URL of the form https://example.com/?qrc=CODE. The code is stored in the post meta / user meta rwc_qrcm_redirect_code. On access, the plugin records the scan in the {prefix}rwc_qrcm_log table and then redirects to the destination (the post permalink, or the user’s configured URL / author archive).

Access log table ({prefix}rwc_qrcm_log)

ColumnDescription
log_idSequence number
post_idTarget post ID or user ID
target_typeTarget type (post / user). Added in 1.5.2
user_idVisitor hash (stored in the rwc_qrcm_user_id cookie)
create_dateAccess date and time

Options and metadata

DataDescription
Option rwc_qrcmValues of the settings screen (display, data formats, roles, output, redirect)
Option rwcqrcmDefault appearance of QR codes
Option rwc_qrcm_db_versionVersion used for DB migration
Post / user meta rwcqrcm_qrdata_*QR code data (URL, contact, event, free text)
Post / user meta rwcqrcm_qrsettings_*Per-post appearance settings
Post / user meta rwc_qrcm_redirect_codeCode for the shortened URL

QR code generation

QR codes are generated with the endroid/qr-code library (bundled with the plugin). The output formats are PNG / SVG / EPS / JPEG.

Uninstall

The plugin does not ship an uninstall script, so its options, metadata, and the access log table remain after the plugin is deleted. To remove them completely, delete the options, metadata, and table listed above manually.

Requirements

WordPress4.7 or higher (tested up to 7.0)
PHP7.4 or higher
LicenseGPLv2 or later
Copied title and URL