#60460 closed enhancement (fixed)
Editor: Make asset registration .asset.php optional for blocks
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | 6.5 | Priority: | normal |
Severity: | normal | Version: | 5.5 |
Component: | Editor | Keywords: | has-patch has-unit-tests add-to-field-guide |
Focuses: | Cc: |
Description (last modified by )
A related issue in Gutenberg: https://github.com/WordPress/gutenberg/issues/57234.
It is a hard requirement that a *.asset.php file is present to register a block in WordPress. Otherwise, it throws a Warning:
function register_block_script_handle was called incorrectly. The asset file (/wp-content/uploads/faustwp/blocks/block-a/index.asset.php) for the "editorScript" defined in "create-block/block-a" block definition is missing. (This message was added in version 5.5.0.)
and the block will not appear in the inserter.
Change History (6)
This ticket was mentioned in PR #5799 on WordPress/wordpress-develop by @JoeFusco.
16 months ago
#2
- Keywords has-patch has-unit-tests added
16 months ago
#3
Committed with https://core.trac.wordpress.org/changeset/57559.
@colorful tones commented on PR #5799:
16 months ago
#5
Thanks for getting this over the line @gziolo and thanks @josephfusco for kicking it off 🙌
Trac ticket: https://core.trac.wordpress.org/ticket/60460