block_core_navigation_get_post_ids

The timeline below displays how wordpress function block_core_navigation_get_post_ids has changed across different WordPress versions. If a version is not listed, refer to the next available version below.

WordPress Version: 6.1

/**
 * Iterate through all inner blocks recursively and get navigation link block's post IDs.
 *
 * @param WP_Block_List $inner_blocks Block list class instance.
 *
 * @return array Array of post IDs.
 */
function block_core_navigation_get_post_ids($inner_blocks)
{
    $post_ids = array_map('block_core_navigation_from_block_get_post_ids', iterator_to_array($inner_blocks));
    return array_unique(array_merge(...$post_ids));
}