Automattic/jetpack — pull request #1359 by jkudish (2014-12-03 09:59:26+00:00)
Title: Add XMLRPC endpoint to refresh publicize conns.

We are introducting v1.1 of publicize connection endpoints in the WP.com/Jetpack REST API.

Because all information about keyring tokens and publicize connections is stored on WordPress.com and not on the remote Jetpack side, we are not going to duplicate these endpoints in Jetpack proper. Instead, we're adding Jetpack support by keeping the code for the endpoints on WordPress.com only.

These new endpoints allow both the creation and deletion of publicize connections on the remote Jetpack site. In order for the sharing options page to be up to date on the Jetpack site, we need to update the `publicize_connections` Jetpack option whenever a connection is added or removed on the WP.com side.

To do so requires remotely forcing the refresh of the `publicize_connections` option. Previously, this option was only refreshed when a connection was completed from the Jetpack site via the sharing page UI. Now we also allow refreshing this option via a remote XMLRPC call, which will be triggered from the WP.com JSON API endpoint.