diff --git a/packages/block-library/src/navigation-link/index.php b/packages/block-library/src/navigation-link/index.php index f214a6b9b5740f..4b0dace04c1b8d 100644 --- a/packages/block-library/src/navigation-link/index.php +++ b/packages/block-library/src/navigation-link/index.php @@ -372,38 +372,6 @@ function register_block_core_navigation_link() { } add_action( 'init', 'register_block_core_navigation_link' ); -/** - * Disables the display of block inspector tabs for the Navigation Link block. - * - * This is only a temporary measure until we have a TabPanel and mechanism that - * will allow the Navigation Link to programmatically select a tab when edited - * via a specific context. - * - * See: - * - https://github.com/WordPress/gutenberg/issues/45951 - * - https://github.com/WordPress/gutenberg/pull/46321 - * - https://github.com/WordPress/gutenberg/pull/46271 - * - * @param array $settings Default editor settings. - * @return array Filtered editor settings. - */ -function gutenberg_disable_tabs_for_navigation_link_block( $settings ) { - $current_tab_settings = _wp_array_get( - $settings, - array( 'blockInspectorTabs' ), - array() - ); - - $settings['blockInspectorTabs'] = array_merge( - $current_tab_settings, - array( 'core/navigation-link' => false ) - ); - - return $settings; -} - -add_filter( 'block_editor_settings_all', 'gutenberg_disable_tabs_for_navigation_link_block' ); - /** * Enables animation of the block inspector for the Navigation Link block. * diff --git a/packages/block-library/src/navigation-submenu/index.php b/packages/block-library/src/navigation-submenu/index.php index f3c8cad8f0ca89..84bc859a62525e 100644 --- a/packages/block-library/src/navigation-submenu/index.php +++ b/packages/block-library/src/navigation-submenu/index.php @@ -290,38 +290,6 @@ function register_block_core_navigation_submenu() { } add_action( 'init', 'register_block_core_navigation_submenu' ); -/** - * Disables display of block inspector tabs for the Navigation Submenu block. - * - * This is only a temporary measure until we have a TabPanel and mechanism that - * will allow the Navigation Submenu to programmatically select a tab when - * edited via a specific context. - * - * See: - * - https://github.com/WordPress/gutenberg/issues/45951 - * - https://github.com/WordPress/gutenberg/pull/46321 - * - https://github.com/WordPress/gutenberg/pull/46271 - * - * @param array $settings Default editor settings. - * @return array Filtered editor settings. - */ -function gutenberg_disable_tabs_for_navigation_submenu_block( $settings ) { - $current_tab_settings = _wp_array_get( - $settings, - array( 'blockInspectorTabs' ), - array() - ); - - $settings['blockInspectorTabs'] = array_merge( - $current_tab_settings, - array( 'core/navigation-submenu' => false ) - ); - - return $settings; -} - -add_filter( 'block_editor_settings_all', 'gutenberg_disable_tabs_for_navigation_submenu_block' ); - /** * Enables animation of the block inspector for the Navigation Submenu block. *