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. [Utility &amp; Helpers](/categories/utility)
4. /
5. sillynet/adretto-consent-tools

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

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 today

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

20

—

LowBetter than 13% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity39

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

987d 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

[symfony/dependency-injection

Allows you to standardize and centralize the way objects are constructed in your application

4.2k455.6M9.6k](/packages/symfony-dependency-injection)[illuminate/contracts

The Illuminate Contracts package.

706130.3M13.4k](/packages/illuminate-contracts)[illuminate/container

The Illuminate Container package.

31182.0M2.4k](/packages/illuminate-container)[ecotone/ecotone

Enterprise architecture layer for Laravel and Symfony — CQRS, Event Sourcing, Durable Workflows (Sagas, Orchestrators), Projections, and Outbox messaging via PHP attributes.

564576.7k53](/packages/ecotone-ecotone)[symfony/type-info

Extracts PHP types information.

20069.8M270](/packages/symfony-type-info)[civicrm/civicrm-core

Open source constituent relationship management for non-profits, NGOs and advocacy organizations.

751291.4k43](/packages/civicrm-civicrm-core)

PHPackages © 2026

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