Get global styles
get_global_stylesFetch a block theme's design tokens—palette, typography, spacing, per-block styles—from theme.json and Site Editor customizations.
Instructions
Read a block theme's global styles — the palette, typography, spacing and per-block styling that theme.json defines and the Site Editor overrides. This is where a block theme's design tokens live.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| site_id | No | Which configured WordPress site to act on. Optional — with a single site configured it is used automatically; with several, the default site is used unless you name one. Run list_sites for valid ids. | |
| include_theme_defaults | No | Also return the theme's own theme.json settings and styles, which the user customisations layer on top of. The user record alone only holds what was changed in the Site Editor, so it is often nearly empty. Verbose. |