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! |
Code Coverage SummaryCoverage changed in 1 file.
1 file is newly checked for coverage.
|
|
E2E failures should be fixed by #47803. |
| Partner::init(); | ||
|
|
||
| // WP 7.0+ Connectors screen card (requires WP 7.0+). | ||
| if ( class_exists( Wpcom_Connector::class ) ) { |
There was a problem hiding this comment.
Is this check meant for WP compatibility or just for mid-deploy or mid-load issues? Since the class, Wpcom_Connector, is in the same package. The comment makes it seem as though it's a check relevant to WP 7.0. In class-wcom-connector.php however we check to see if WP_Connector_Registry exists and return otherwise, and that looks like the WP 7.0 relevant check.
Doesn't seem that is needs a class_exists check here anyway.
There was a problem hiding this comment.
Good catch. This is a leftover from an earlier version of solution and not needed any more.
601646e to
44a09d5
Compare
Proposed changes
Adds a WordPress.com connector card for the WP 7.0+ Settings > Connectors screen. When a site has the Jetpack connection package active, this card appears on the new core Connectors page and provides a full management UI for the WordPress.com connection.
PHP (
Wpcom_Connector)wordpress_comconnector via thewp_connectors_initaction and theWP_Connector_RegistryAPI (WP 7.0+). On older WordPress versions the hook never fires, so this is a safe no-op.script_module_data_filter.JavaScript (
connectors-card.js)renderfunction for thewordpress_comconnector using@wordpress/connectors'registerConnector/ConnectorItemAPI.CSS (
connectors-card.css)Tests (
Wpcom_Connector_Test.php)init()idempotency, connector registration, data assembly for disconnected/registered/connected states, screen ID detection, plugin logo mapping, user field resolution (WPCOM override + local fallback), connection owner data withlocalLogin, connected plugins error handling, and page path resolution.Other information
Related product discussion/links
Does this pull request change what data or activity we track or use?
No. This feature surfaces existing Jetpack connection data on a new WordPress core screen. No new data is collected or tracked.
Testing instructions
Prerequisites
Connected owner account
Secondary admin (not linked)
@wpcom_login ( local: local_username ).Disconnected site
Site registered, no owner