[wp-trac] [WordPress Trac] #60460: Editor: Make asset registration .asset.php optional for blocks
WordPress Trac
noreply at wordpress.org
Wed Feb 7 12:51:24 UTC 2024
#60460: Editor: Make asset registration .asset.php optional for blocks
-------------------------+--------------------
Reporter: gziolo | Owner: (none)
Type: enhancement | Status: new
Priority: normal | Milestone: 6.5
Component: Editor | Version: 5.5
Severity: normal | Keywords:
Focuses: |
-------------------------+--------------------
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.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/60460>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list