PHPackages                             sillynet/adretto-consent-tools - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. sillynet/adretto-consent-tools

ActiveLibrary

sillynet/adretto-consent-tools
==============================

A backend for the consent-tools library in Wordpress using Adretto.

0.1.1(3y ago)032GPL-3.0-onlyPHPPHP &gt;=7.4

Since Nov 21Pushed 2y agoCompare

[ Source](https://github.com/asillywalk/wp-consent-tools)[ Packagist](https://packagist.org/packages/sillynet/adretto-consent-tools)[ RSS](/packages/sillynet-adretto-consent-tools/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (2)Dependencies (5)Versions (4)Used By (0)

Wordpress Consent Tools Server &amp; Administration for Adretto
===============================================================

[](#wordpress-consent-tools-server--administration-for-adretto)

*A backend for the consent-tools library in Wordpress using Adretto.*

---

- [Installation](#installation)
- [Usage](#usage)

Installation
------------

[](#installation)

via composer:

```
> composer require sillynet/adretto-consent-tools
```

This library is an extension to the [Adretto](https://github.com/asillywalk/adretto)Wordpress ADR framework, so you will need to have Adretto installed and set up.

Make sure you have Composer autoload or an alternative class loader present.

### Carbon Fields

[](#carbon-fields)

This packages uses [CarbonFields](https://docs.carbonfields.net/) to generate the settings page. Unfortunately CarbonFields can be somewhat tricky to set up when used outside a theme's root directory. **If your theme files live in `public/wp-content/themes//`, and you have your composer.json and `vendor/` directory there, you're fine.**

If you however maintain your Composer dependencies outside of the theme directory, or use some symlink setup, you might be in trouble. The simplest solution is to add a step to your setup and build process to make CF's JS and CSS assets publicly available at a known path:

1. As part of your build pipeline, copy the entire `vendor/htmlburger/carbon-fields`directory into `public/wp-content` (or you could copy just the `*.js` and `*.css` files, but you'll have to keep the directory structure). A simple solution is to actually use your theme directory, so let's use `public/wp-content/themes//vendor/cf` as an example.
2. Tell CarbonFields where it can find its assets by setting a constant *before*CF is "booted", somewhere near the top of your `functions.php` would work fine in most scenarios: ```
    define('Carbon_Fields\DIR', get_theme_file_path('vendor/cf'));

    ```

Usage
-----

[](#usage)

Load the extension in your Adretto configuration file:

```
# .config.yaml
extensions:
  - Sillynet\\ConsentTools\\ConsentToolsExtension
```

You will find a settings page under the Wordpress general settings tab where you can configure the consent management services for [`@gebruederheitz/consent-tools`](https://www.npmjs.com/package/@gebruederheitz/consent-tools).

When setting up *consent-tools* you can retrieve the configuration via `/wp-json/sillynet/v1/consent-management/config?lang=en`, which will return an object with the following shape:

```
type ServiceConfig = {
    // regular fields
    prettyName?: string;           // The pretty name for the service as it
                                   // should be shown to user, in placeholder
                                   // templates or settings modals
    cmpServiceId?: string;         // The ID of this service as defined by
                                   // by the CMP used. If you're running
                                   // consent-tools in standalone mode,
                                   // this can simply be ignored.
    privacyPolicySection?: string; // An anchor for linking to this specific
                                   // service's section on the privacy policy
                                   // page.

    // translated fields, these will differ based on the requested language
    // ("en" in this example)
    titleText?: string;             // override for default titleText below
    buttonText?: string;            // override for default buttonText below
    description?: string;           // override for default description below
}

type ConsentToolsConfig = {
    default: {
        titleText: string;          // Default text to be displayed in the
                                    // placeholder element's heading if not
                                    // overridden by the service's config.
        description: string;        // Default text to be displayed in the
                                    // placeholder element's body. May contain
                                    // %templateTags%.
        buttonText: string;         // Default text to be displayed in the
                                    // placeholder element's "consent" button.
    },
    types: {
        [serviceId: string]: ServiceConfig
    }
}
```

Development
-----------

[](#development)

### Dependencies

[](#dependencies)

- PHP &gt;= 7.4
- [Composer 2.x](https://getcomposer.org)
- [NVM](https://github.com/nvm-sh/nvm) and nodeJS LTS (v16.x)
- Nice to have: GNU Make (or drop-in alternative)

### Makefile

[](#makefile)

Most everyday development tasks are covered in the Makefile.

###  Health Score

19

—

LowBetter than 10% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity38

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~167 days

Total

3

Last Release

935d ago

Major Versions

0.1.1 → v4.x-dev2023-10-21

### Community

Maintainers

![](https://www.gravatar.com/avatar/d2a201d58341e3ed71321bcb66cb375a8c6efffce7d8fe33244e821afc087c78?d=identicon)[mediocrity](/maintainers/mediocrity)

---

Top Contributors

[![MrMediocresTestAccount](https://avatars.githubusercontent.com/u/63109795?v=4)](https://github.com/MrMediocresTestAccount "MrMediocresTestAccount (10 commits)")

###  Code Quality

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/sillynet-adretto-consent-tools/health.svg)

```
[![Health](https://phpackages.com/badges/sillynet-adretto-consent-tools/health.svg)](https://phpackages.com/packages/sillynet-adretto-consent-tools)
```

###  Alternatives

[pimple/pimple

Pimple, a simple Dependency Injection Container

2.7k130.5M1.4k](/packages/pimple-pimple)[neos/flow

Flow Application Framework

862.0M451](/packages/neos-flow)[api-platform/state

API Platform state interfaces

223.4M57](/packages/api-platform-state)[internal/dload

Downloads binaries.

98142.7k10](/packages/internal-dload)[symfony/json-streamer

Provides powerful methods to read/write data structures from/into JSON streams.

14440.0k8](/packages/symfony-json-streamer)[rubix/server

Deploy your Rubix ML models to production with scalable stand-alone inference servers.

632.3k](/packages/rubix-server)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
