bricks_patch_page
Apply partial updates to a page by sending only changed elements, reducing data transfer. Supports optimistic locking and automatically creates a backup.
Instructions
Apply partial updates to a page. Only sends changed elements instead of full page data. More efficient than bricks_update_page for small changes. Automatically creates a backup before writing (plugin-side, cannot be skipped). Supports optimistic locking via content_hash. Use content_area to patch header or footer. THEME-FIRST: when adding or restyling elements, reuse existing theme tokens and global classes (bricks_get_theme_styles / bricks_list_global_classes) instead of inline styling; prefer settings.style and _typography over _cssCustom, and the text-link/button elements over styled divs.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| add | No | New elements to add | |
| remove | No | Element IDs to remove | |
| update | No | Elements to update (must include id, only changed settings needed) | |
| page_id | Yes | Page ID | |
| content_area | No | Which content area to patch (default: content). | content |
| content_hash | No | Content hash from bricks_get_page for optimistic locking. If provided, patch fails with 409 if page was modified since read. | |
| regenerate_css | No | Whether to regenerate CSS after patching (default: true) |