diff options
author | Anthony G. Basile <blueness@gentoo.org> | 2016-10-23 07:44:25 -0400 |
---|---|---|
committer | Anthony G. Basile <blueness@gentoo.org> | 2016-10-23 07:44:25 -0400 |
commit | e615e1dc974dd17d20ec6aeb1b7718099241562c (patch) | |
tree | 736d0e069aa69affcd7c3c57a7bb5a158c8b953a /plugins/jetpack/class.jetpack-xmlrpc-server.php | |
parent | Update plugin akismet to 3.2 (diff) | |
download | blogs-gentoo-e615e1dc974dd17d20ec6aeb1b7718099241562c.tar.gz blogs-gentoo-e615e1dc974dd17d20ec6aeb1b7718099241562c.tar.bz2 blogs-gentoo-e615e1dc974dd17d20ec6aeb1b7718099241562c.zip |
Update plugin jetpack to 4.3.2
Diffstat (limited to 'plugins/jetpack/class.jetpack-xmlrpc-server.php')
-rw-r--r-- | plugins/jetpack/class.jetpack-xmlrpc-server.php | 25 |
1 files changed, 20 insertions, 5 deletions
diff --git a/plugins/jetpack/class.jetpack-xmlrpc-server.php b/plugins/jetpack/class.jetpack-xmlrpc-server.php index 9fb1c4fb..a3717fc2 100644 --- a/plugins/jetpack/class.jetpack-xmlrpc-server.php +++ b/plugins/jetpack/class.jetpack-xmlrpc-server.php @@ -31,6 +31,7 @@ class Jetpack_XMLRPC_Server { 'jetpack.disconnectBlog' => array( $this, 'disconnect_blog' ), 'jetpack.unlinkUser' => array( $this, 'unlink_user' ), 'jetpack.syncObject' => array( $this, 'sync_object' ), + 'jetpack.idcUrlValidation' => array( $this, 'validate_urls_for_idc_mitigation' ), ) ); if ( isset( $core_methods['metaWeblog.editPost'] ) ) { @@ -217,7 +218,7 @@ class Jetpack_XMLRPC_Server { /** * Wrapper for wp_authenticate( $username, $password ); * - * @return WP_User|IXR_Error + * @return WP_User|bool */ function login() { Jetpack::init()->require_jetpack_authentication(); @@ -240,7 +241,7 @@ class Jetpack_XMLRPC_Server { /** * Returns the current error as an IXR_Error * - * @return null|IXR_Error + * @return bool|IXR_Error */ function error( $error = null ) { if ( !is_null( $error ) ) { @@ -266,7 +267,7 @@ class Jetpack_XMLRPC_Server { /** * Just authenticates with the given Jetpack credentials. * - * @return bool|IXR_Error + * @return string The current Jetpack version number */ function test_connection() { return JETPACK__VERSION; @@ -352,9 +353,23 @@ class Jetpack_XMLRPC_Server { } /** + * Returns the home URL and site URL for the current site which can be used on the WPCOM side for + * IDC mitigation to decide whether sync should be allowed if the home and siteurl values differ between WPCOM + * and the remote Jetpack site. + * + * @return array + */ + function validate_urls_for_idc_mitigation() { + return array( + 'home' => get_home_url(), + 'siteurl' => get_site_url(), + ); + } + + /** * Returns what features are available. Uses the slug of the module files. * - * @return array|IXR_Error + * @return array */ function features_available() { $raw_modules = Jetpack::get_available_modules(); @@ -369,7 +384,7 @@ class Jetpack_XMLRPC_Server { /** * Returns what features are enabled. Uses the slug of the modules files. * - * @return array|IXR_Error + * @return array */ function features_enabled() { $raw_modules = Jetpack::get_active_modules(); |