📁 File Manager Pro
v10.0.3 | PHP: 8.1.34
Server: Apache
2026-06-21 06:59:48
📂
/ (Root)
/
home
/
xeqi7597
/
cds.claireduwig.com
/
wp-content
/
plugins
/
generateblocks
/
src
/
pattern-library
📍 /home/xeqi7597/cds.claireduwig.com/wp-content/plugins/generateblocks/src/pattern-library
🔄 Refresh
✏️
Editing: utils.js
Writable
export function updateUniqueIds( blocks ) { return blocks.map( ( block ) => { // Check if the block has a uniqueId attribute if ( block.attributes && block.attributes.uniqueId ) { // Generate a new uniqueId const newUniqueId = block.clientId.substr( 2, 9 ).replace( '-', '' ); // Update the block's uniqueId attribute block.attributes.uniqueId = newUniqueId; } // Recursively update uniqueIds for innerBlocks if they exist if ( block.innerBlocks && block.innerBlocks.length > 0 ) { block.innerBlocks = updateUniqueIds( block.innerBlocks ); } return block; } ); } export function isEmptyContentBlock( selectedBlock ) { if ( 'core/paragraph' === selectedBlock?.name ) { const currentContent = selectedBlock?.attributes?.content; if ( 'string' === typeof currentContent ) { return ! currentContent.trim(); } else if ( 'object' === typeof currentContent ) { return ! currentContent?.text.trim(); } } return false; }
💾 Save Changes
❌ Cancel