Configure T2

Configure which blocks and extensions are enabled in your WordPress project using a single configuration file.

Last modified: June 2, 2025

link Overview

The T2 Config package provides a unified way to manage which blocks and extensions are loaded in your WordPress environment.
Configuration is handled via a t2.json file placed in your theme.

link Example t2.json

{
    "version": 1,
    "mu-blocks": ["t2/accordion"],
    "mu-extensions": ["t2/button-icon"]
}

link How It Works

This package reads your t2.json file and registers the specified blocks and extensions automatically.
This allows for easy, code-free configuration of your site's functionality.

link Properties (t2.json)

link Hooks

link config/src/config.php

Inherit config from parent theme

apply_filters( 't2/config/inherit_from_parent', bool $should_inherit )
Parameter Type Description
$should_inherit bool Whether to inherit config from parent theme. Default true.

Filters the T2 config

apply_filters( 't2/config', array $config )
Parameter Type Description
$config array T2 config.