['inherit'] ) && $block['attrs']['query']['inherit']; } /** * Recursively inject the custom attribute to all nested blocks. * * @param array $block Parsed block data. */ private function inject_attribute( &$block ) { $block['attrs']['isInherited'] = 1; if ( ! empty( $block['innerBlocks'] ) ) { array_walk( $block['innerBlocks'], array( $this, 'inject_attribute' ) ); } } }