[wp-trac] [WordPress Trac] #53233: Editor: Extend `register_block_type` to accept the path file or folder with `block.json`
WordPress Trac
noreply at wordpress.org
Wed May 19 13:41:21 UTC 2021
#53233: Editor: Extend `register_block_type` to accept the path file or folder with
`block.json`
-----------------------------------------------------+---------------------
Reporter: gziolo | Owner: (none)
Type: enhancement | Status: new
Priority: normal | Milestone: 5.8
Component: Editor | Version: trunk
Severity: normal | Resolution:
Keywords: has-patch has-unit-tests needs-dev-note | Focuses:
-----------------------------------------------------+---------------------
Comment (by gziolo):
I tested whether the name of the block `namespace/slug` could potentially
get detected by `file_exists` call when the same folder exists. In
practice, it turns out it is impossible because `file_exists` expects a
full path, test scenario used:
{{{
$this->assertTrue( file_exists( __DIR__ . '/my/plugin' ) );
$this->assertFalse( file_exists( './my/plugin' ) );
$this->assertFalse( file_exists( 'my/plugin' ) );
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/53233#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list