Block API Reference Edit

Blocks are the fundamental element of the editor. They are the primary way in which plugins and themes can register their own functionality and extend the capabilities of the editor.

Registering a block Registering a block

All blocks must be registered before they can be used in the editor. You can learn about block registration, and the available options, in the block registration documentation.

Top ↑

Block edit and save Block edit and save

The edit function defines the components for the block in the editor interface the user interacts with. The save function defines the markup to be serialized back when a post is saved. They are the heart of how a block operates, so they are covered separately.