From 91eb8e9cdb6957fe950fa26f63dbd9dd0bdc1a0a Mon Sep 17 00:00:00 2001 From: Jon Surrell Date: Thu, 11 Jan 2024 16:09:43 +0100 Subject: [PATCH] Remove editorModule, module support --- src/wp-includes/blocks.php | 4 ---- src/wp-includes/class-wp-block-type.php | 16 ---------------- src/wp-includes/class-wp-block.php | 6 ------ 3 files changed, 26 deletions(-) diff --git a/src/wp-includes/blocks.php b/src/wp-includes/blocks.php index 0f09c5bb01ed6..c9b3d51c32b60 100644 --- a/src/wp-includes/blocks.php +++ b/src/wp-includes/blocks.php @@ -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', @@ -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 ) { diff --git a/src/wp-includes/class-wp-block-type.php b/src/wp-includes/class-wp-block-type.php index f2de01b9d3db3..3cf04501df1df 100644 --- a/src/wp-includes/class-wp-block-type.php +++ b/src/wp-includes/class-wp-block-type.php @@ -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. * diff --git a/src/wp-includes/class-wp-block.php b/src/wp-includes/class-wp-block.php index b02f415e631d0..42c697cfd4713 100644 --- a/src/wp-includes/class-wp-block.php +++ b/src/wp-includes/class-wp-block.php @@ -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 );