[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
Sun Aug 8 21:16:50 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):

 I've updated the PR to remove an irrelevant check for `.json` ending. All
 of the local PHPUnit tests still pass.


 > The following checks are now carried out:
 >
 > * If the `$file_or_folder` path provided is a directory, ~~or doesn't
 end in `.json`,~~ search for `$file_or_folder/block.json`.
 > * Otherwise, search for the `$file_or_folder` path exactly as provided.

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


More information about the wp-trac mailing list