Skip to content

Commit

Permalink
Do not wrap page-list, if navigation child
Browse files Browse the repository at this point in the history
Fix issue with double ul-elements. Fix WordPress#60500
  • Loading branch information
saulirajala committed May 8, 2024
1 parent 60d2269 commit 785ba2b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/block-library/src/page-list/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,7 @@ function render_block_core_page_list( $attributes, $content, $block ) {

$show_submenu_icons = array_key_exists( 'showSubmenuIcon', $block->context ) ? $block->context['showSubmenuIcon'] : false;

$wrapper_markup = $is_nested ? '%2$s' : '<ul %1$s>%2$s</ul>';
$wrapper_markup = $is_nested || $is_navigation_child ? '%2$s' : '<ul %1$s>%2$s</ul>';

$items_markup = block_core_page_list_render_nested_page_list( $open_submenus_on_click, $show_submenu_icons, $is_navigation_child, $nested_pages, $is_nested, $active_page_ancestor_ids, $colors );

Expand Down

0 comments on commit 785ba2b

Please sign in to comment.