Skip to content

Replace unstable__bootstrapServerSideBlockDefinitions with call to block type REST API #22812

@spacedmonkey

Description

@spacedmonkey

Part of #41236.

Currently in WordPress core the follow lines appear.

// Preload server-registered block schemas.
wp_add_inline_script(
	'wp-blocks',
	'wp.blocks.unstable__bootstrapServerSideBlockDefinitions(' . wp_json_encode( get_block_editor_server_block_settings() ) . ');'
);

This was a workaround added in WordPress 5.0. Now that the block types endpoint was added in #21065 , this should be used as the "point of truth" for block definitions.

Describe the solution you'd like
The block types api should be preloaded on the page by adding it to this array.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Needs DevReady for, and needs developer effortsREST API InteractionRelated to REST API[Feature] Block APIAPI that allows to express the block paradigm.[Type] TaskIssues or PRs that have been broken down into an individual action to take

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions