Update Bricks Element Content


Changes the content of one Bricks element and nothing else on the page: the text of a heading, basic text, rich text or button; a heading's level; the link URL and new-tab setting of a heading, basic text or button; the image and alt text of an image; or any element's builder label. Saved to the live page at once. The previous layout is backed up first, the change is proven not to touch any other element, it is refused if the page changed since it was read (expected_hash from the last read is required), and it is read back after saving. Content bound to dynamic data is only replaced when overwrite_dynamic_data is true. Get the element ID and current values from mosmcp/bricks-get-element. The Bricks Builder access role setting is not checked; WordPress edit_post is (plus the Bricks builder-access check, when Bricks provides one at runtime).

Also known as: edit Bricks text, change heading, change button link, swap image.

Property Value
Ability slug mosmcp/bricks-update-element-content
Wire tool name mosmcp__bricks-update-element-content
Category Bricks Builder (mosmcp-bricks)
Plan Pro

 

Required access

Requirement Value
Capability edit_post (checked against the specific post)
Minimum default role Contributor
Annotations readOnly: false · destructive: false · idempotent: true · openWorld: false

 

Input schema

Field Type Required Default Description
post_id integer (min 1) Yes — ID of the page, post or Bricks template.
area string (one of content, header, footer) — Which Bricks area of the post: content (default), or the header or footer stored on it. Header and footer templates default to their own area.
element_id string (min length 1) Yes — The element ID, six letters and digits (see mosmcp/bricks-read-page-structure).
text string — New text of a heading, text-basic, text (rich text, HTML allowed) or button element.
tag string (one of h1, h2, h3, h4, h5, h6) — New heading level of a heading element.
link_url string — New link URL of a heading, text-basic or button element. An empty string removes the link.
link_new_tab boolean — Whether the element's link opens in a new tab.
image_id integer (min 1) — Media library ID of the new image of an image element.
alt_text string — New alt text of an image element.
label string — New builder label of the element (shown in the Bricks structure panel). An empty string removes it.
overwrite_dynamic_data boolean false Must be true to replace content bound to Bricks dynamic data (for example {post_title}) or a link to a post with fixed content.
expected_hash string Yes — Required. The layout_hash from your last read of this area. The change is refused if the layout changed since, so an edit made meanwhile in the Bricks builder is never overwritten.

 

Output schema

Field Type Required Description
post_id integer Yes
title string
post_type string
view_url string
builder_url string Opens the post in the Bricks builder.
area string Yes
element_id string Yes The changed element, or the new copy.
element object The element as now stored, in the shape mosmcp/bricks-get-element returns.
changes object[] Yes What changed, as read back after saving.
changes[].field string
changes[].previous string | number | integer | boolean | array | object | null
changes[].current string | number | integer | boolean | array | object | null
layout_hash string Yes The new layout_hash, for a following edit.
previous_layout_hash string
backup object Yes
backup.meta_key string
backup.meta_id integer
notes string[]
warnings object[] Non-fatal issues encountered while running.
warnings[].code string
warnings[].message string
warnings[].context string

 


<< Previous Next >>
Restore Bricks Backup Update Bricks Element Styles

For more information about the Secure MCP Server for WordPress plugin, explore the following resources:

Product Overview | Pricing | Try for Free | Documentation

If you have any questions regarding plugin configuration, pricing plans or licensing, please contact us or mail us at aisupport@xecurify.com.