Block Library: Navigation: Refactor to use render_callback #21660
Labels
[Block] Navigation
Affects the Navigation Block
Good First Issue
An issue that's suitable for someone looking to contribute for the first time
[Package] Block library
/packages/block-library
[Type] Code Quality
Issues or PRs that relate to code quality
Previously: #21467, #19991
Context:
#21467 enables support for
render_callback
to receive the block instance as an argument. This had been needed for the Navigation block in referencing inner blocks, originally implemented in #16796 as an extra argument ofrender_callback
, proposed for core enhancement at Trac#48104, then ultimately reverted to an alternative (admittedly more cumbersome) approach using filtering in #19991.Task:
Revise the implementation of Navigation block to use
render_callback
, using the$block
argument to reference inner blocks.Motivation:
This is largely for code quality and maintainability of the block, since using the
render_block
filter is an unnecessarily complex means to customize the render output of a block, vs. the first-classrender_callback
callable setting of a block.The text was updated successfully, but these errors were encountered: