Multi-platform legal notice libraries and platform-specific adapters for WordPress, EmDash CMS, and any static or framework site via native ES6. The libraries currently cover South African and United Kingdom legal notices, with South Africa available in English (ZAF-eng-legals.json) and Afrikaans (ZAF-afr-legals.json). Additional countries and languages can be supported by adding a {ISO3}-{LANG}-legals.json file to the root legal-libraries/ directory.
Note: This plugin is provided for informational purposes only and does not constitute legal advice. Please consult a qualified attorney or compliance professional before relying on it for legal or regulatory compliance.
legal-libraries/— shared legal content used by every platform adapter.src/wordpress-plugin/— WordPress adapter (plugin entry point, tests, and platform-specific code).src/javascript-native/— standalone ES6 adapter for any static site or framework.src/emdash-plugin/— native plugin for EmDash CMS (Astro-based).src/laravel/— Laravel package adapter.src/symfony/— Symfony bundle adapter.src/drupal/— Drupal module adapter.src/joomla/— Joomla content plugin adapter.src/magento/— Magento 2 module adapter.src/prestashop/— PrestaShop module adapter.src/php-shared/— framework-agnostic PHP renderer used by the PHP adapters.docs/— design and developer documentation; excluded from release archives.VERSION— single source of truth for the shared version number across all adapters.- Additional CMS/e-commerce adapters will be added as sibling folders under
src/.
All platform adapters are released together under a single version number defined in VERSION. When any adapter is updated, the release workflow syncs the version to every adapter and rebuilds every platform package, so each release includes matching d3v-legal-<version>-<platform>.zip assets.
Each platform has its own README with detailed installation instructions:
- WordPress plugin
- Native ES6 adapter
- EmDash CMS plugin
- Laravel package
- Symfony bundle
- Drupal module
- Joomla plugin
- Magento module
- PrestaShop module
- Install PHP 8.1+.
- Install Composer.
- Run
composer install. - Run
php -l src/wordpress-plugin/d3v-legal.phpto lint the plugin. - Run
composer testto execute the PHPUnit regression suite.
The plugin adds a Settings > D3V Legal page where you can store default values for country, company name, contact details, VAT number, Information Officer, default return window and policy URL. Once saved, shortcodes only need to supply the notice attribute (and any values you want to override per page).
[d3v-legal notice='' country='' language='' company='' email='' support_email='' officer_email='' address='' tel='' smp='' websiteurl='' officer='' regno='' vatno='' returnwindow='' policyurl='']
All attributes are optional except notice. Values supplied in the shortcode take priority; missing or empty values fall back to the backend defaults configured under Settings > D3V Legal.
notice: Type of notice to render.country: ISO3 country code taken from the library filename (e.g.ZAForGBR). Case-insensitive. Defaults to the backend setting, orZAFif none is configured.language: Three-letter language code taken from the library filename (e.g.eng). Case-insensitive. Defaults to the backend setting, or the first available language for the selected country, otherwiseENG.company: Company or brand name shown in the output.email: General contact email address used as the default for all notices.support_email: Customer support email address. Used in support, returns, shipping, e-commerce and accessibility notices. Falls back toemailif not provided.officer_email: Information Officer / privacy / data protection email address. Used in privacy, PAIA and data-rights notices. Falls back toemailif not provided.address: Physical address or registered office.tel: Contact number.smp: Social media platform name.websiteurl: Website URL for email disclaimer content.officer: Information Officer name, used in the PAIA manual.regno: Company registration number, used in the PAIA manual.vatno: VAT registration number, used in e-commerce terms.returnwindow: Number of days within which returns are accepted (default30), used in the returns/refunds policy.policyurl: Optional URL to a full standalone policy page. When supplied, a "Read our full ..." link is appended to the notice.
If you have saved your details under Settings > D3V Legal:
[d3v-legal notice='cookies']
[d3v-legal notice='privacy']
Render the UK cookie notice explicitly:
[d3v-legal notice='cookies' country='GBR' company='ABC Holdings']
The language is case-insensitive and read directly from the filename:
[d3v-legal notice='cookies' country='gbr' language='eng' company='ABC Holdings']
Render the Afrikaans South African cookie notice:
[d3v-legal notice='cookies' country='ZAF' language='afr' company='ABC Holdings']
[d3v-legal notice='cookies' company='ABC Holdings']
[d3v-legal notice='privacy' company='ABC Holdings' address='21 Random Street, Somewhere, South Africa' email='info@abc.com' tel='+27 82 000 0000']
[d3v-legal notice='paia' company='ABC Holdings' address='21 Random Street, Somewhere, South Africa' email='info@abc.com' tel='+27 82 000 0000' officer='A. B. Officer' regno='2020/123456/07']
[d3v-legal notice='copyright' company='ABC Holdings']
[d3v-legal notice='copyrightfooter' company='ABC Holdings']
[d3v-legal notice='disclaimer' company='ABC Holdings']
[d3v-legal notice='emaildisclaimer' company='ABC Holdings' address='21 Random Street, Somewhere, South Africa' websiteurl='www.abcexample.com']
[d3v-legal notice='tscs' company='ABC Holdings' address='21 Random Street, Somewhere, South Africa']
[d3v-legal notice='comptscs' company='ABC Holdings' email='info@abc.com' address='21 Random Street, Somewhere, South Africa' tel='+27 82 000 0000' smp='Facebook']
[d3v-legal notice='contact' company='ABC Holdings' email='info@abc.com']
[d3v-legal notice='smr' company='ABC Holdings' smp='Facebook']
[d3v-legal notice='smn' company='ABC Holdings' smp='Facebook']
[d3v-legal notice='returns' company='ABC Holdings' email='info@abc.com' address='21 Random Street, Somewhere, South Africa' returnwindow='30']
[d3v-legal notice='support' company='ABC Holdings' email='info@abc.com' tel='+27 82 000 0000' address='21 Random Street, Somewhere, South Africa']
[d3v-legal notice='shipping' company='ABC Holdings' email='info@abc.com']
[d3v-legal notice='payments' company='ABC Holdings']
[d3v-legal notice='ecomtscs' company='ABC Holdings' address='21 Random Street, Somewhere, South Africa' email='info@abc.com' tel='+27 82 000 0000' vatno='4567890123']
[d3v-legal notice='accessibility' company='ABC Holdings' email='info@abc.com']
The repository includes a GitHub Actions workflow in .github/workflows/release.yml that lints the WordPress adapter, runs the PHP test suite, builds the EmDash plugin, and creates platform-specific release ZIPs whenever a release is triggered. Current assets include:
d3v-legal-<version>-wordpress.zipd3v-legal-<version>-javascript-native.zipd3v-legal-<version>-emdash-plugin.zip
The shared legal-libraries/ directory is copied into each package, and docs/ is excluded to keep archives lean.