auto-patch 673-dev-dev01-2024-05-25T22_41_57

This commit is contained in:
root
2024-05-25 22:41:57 +00:00
parent 5d6d82e226
commit a961f203c3
26 changed files with 1391 additions and 1619 deletions

View File

@@ -7,46 +7,7 @@ add_action(
);
function wpcf7_init_block_editor_assets() {
$assets = array();
$asset_file = wpcf7_plugin_path(
'includes/block-editor/index.asset.php'
);
if ( file_exists( $asset_file ) ) {
$assets = include( $asset_file );
}
$assets = wp_parse_args( $assets, array(
'dependencies' => array(
'react',
'wp-api-fetch',
'wp-block-editor',
'wp-blocks',
'wp-components',
'wp-element',
'wp-i18n',
'wp-url',
),
'version' => WPCF7_VERSION,
) );
wp_register_script(
'contact-form-7-block-editor',
wpcf7_plugin_url( 'includes/block-editor/index.js' ),
$assets['dependencies'],
$assets['version']
);
wp_set_script_translations(
'contact-form-7-block-editor',
'contact-form-7'
);
register_block_type(
wpcf7_plugin_path( 'includes/block-editor' ),
array(
'editor_script_handles' => 'contact-form-7-block-editor',
)
wpcf7_plugin_path( 'includes/block-editor' )
);
}

View File

@@ -34,5 +34,5 @@
"default": "form"
}
},
"editorScript": "file:./index.js"
"editorScript": [ "file:./index.js", "contact-form-7-block-editor" ]
}