Shortcode
Insert additional custom elements with a WordPress shortcode.
- Name:
core/shortcode - Category: widgets
- API Version: 3
- Block Type: Hybrid (static save + server enhancements)
Attributes
Defined via the attributes property in block.json.
| Attribute | Type | Default | Description |
|---|---|---|---|
text |
string |
— | Source: raw. Role: content |
Supports
Defined via the supports property in block.json.
className:falsecustomClassName:falsehtml:falsecustomCSS:falsevisibility:false
Block Markup
This is a hybrid block. It saves static markup that the server may enhance during rendering.
<!-- wp:core/shortcode -->
<!-- /wp:core/shortcode -->
Source
- block.json (reference)
- Source directory — browse the
editandsavesource files,index.php, and more.
这篇文档对你有帮助吗?
谢谢你的反馈!