Update global styles
update_global_stylesApply site-wide global style updates for a block theme: change palette, typography, spacing, and per-block styling. Read existing settings first to avoid overwriting; optionally deep-merge changes instead of replacing entire branches.
Instructions
Update a block theme's global styles — palette, typography, spacing, per-block styling. Changes apply site-wide immediately. Read them first: by default this merges only at the top level, so a partial settings object replaces that whole branch — pass merge: true to deep-merge instead.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| merge | No | Deep-merge the supplied objects into the current customisations instead of replacing the whole settings/styles branch. Arrays such as a palette are still replaced wholesale. | |
| styles | No | theme.json-shaped styles, e.g. {"color": {"background": "#fff"}, "typography": {...}}. | |
| 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. | |
| settings | No | theme.json-shaped settings, e.g. {"color": {"palette": [...]}}. |