Playlist track.
- Name:
core/playlist-track - Category: media
- API Version: 3
- Block Type: Dynamic (server-rendered)
- Keywords:
music,sound
Block Relationships
Parent blocks (direct):
– core/playlist
Attributes
Defined via the attributes property in block.json.
| Attribute | Type | Default | Description |
|---|---|---|---|
blob |
string |
— | Role: local |
id |
number |
— | — |
src |
string |
— | — |
type |
string |
"audio" |
— |
album |
string |
— | — |
artist |
string |
— | — |
image |
string |
— | — |
imageAlt |
string |
— | — |
length |
string |
— | — |
title |
string |
— | — |
Supports
Defined via the supports property in block.json.
html:falseinteractivity:clientNavigation:true
reusable:false
Context
Defined via the usesContext and providesContext properties in block.json.
Uses context:
showArtistsshowImages
Block Markup
This is a dynamic block. It is rendered on the server and does not save HTML in post content.
In post content, it is stored as a block comment:
<!-- wp:core/playlist-track {"id":123,"src":"https://example.com/audio.mp3","album":"Example album","artist":"Example creator","image":"https://example.com/track-image.jpg","imageAlt":"Track image","length":"3:21","title":"Sample track"} /-->
Source
- block.json (reference)
- Source directory — browse
edit.js,save.js,index.php, and more.