![]() Server : Apache System : Linux server2.corals.io 4.18.0-348.2.1.el8_5.x86_64 #1 SMP Mon Nov 15 09:17:08 EST 2021 x86_64 User : corals ( 1002) PHP Version : 7.4.33 Disable Function : exec,passthru,shell_exec,system Directory : /home/corals/mets.corals.io/wp-content/plugins/block-options/src/blocks/import/ |
/** * WordPress dependencies */ const { createBlock } = wp.blocks; const transforms = { from: [ { type: 'files', isMatch( files ) { return files[ 0 ].type === 'application/json'; }, // We define a lower priorty (higher number) than the default of 10. This // ensures that the Import block is only created as a fallback. priority: 14, transform: ( files ) => { const blocks = []; blocks.push( createBlock( 'editorskit/import', { file: files, } ) ); return blocks; }, }, ], }; export default transforms;