-
Notifications
You must be signed in to change notification settings - Fork 841
Forms: add integration display filters #46112
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
Conversation
|
Are you an Automattician? Please test your changes on all WordPress.com environments to help mitigate accidental explosions.
Interested in more tips and information?
|
|
Thank you for your PR! When contributing to Jetpack, we have a few suggestions that can help us test and review your patch:
This comment will be updated as you work on your PR and make changes. If you think that some of those checks are not needed for your PR, please explain why you think so. Thanks for cooperation 🤖 Follow this PR Review Process:
If you have questions about anything, reach out in #jetpack-developers for guidance! Jetpack plugin: The Jetpack plugin has different release cadences depending on the platform:
If you have any questions about the release process, please ask in the #jetpack-releases channel on Slack. |
| 'canActivatePlugins' => current_user_can( 'activate_plugins' ), | ||
| 'exportNonce' => wp_create_nonce( 'feedback_export' ), | ||
| 'newFormNonce' => wp_create_nonce( 'create_new_form' ), | ||
| 'emptyTrashDays' => defined( 'EMPTY_TRASH_DAYS' ) ? EMPTY_TRASH_DAYS : 0, |
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.
Only thing changing here is we're adding the two new flags. Everything else is just spacing.
Code Coverage SummaryCoverage changed in 5 files.
|
CGastrell
left a comment
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.
Works as described! ![]()
95c2d48 to
a89ab9f
Compare
a89ab9f to
e521466
Compare
Proposed changes:
This PR
jetpack_forms_show_dashboard_integrations)jetpack_forms_show_block_integrations)configendpointContext: Right now, we have a single
jetpack_forms_is_integrations_enabledfilter. We're using it to hide the integrations modal in CIAB. But for CIAB, we want to hide integrations in the dashboard and show them in the block editor. The current filter doesn't allow that nuance.Separately, we'll be updating the
is_integrations_enabledfilter to be more complete. Disabling integrations should will prevent integrations API request and post-submission processing of integrations, neither of which it's doing now. So this will be the wrong filter to use if the goal is just to hide integrations in the dashboard.Other information:
Jetpack product discussion
Slack: p1763398457134859-slack-C052XEUUBL4
Does this pull request change what data or activity we track or use?
No.
Testing instructions:
Ensure you can see integrations modal in both dashboard and block editor to start.
Add the following filter. Confirm integrations still show in block editor but not in dashboard.
add_filter( 'jetpack_forms_show_dashboard_integrations', '__return_false', 20 );Remove the last filter and add the following. Confirm integrations still show in dashboard but not in block editor.
add_filter( 'jetpack_forms_show_block_integrations', '__return_false', 20 );