[wp-trac] [WordPress Trac] #54647: Blocks: Add support for themes to block API v2 with assets in block.json

WordPress Trac noreply at wordpress.org
Fri Dec 17 15:44:15 UTC 2021


#54647: Blocks: Add support for themes to block API v2 with assets in block.json
---------------------------+-----------------------------
 Reporter:  whoisnegrello  |      Owner:  (none)
     Type:  defect (bug)   |     Status:  new
 Priority:  normal         |  Milestone:  Awaiting Review
Component:  Editor         |    Version:  trunk
 Severity:  normal         |   Keywords:  has-patch
  Focuses:                 |
---------------------------+-----------------------------
 **Issue**
 When you register blocks with block.json in your theme, yo had a assets's
 URL error because use `plugins_url()` by default.

 **Solution**
 Modify `register_block_script_handle()`and
 `register_block_style_handle()`to validate path of assets and return this
 correctly.

 In this way it adds support to register blocks from themes.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/54647>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list