'defer' ) ); $editor_deps = array( 'wp-blocks', 'wp-element', 'wp-block-editor', 'wp-components', 'wp-i18n', 'wp-server-side-render' ); foreach ( array( 'statement', 'feedback' ) as $block ) { $handle = 'equivora-' . $block . '-editor'; wp_register_script( $handle, EQUIVORA_URL . 'blocks/' . $block . '/index.js', $editor_deps, EQUIVORA_VERSION, true ); wp_set_script_translations( $handle, 'equivora' ); register_block_type( EQUIVORA_DIR . 'blocks/' . $block ); } } }