Filter: gk/gravityview/theme/tokens
Filters the full design token registry.
Array keys are dot-namespaced token slugs (color.primary, mytheme.accent). Each entry is an array with this shape:
css_var(string, required): CSS custom property name. Must start with--gv-.default(string, required): cascade default value. An empty string means the token ships unset, sovar()fallback chains that reference it stay live.syntax(string, required):@propertysyntax string, or*for values that cannot be registered.register_property(bool, optional): set tofalseto skip@propertyemission entirely. Required for tokens whosevar()fallback chain is meaningful when the token is unset.property_initial(string, optional): overrides the@propertyinitial-value when the cascade default is not computationally independent (for example a rem-based default).studio(bool, optional):trueexposes the token to the customization API viastudio_tokens()andViewStyles::tokens().- Other optional keys:
category,group,private,desc,control,hover_slug,options(plain list of allowed value strings),units,min,max,step,extra_css_vars.
Entries that fail validation (a missing or non-string css_var, default, or syntax, or a css_var that does not start with --gv-) are dropped and a warning naming the slug is logged.
Parameters
| Name | Type | Description |
|---|---|---|
| $tokens | array<string,array<string,mixed>> | Token entries keyed by dot-namespaced slug. |
Since
- TBD: TBD
Source
Defined in src/Settings/TokenRegistry.php at line 132