diff options
author | Anthony G. Basile <blueness@gentoo.org> | 2016-08-23 20:02:23 -0400 |
---|---|---|
committer | Anthony G. Basile <blueness@gentoo.org> | 2016-08-23 20:02:50 -0400 |
commit | ad3f35663e4e2b80a92166b590d3e2052b5aab91 (patch) | |
tree | 94f987efbdb50e1426956c1c04ac459a19c77e53 /plugins/jetpack/class.jetpack-xmlrpc-server.php | |
parent | bin/update-wordpress: also update twentyfourteen twentyfifteen twentysixteen (diff) | |
download | blogs-gentoo-ad3f35663e4e2b80a92166b590d3e2052b5aab91.tar.gz blogs-gentoo-ad3f35663e4e2b80a92166b590d3e2052b5aab91.tar.bz2 blogs-gentoo-ad3f35663e4e2b80a92166b590d3e2052b5aab91.zip |
Update plugin jetpack to 4.2.2
Diffstat (limited to 'plugins/jetpack/class.jetpack-xmlrpc-server.php')
-rw-r--r-- | plugins/jetpack/class.jetpack-xmlrpc-server.php | 54 |
1 files changed, 1 insertions, 53 deletions
diff --git a/plugins/jetpack/class.jetpack-xmlrpc-server.php b/plugins/jetpack/class.jetpack-xmlrpc-server.php index 9ecad85b..9f3ba88a 100644 --- a/plugins/jetpack/class.jetpack-xmlrpc-server.php +++ b/plugins/jetpack/class.jetpack-xmlrpc-server.php @@ -28,10 +28,6 @@ class Jetpack_XMLRPC_Server { 'jetpack.testAPIUserCode' => array( $this, 'test_api_user_code' ), 'jetpack.featuresAvailable' => array( $this, 'features_available' ), 'jetpack.featuresEnabled' => array( $this, 'features_enabled' ), - 'jetpack.getPost' => array( $this, 'get_post' ), - 'jetpack.getPosts' => array( $this, 'get_posts' ), - 'jetpack.getComment' => array( $this, 'get_comment' ), - 'jetpack.getComments' => array( $this, 'get_comments' ), 'jetpack.disconnectBlog' => array( $this, 'disconnect_blog' ), 'jetpack.unlinkUser' => array( $this, 'unlink_user' ), ) ); @@ -301,7 +297,7 @@ class Jetpack_XMLRPC_Server { 'code' => (string) $api_user_code, ) ), $jetpack_token->secret ); - if ( $hmac !== $verify ) { + if ( ! hash_equals( $hmac, $verify ) ) { return false; } @@ -359,54 +355,6 @@ class Jetpack_XMLRPC_Server { return $modules; } - function get_post( $id ) { - if ( !$id = (int) $id ) { - return false; - } - - $jetpack = Jetpack::init(); - - $post = $jetpack->sync->get_post( $id ); - return $post; - } - - function get_posts( $args ) { - list( $post_ids ) = $args; - $post_ids = array_map( 'intval', (array) $post_ids ); - $jp = Jetpack::init(); - $sync_data = $jp->sync->get_content( array( 'posts' => $post_ids ) ); - - return $sync_data; - } - - function get_comment( $id ) { - if ( !$id = (int) $id ) { - return false; - } - - $jetpack = Jetpack::init(); - - $comment = $jetpack->sync->get_comment( $id ); - if ( !is_array( $comment ) ) - return false; - - $post = $jetpack->sync->get_post( $comment['comment_post_ID'] ); - if ( !$post ) { - return false; - } - - return $comment; - } - - function get_comments( $args ) { - list( $comment_ids ) = $args; - $comment_ids = array_map( 'intval', (array) $comment_ids ); - $jp = Jetpack::init(); - $sync_data = $jp->sync->get_content( array( 'comments' => $comment_ids ) ); - - return $sync_data; - } - function update_attachment_parent( $args ) { $attachment_id = (int) $args[0]; $parent_id = (int) $args[1]; |