diff --git a/modules/contact-form.php b/modules/contact-form.php index 5801d64773872..dc12f53f24257 100644 --- a/modules/contact-form.php +++ b/modules/contact-form.php @@ -13,7 +13,8 @@ * Additional Search Queries: contact, form, grunion, feedback, submission */ -include dirname( __FILE__ ) . '/contact-form/grunion-contact-form.php'; +require_once dirname( __FILE__ ) . '/contact-form/grunion-contact-form.php'; + /* * Filters if the new Contact Form Editor View should be used. * @@ -22,11 +23,11 @@ * Expected to be removed in Jetpack 5.8 or if a security issue merits removing the old code sooner. * * @since 5.2.0 - * + * * @param boolean $view Use new Editor View. Default true. */ if ( is_admin() && apply_filters( 'tmp_grunion_allow_editor_view', true ) ) { require_once dirname( __FILE__ ) . '/contact-form/grunion-editor-view.php'; } -include dirname( __FILE__ ) . '/contact-form/gutenberg-blocks.php'; \ No newline at end of file +require_once dirname( __FILE__ ) . '/contact-form/jetpack-contact-form-gutenberg.php'; diff --git a/modules/contact-form/blocks/README.md b/modules/contact-form/blocks/README.md new file mode 100644 index 0000000000000..ef06991c92371 --- /dev/null +++ b/modules/contact-form/blocks/README.md @@ -0,0 +1,33 @@ +# Contact Form - Gutenberg Blocks + +Contact form Gutenberg Blocks are implemented in JSX and currently depends on using Gutenberg's [5452](https://github.com/WordPress/gutenberg/pull/5452). + +Current form is more of a v0.1 library we can expand on to incorporate the original contact form logic. + +Development: + +* Run `gulp build` initially to create the blocks .js files after that you can run `gulp gutenpack` and `gulp gutenpack:watch` to continue development. +* Set `define('SCRIPT_DEBUG', true)` and `Jetpack_Constants::set_constant('SCRIPT_DEBUG', true)` somewhere to use your local blocks built with gutenpack. + +Blocks Available: + +* Form - The main block, consists of an InnerBlock for the `