📁 File Manager Pro
v10.0.3 | PHP: 8.1.34
Server: Apache
2026-06-21 03:39:49
📂
/ (Root)
/
home
/
xeqi7597
/
cds.claireduwig.com
/
wp-content
/
plugins
/
generateblocks
/
src
/
utils
📍 /home/xeqi7597/cds.claireduwig.com/wp-content/plugins/generateblocks/src/utils
🔄 Refresh
✏️
Editing: getInnerBlocks.js
Writable
/** * Get the inner blocks from a given block. This function recursively traverses * the inner blocks and returns them as flat array. * * @param {Object} block The block object containing the inner blocks. * @return {Array} An array of inner blocks. */ export function getInnerBlocks( block ) { return block?.innerBlocks?.reduce( ( acc, innerBlock ) => { if ( innerBlock.innerBlocks ) { return [ ...acc, innerBlock, ...getInnerBlocks( innerBlock ), ]; } return [ ...acc, innerBlock ]; }, [] ); }
💾 Save Changes
❌ Cancel