[wp-trac] [WordPress Trac] #53806: register_block_type_from_metadata does not allow full path to file as docs say it does

WordPress Trac noreply at wordpress.org
Sat Aug 7 22:54:07 UTC 2021


#53806: register_block_type_from_metadata does not allow full path to file as docs
say it does
-------------------------+---------------------
 Reporter:  coreyw       |       Owner:  (none)
     Type:  enhancement  |      Status:  new
 Priority:  normal       |   Milestone:  5.9
Component:  Editor       |     Version:  5.8
 Severity:  normal       |  Resolution:
 Keywords:  has-patch    |     Focuses:  docs
-------------------------+---------------------

Comment (by costdev):

 As @coreyw mentioned, if the provided filename has `block.json` at the
 end, then it works. However, the [https://developer.wordpress.org/block-
 editor/reference-guides/block-api/block-metadata/#php-server-side Docs]
 specify `or full path to the metadata file if named differently`.

 I've submitted a PR that is successful with the following local PHPUnit
 tests:

 [[Image(53806_tests.jpg)]]

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/53806#comment:4>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list