Skip to content

Commit

Permalink
Remove editorModule, module support
Browse files Browse the repository at this point in the history
  • Loading branch information
sirreal committed Jan 11, 2024
1 parent 2c1856d commit 91eb8e9
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 26 deletions.
4 changes: 0 additions & 4 deletions src/wp-includes/blocks.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,6 @@ function generate_block_asset_handle( $block_name, $field_name, $index = 0 ) {
}

$field_mappings = array(
'editorModule' => 'editor-module',
'module' => 'module',
'viewModule' => 'view-module',
'editorScript' => 'editor-script',
'script' => 'script',
Expand Down Expand Up @@ -580,8 +578,6 @@ function register_block_type_from_metadata( $file_or_folder, $args = array() ) {
}

$module_fields = array(
'editorModule' => 'editor_module_handles',
'module' => 'module_handles',
'viewModule' => 'view_module_handles',
);
foreach ( $module_fields as $metadata_field_name => $settings_field_name ) {
Expand Down
16 changes: 0 additions & 16 deletions src/wp-includes/class-wp-block-type.php
Original file line number Diff line number Diff line change
Expand Up @@ -209,22 +209,6 @@ class WP_Block_Type {
*/
public $view_script_handles = array();

/**
* Block type editor only module handles.
*
* @since 6.5.0
* @var string[]
*/
public $editor_module_handles = array();

/**
* Block type front end and editor module handles.
*
* @since 6.5.0
* @var string[]
*/
public $module_handles = array();

/**
* Block type front end only module handles.
*
Expand Down
6 changes: 0 additions & 6 deletions src/wp-includes/class-wp-block.php
Original file line number Diff line number Diff line change
Expand Up @@ -274,12 +274,6 @@ public function render( $options = array() ) {
}
}

if ( ( ! empty( $this->block_type->module_handles ) ) ) {
foreach ( $this->block_type->module_handles as $module_handle ) {
wp_enqueue_module( $module_handle );
}
}

if ( ! empty( $this->block_type->view_module_handles ) ) {
foreach ( $this->block_type->view_module_handles as $view_module_handle ) {
wp_enqueue_module( $view_module_handle );
Expand Down

0 comments on commit 91eb8e9

Please sign in to comment.