Blocks Json
Manages block styles, patterns and block‑level housekeeping.
{
"version": "1.0.2",
"blocks": {
"settings": {
"folders": [
"/components",
"/layouts",
"/query-blocks"
],
"blockCategories": ["structure", "marketing"]
},
"styles": {
"core/button": {
"Download": { // label shown in UI
"inherit": ["core/link", "Download"], // OPTIONAL – re‑uses CSS from another style
"label": false // hide label chip in list view
},
"External": {}
},
"acf/filters": {
"Horizontal": {}
}
},
"unregisterStyles": {
"core/table": ["stripes", "regular"]
},
"patterns": {
"register": {
"my/event-template": { "title": "Event Template" },
"my/hero": { "title": "Hero Section" }
},
"categories": ["My Patterns", "Synced"],
"unregisterCategories": ["core"]
},
"unregisterBlocks": ["core/spacer"],
"dequeueStyles": ["wp-block-navigation", "wp-block-columns"]
}
}
Keys
version
Cache‑buster for PorterWP.
blocks.settings.folders
Additional directories Porter scans when make.sh
scaffolds a block.
blocks.settings.blockCategories
Custom block categories added to the inserter.
blocks.styles
Block‑>Style‑>Options. Valid options:• inherit
= [block, style]
to copy another style’s CSS.• label
= false
hides the style name in the UI (useful for decorative styles).• Any other key is passed through as an inline setting on registration.
blocks.unregisterStyles
Core block styles to unregister.
blocks.patterns.register
Register block patterns (title
is mandatory, description
& categories
optional).
blocks.patterns.categories
Add custom pattern categories.
blocks.patterns.unregisterCategories
Remove pattern categories.
blocks.unregisterBlocks
Prevent specific blocks appearing in the inserter.
blocks.dequeueStyles
Stylesheets to dequeue if you roll your own CSS.
Example: silent utility style
"styles": {
"core/group": {
"Overflow Hidden": { "label": false }
}
}
The style appears in the Styles sidebar but carries no visible label on the block. Handy for utility wrappers.
Last updated