-
Notifications
You must be signed in to change notification settings - Fork 800
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Contact Form: Removing code and renaming relevant references to ensure we use the package version #37157
Contact Form: Removing code and renaming relevant references to ensure we use the package version #37157
Changes from 9 commits
77c6df9
588cd5e
bc1be50
5aa778c
349f477
7277c52
3db1ec3
700f245
08b1d4c
5fdb20a
45a5fd7
ded8b13
db376c1
36af504
3ec6595
56f3f0d
1e82c72
b7dbde1
5028f70
c354ed7
cf85f00
387bd8f
a2b125a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
Significance: minor | ||
Type: removed | ||
|
||
Contact Form: Removing code and renaming relevant references to ensure we use the package version of the contact form. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
Significance: minor | ||
Type: removed | ||
|
||
Contact Form: Removing code and renaming relevant references to ensure we use the package version of the contact form. | ||
coder-karen marked this conversation as resolved.
Show resolved
Hide resolved
|
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
Significance: minor | ||
Type: other | ||
|
||
Contact Form: Removing code and renaming relevant references to ensure we use the package version of the contact form. |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -725,11 +725,6 @@ public static function enqueue_block_editor_assets() { | |
* @param bool true Enable the RePublicize UI in the block editor context. Defaults to true. | ||
*/ | ||
'republicize_enabled' => apply_filters( 'jetpack_block_editor_republicize_feature', true ), | ||
/** | ||
* Prevent the registration of the blocks from extensions/blocks/contact-form | ||
* if the Forms package is enabled. | ||
*/ | ||
'is_form_package_enabled' => apply_filters( 'jetpack_contact_form_use_package', true ), | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You should be able to add that deprecated hook to the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ah good to know. |
||
), | ||
'siteFragment' => $status->get_site_suffix(), | ||
'adminUrl' => esc_url( admin_url() ), | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -35,24 +35,6 @@ | |
return true; // Not returning true will cause the module to become deactivated. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should we remove the check provided by the filter above now and deprecate the filter, since there is no other way to use the contact form anymore? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I did wonder, especially with the comment after |
||
} | ||
|
||
require_once __DIR__ . '/contact-form/grunion-contact-form.php'; | ||
|
||
/* | ||
* Filters if the new Contact Form Editor View should be used. | ||
* | ||
* A temporary filter to disable the new Editor View for the older UI. | ||
* Please note this filter and the old UI will be removed in the future. | ||
* Expected to be removed in Jetpack 5.8 or if a security issue merits removing the old code sooner. | ||
* | ||
* @since 5.2.0 | ||
* @deprecated 13.2.0 | ||
* | ||
* @param boolean $view Use new Editor View. Default true. | ||
*/ | ||
if ( is_admin() && apply_filters_deprecated( 'tmp_grunion_allow_editor_view', array( true ), '13.2.0', '', 'This functionality will be removed in an upcoming version.' ) ) { | ||
require_once __DIR__ . '/contact-form/grunion-editor-view.php'; | ||
} | ||
|
||
/** | ||
* Register Jetpack Form patterns | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think we should be able to remove this as well, since it is provided in the package too. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Gotcha. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Actually to double check, what code are you referring to removing? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The code that registers the patterns, There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ah right, I was busy searching for the function name instead. So since it lives elsewhere now with a different function name, presumably I'd still need to deprecate this specific function initially first before deleting it, similarly to the Google Drive Helper functions? I've assumed so initially with a new commit. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, I think that's the right thing to do! 👍 |
||
*/ | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we load those 2 references relatively from the
dist
dir instead?https://github.com/Automattic/jetpack-forms/tree/1facd39f1b5d34ca8ed31b7f9d0fde2d8d94c540/dist/contact-form/js
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Certainly!