auto-patch 638-dev-dev01-2024-05-14T20_44_36
This commit is contained in:
@@ -19,6 +19,7 @@ function wpcf7_init_block_editor_assets() {
|
||||
|
||||
$assets = wp_parse_args( $assets, array(
|
||||
'dependencies' => array(
|
||||
'react',
|
||||
'wp-api-fetch',
|
||||
'wp-block-editor',
|
||||
'wp-blocks',
|
||||
@@ -45,42 +46,7 @@ function wpcf7_init_block_editor_assets() {
|
||||
register_block_type(
|
||||
wpcf7_plugin_path( 'includes/block-editor' ),
|
||||
array(
|
||||
'editor_script' => 'contact-form-7-block-editor',
|
||||
'editor_script_handles' => 'contact-form-7-block-editor',
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
add_action(
|
||||
'enqueue_block_editor_assets',
|
||||
'wpcf7_enqueue_block_editor_assets',
|
||||
10, 0
|
||||
);
|
||||
|
||||
function wpcf7_enqueue_block_editor_assets() {
|
||||
$contact_forms = array_map(
|
||||
static function ( $contact_form ) {
|
||||
return array(
|
||||
'id' => $contact_form->id(),
|
||||
'hash' => $contact_form->hash(),
|
||||
'slug' => $contact_form->name(),
|
||||
'title' => $contact_form->title(),
|
||||
'locale' => $contact_form->locale(),
|
||||
);
|
||||
},
|
||||
WPCF7_ContactForm::find( array(
|
||||
'posts_per_page' => 20,
|
||||
'orderby' => 'modified',
|
||||
'order' => 'DESC',
|
||||
) )
|
||||
);
|
||||
|
||||
wp_add_inline_script(
|
||||
'contact-form-7-block-editor',
|
||||
sprintf(
|
||||
'window.wpcf7 = {contactForms:%s};',
|
||||
wp_json_encode( $contact_forms )
|
||||
),
|
||||
'before'
|
||||
);
|
||||
}
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -5,7 +5,7 @@ Tags: contact form, schema-woven validation
|
||||
Requires at least: 6.3
|
||||
Requires PHP: 7.4
|
||||
Tested up to: 6.5
|
||||
Stable tag: 5.9.3
|
||||
Stable tag: 5.9.4
|
||||
License: GPLv2 or later
|
||||
License URI: https://www.gnu.org/licenses/gpl-2.0.html
|
||||
|
||||
@@ -78,6 +78,10 @@ Do you have questions or issues with Contact Form 7? Use these support channels
|
||||
|
||||
For more information, see [Releases](https://contactform7.com/category/releases/).
|
||||
|
||||
= 5.9.4 =
|
||||
|
||||
[https://contactform7.com/contact-form-7-594/](https://contactform7.com/contact-form-7-594/)
|
||||
|
||||
= 5.9.3 =
|
||||
|
||||
[https://contactform7.com/contact-form-7-593/](https://contactform7.com/contact-form-7-593/)
|
||||
|
||||
@@ -7,12 +7,12 @@
|
||||
* Author URI: https://ideasilo.wordpress.com/
|
||||
* License: GPL v2 or later
|
||||
* License URI: https://www.gnu.org/licenses/gpl-2.0.html
|
||||
* Version: 5.9.3
|
||||
* Version: 5.9.4
|
||||
* Requires at least: 6.3
|
||||
* Requires PHP: 7.4
|
||||
*/
|
||||
|
||||
define( 'WPCF7_VERSION', '5.9.3' );
|
||||
define( 'WPCF7_VERSION', '5.9.4' );
|
||||
|
||||
define( 'WPCF7_REQUIRED_WP_VERSION', '6.3' );
|
||||
|
||||
|
||||
Reference in New Issue
Block a user