Configure T2
Configure blocks and extensions
t2.json
is a configuration file for T2. This should be placed in your theme.
Here's an example:
{
"version": 1,
"mu-blocks": ["t2/accordion"],
"mu-extensions": ["t2/base-style"]
}
Properties (t2.json)
is-multisite
booleanIs current installation a multisite?
Define if T2 admin api should be loaded
Define if T2 blocks api should be loaded
Define if T2 extensions api should be loaded
Define if T2 library api should be loaded
mu-blocks
string[]Define must use blocks
mu-extensions
string[]Define must use extensions
include-extensions
arrayIncluded blocks. Restrict the T2 blocks that can be enabled. Empty array to allow all.
exclude-blocks
arrayExcluded blocks. Restrict the T2 blocks that can be enabled. Empty array to allow all.
include-extensions
arrayIncluded extensions. Restrict the T2 extensions that can be enabled. Empty array to allow all.
include-extensions
arrayExcluded extensions. Restrict the T2 extensions that can be enabled. Empty array to allow all.
PHP Filters
apply_filters( 't2/config', array $config )
Filters the T2 config
Parameter | Type | Description |
---|---|---|
$config | array | T2 config. |
apply_filters( 't2/config/inherit_from_parent', bool $should_inherit )
Inherit config from parent theme
Parameter | Type | Description |
---|---|---|
$should_inherit | bool | Whether to inherit config from parent theme. Default true. |