Delete Pattern


Stages deleting a saved pattern in the theme draft. While pages still use it, deleting is refused unless on_usage is "detach": then, when the draft is published, every place using it first gets the pattern's blocks as ordinary blocks — so no page is left showing "This block has been deleted or is unavailable" — and the pattern is moved to the trash. Publishing can be undone with mosmcp/theme-restore-backup. Check mosmcp/theme-pattern-usage and tell the person what will change first. Registered patterns from the theme or plugins cannot be deleted.

Also known as: delete reusable block, remove pattern, delete synced pattern.

Property Value
Ability slug mosmcp/theme-pattern-delete
Wire tool name mosmcp__theme-pattern-delete
Category Theme: Templates and Styles (mosmcp-theme-blocks)
Plan Free

 

Required access

Requirement Value
Capability edit_theme_options
Minimum default role Administrator (Shop manager too when WooCommerce is active)
Annotations readOnly: false · destructive: false · idempotent: true · openWorld: false

 

Input schema

Field Type Required Default Description
id integer (min 1) Yes — Saved pattern ID, from mosmcp/theme-pattern-list.
on_usage string (one of refuse, detach) refuse What to do while pages use it: "refuse" (the default) stages nothing, "detach" turns each use into ordinary blocks when the draft is published.

 

Output schema

Field Type Required Description
staged boolean Yes
target string
change string
draft object Yes
draft.exists boolean
draft.change_count integer
draft.templates string[]
draft.template_parts string[]
draft.global_styles string
draft.patterns string[]
draft.files string[]
draft.site_identity string[] Pending logo and site icon changes.
draft.custom_css string[] Pending change to the Customizer's Additional CSS. A block theme's Additional CSS is part of global styles.
draft.theme_settings string[] Pending theme (Customizer) settings.
draft.created string
draft.updated string
draft.preview_ready boolean
next_step string
notes string[]
usage_count integer
used_in string[]

 


<< Previous Next >>
Apply Style Variation Find Text in Templates

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.