[wp-meta] [Making WordPress.org] #5971: Plugin Directory: Custom Block Names not being listed right

Making WordPress.org noreply at wordpress.org
Thu Dec 2 15:34:05 UTC 2021

#5971: Plugin Directory: Custom Block Names not being listed right
 Reporter:  Ipstenu           |       Owner:  (none)
     Type:  defect            |      Status:  new
 Priority:  normal            |   Milestone:
Component:  Plugin Directory  |  Resolution:
 Keywords:                    |

Comment (by ryelle):

 > What would happen if I just include block.json file for each block my
 plugin has, just include it, without loading it and using it anywhere in
 the code?

 That would work - if you don't [https://developer.wordpress.org/block-
 editor/reference-guides/block-api/block-metadata/#php-server-side load it
 in your plugin], it won't be read by WordPress. The Plugin Directory will
 read it to parse out the blocks, providing the title. In fact, if you
 wanted to just use block.json for the plugin directory, you only need to
 add the `name` and `title` fields.

 > I'm not using (yet) block.json, and also I've two deprecated blocks that
 instead are using registerBlockType in JS and those two are working fine.

 Yeah, the two deprecated blocks are registered with their titles in
 `registerBlockType`, but the rest of your blocks only define `edit` and
 `save` in the JS. If you added the title here too, it should pick it up–
 or use block.json.

Ticket URL: <https://meta.trac.wordpress.org/ticket/5971#comment:5>
Making WordPress.org <https://meta.trac.wordpress.org/>
Making WordPress.org

More information about the wp-meta mailing list