Make WordPress Core


Ignore:
Timestamp:
02/08/2024 10:39:24 AM (2 years ago)
Author:
gziolo
Message:

Editor: Add viewScriptModule handling to block.json metadata

Syncing changes from the Gutenberg plugin: https://github.com/WordPress/gutenberg/pull/57437.

Scripts and styles can be registered for blocks via block.json metadata. There is now a Modules API, but was no way to register or associate module assets with blocks via block.json.

Fixes #60233.
Props jonsurrell, gziolo, cbravobernal, luisherranz, youknowriad.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/class-wp-block-type.php

    r57521 r57565  
    226226     */
    227227    public $view_script_handles = array();
     228
     229    /**
     230     * Block type front end only script module IDs.
     231     *
     232     * @since 6.5.0
     233     * @var string[]
     234     */
     235    public $view_script_module_ids = array();
    228236
    229237    /**
Note: See TracChangeset for help on using the changeset viewer.