Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions src/wp-includes/blocks/navigation-submenu.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,19 @@ function block_core_navigation_submenu_get_submenu_visibility( $context ) {
require_once __DIR__ . '/navigation-link/shared/render-submenu-icon.php';
}

/**
* Renders the submenu icon SVG for the Navigation Submenu block.
*
* @since 5.9.0
* @deprecated 7.0.0 Use block_core_shared_navigation_render_submenu_icon() instead.
*
* @return string SVG markup for the submenu icon.
*/
function block_core_navigation_submenu_render_submenu_icon() {
_deprecated_function( __FUNCTION__, '7.0.0', 'block_core_shared_navigation_render_submenu_icon()' );
return block_core_shared_navigation_render_submenu_icon();
}

/**
* Build an array with CSS classes and inline styles defining the font sizes
* which will be applied to the navigation markup in the front-end.
Expand Down
21 changes: 21 additions & 0 deletions tests/phpunit/tests/blocks/navigationSubmenuRenderSubmenuIcon.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<?php
/**
* Tests for the deprecated block_core_navigation_submenu_render_submenu_icon() shim.
*
* @package WordPress
* @subpackage Blocks
*
* @group blocks
*/
class Tests_Blocks_NavigationSubmenuRenderSubmenuIcon extends WP_UnitTestCase {
/**
* @ticket 65287
* @expectedDeprecated block_core_navigation_submenu_render_submenu_icon
*/
public function test_returns_same_markup_as_shared_helper() {
$this->assertSame(
block_core_shared_navigation_render_submenu_icon(),
block_core_navigation_submenu_render_submenu_icon()
);
}
}
Loading