Skip to content

Commit

Permalink
Improve function comment
Browse files Browse the repository at this point in the history
  • Loading branch information
getdave committed Nov 23, 2021
1 parent cdaaf5e commit d6d1e25
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/block-library/src/navigation/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@ function block_core_navigation_get_non_empty_navigation() {
$navigation_posts = get_posts(
array(
'post_type' => 'wp_navigation',
'order' => 'DESC',
)
);

Expand All @@ -159,8 +160,10 @@ function block_core_navigation_get_non_empty_navigation() {
}

/**
* Filter out empty "null" blocks from the block list.
* 'parse_blocks' includes a null block with '\n\n' as the content when
* it encounters whitespace. This code strips it.
* it encounters whitespace. This is not a bug but rather how the parser
* is designed.
*
* @param array $parsed_blocks the parsed blocks to be normalized.
* @return array the normalized parsed blocks.
Expand Down

0 comments on commit d6d1e25

Please sign in to comment.