Skip to main content

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, so var() fallback chains that reference it stay live.
  • syntax (string, required): @property syntax string, or * for values that cannot be registered.
  • register_property (bool, optional): set to false to skip @property emission entirely. Required for tokens whose var() fallback chain is meaningful when the token is unset.
  • property_initial (string, optional): overrides the @property initial-value when the cascade default is not computationally independent (for example a rem-based default).
  • studio (bool, optional): true exposes the token to the customization API via studio_tokens() and ViewStyles::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

NameTypeDescription
$tokensarray<string,array<string,mixed>>Token entries keyed by dot-namespaced slug.

Since

  • TBD: TBD

Source

Defined in src/Settings/TokenRegistry.php at line 132