Skip to content

Block API: Normalize function arguments #5227

@mtias

Description

@mtias

We have several functions that take arguments like blockType, attributes, innerHtml, but the order is not always consistent.

Since this is an often repeated pattern, we should consolidate usage.

Examples:

isValidBlock — innerHTML, blockType, attributes.
getBlockAttributes — blockType, innerHTML, attributes.
getAttributesFromDeprecatedVersion — blockType, innerHTML, attributes.
createBlock — name, attributes, innerBlocks.
getSaveContent — blockType, attributes.

Metadata

Metadata

Assignees

Labels

[Feature] Block APIAPI that allows to express the block paradigm.[Type] Code QualityIssues or PRs that relate to code quality

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions