From 9fc6fa134df8976b4144b0f67c22b23ed97b639a Mon Sep 17 00:00:00 2001 From: Michal Czaplinski Date: Wed, 25 Sep 2024 16:32:23 +0000 Subject: [PATCH] Revert [59087] due to empty commit message git-svn-id: https://develop.svn.wordpress.org/trunk@59088 602fd350-edb4-49c9-b593-d223f7449a82 --- .../assets/script-modules-packages.min.php | 2 +- src/wp-includes/class-wp-script-modules.php | 35 ------------------- tools/webpack/shared.js | 1 - 3 files changed, 1 insertion(+), 37 deletions(-) diff --git a/src/wp-includes/assets/script-modules-packages.min.php b/src/wp-includes/assets/script-modules-packages.min.php index e3c7915456748..204c67f1be50c 100644 --- a/src/wp-includes/assets/script-modules-packages.min.php +++ b/src/wp-includes/assets/script-modules-packages.min.php @@ -1 +1 @@ - array('dependencies' => array(), 'version' => '2d6d1fdbcb3fda39c768', 'type' => 'module'), 'interactivity/debug.min.js' => array('dependencies' => array(), 'version' => '1ccc67b05c275e51a8f8', 'type' => 'module'), 'interactivity-router/index.min.js' => array('dependencies' => array('@wordpress/interactivity'), 'version' => '64645ef3cd2d32860d7d', 'type' => 'module'), 'a11y/index.min.js' => array('dependencies' => array(), 'version' => 'b7d06936b8bc23cff2ad', 'type' => 'module'), 'block-library/file/view.min.js' => array('dependencies' => array('@wordpress/interactivity'), 'version' => 'fdc2f6842e015af83140', 'type' => 'module'), 'block-library/image/view.min.js' => array('dependencies' => array('@wordpress/interactivity'), 'version' => 'acfec7b3c0be4a859b31', 'type' => 'module'), 'block-library/navigation/view.min.js' => array('dependencies' => array('@wordpress/interactivity'), 'version' => '8ff192874fc8910a284c', 'type' => 'module'), 'block-library/query/view.min.js' => array('dependencies' => array('@wordpress/interactivity', array('id' => '@wordpress/interactivity-router', 'import' => 'dynamic')), 'version' => 'f4c91c89fa5271f3dad9', 'type' => 'module'), 'block-library/search/view.min.js' => array('dependencies' => array('@wordpress/interactivity'), 'version' => '2a73400a693958f604de', 'type' => 'module')); + array('dependencies' => array(), 'version' => '2d6d1fdbcb3fda39c768', 'type' => 'module'), 'interactivity/debug.min.js' => array('dependencies' => array(), 'version' => '1ccc67b05c275e51a8f8', 'type' => 'module'), 'interactivity-router/index.min.js' => array('dependencies' => array('@wordpress/interactivity'), 'version' => '64645ef3cd2d32860d7d', 'type' => 'module'), 'block-library/file/view.min.js' => array('dependencies' => array('@wordpress/interactivity'), 'version' => 'fdc2f6842e015af83140', 'type' => 'module'), 'block-library/image/view.min.js' => array('dependencies' => array('@wordpress/interactivity'), 'version' => 'acfec7b3c0be4a859b31', 'type' => 'module'), 'block-library/navigation/view.min.js' => array('dependencies' => array('@wordpress/interactivity'), 'version' => '8ff192874fc8910a284c', 'type' => 'module'), 'block-library/query/view.min.js' => array('dependencies' => array('@wordpress/interactivity', array('id' => '@wordpress/interactivity-router', 'import' => 'dynamic')), 'version' => 'f4c91c89fa5271f3dad9', 'type' => 'module'), 'block-library/search/view.min.js' => array('dependencies' => array('@wordpress/interactivity'), 'version' => '2a73400a693958f604de', 'type' => 'module')); diff --git a/src/wp-includes/class-wp-script-modules.php b/src/wp-includes/class-wp-script-modules.php index 384bf9ef2f59b..2f2cf967f4bac 100644 --- a/src/wp-includes/class-wp-script-modules.php +++ b/src/wp-includes/class-wp-script-modules.php @@ -30,17 +30,6 @@ class WP_Script_Modules { */ private $enqueued_before_registered = array(); - /** - * Tracks whether the @wordpress/a11y script module is available. - * - * Some additional HTML is required on the page for the module to work. Track - * whether it's available to print at the appropriate time. - * - * @since 6.7.0 - * @var bool - */ - private $a11y_available = false; - /** * Registers the script module if no script module with that script module * identifier has already been registered. @@ -196,8 +185,6 @@ public function add_hooks() { add_action( 'wp_footer', array( $this, 'print_script_module_data' ) ); add_action( 'admin_print_footer_scripts', array( $this, 'print_script_module_data' ) ); - add_action( 'wp_footer', array( $this, 'print_a11y_script_module_html' ), 20 ); - add_action( 'admin_print_footer_scripts', array( $this, 'print_a11y_script_module_html' ), 20 ); } /** @@ -380,15 +367,9 @@ private function get_src( string $id ): string { public function print_script_module_data(): void { $modules = array(); foreach ( array_keys( $this->get_marked_for_enqueue() ) as $id ) { - if ( '@wordpress/a11y' === $id ) { - $this->a11y_available = true; - } $modules[ $id ] = true; } foreach ( array_keys( $this->get_import_map()['imports'] ) as $id ) { - if ( '@wordpress/a11y' === $id ) { - $this->a11y_available = true; - } $modules[ $id ] = true; } @@ -484,20 +465,4 @@ public function print_script_module_data(): void { } } } - - /** - * @access private This is only intended to be called by the registered actions. - * - * @since 6.7.0 - */ - public function print_a11y_script_module_html() { - if ( ! $this->a11y_available ) { - return; - } - echo '
' - . '' - . '
' - . '
' - . '
'; - } } diff --git a/tools/webpack/shared.js b/tools/webpack/shared.js index c690235a2114e..b446b0e0028cd 100644 --- a/tools/webpack/shared.js +++ b/tools/webpack/shared.js @@ -103,7 +103,6 @@ const MODULES = [ '@wordpress/interactivity-router', ]; const SCRIPT_AND_MODULE_DUAL_PACKAGES = [ - '@wordpress/a11y', '@wordpress/block-library', ]; const WORDPRESS_NAMESPACE = '@wordpress/';