From bb4d8c73a5b426aa137d7f11d9163a1b13709e78 Mon Sep 17 00:00:00 2001 From: westi Date: Thu, 8 Mar 2012 13:16:26 +0000 Subject: [PATCH] XMLRPC: Add some xmlrpc_call_success_* actions to some of the post creation/deletion calls. Fixes #14283 props ericmann, simonwheatley. git-svn-id: http://svn.automattic.com/wordpress/trunk@20158 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/class-wp-xmlrpc-server.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/wp-includes/class-wp-xmlrpc-server.php b/wp-includes/class-wp-xmlrpc-server.php index e5f7d21e03..277cb39de3 100644 --- a/wp-includes/class-wp-xmlrpc-server.php +++ b/wp-includes/class-wp-xmlrpc-server.php @@ -1792,6 +1792,8 @@ class wp_xmlrpc_server extends IXR_Server { if ( !$result ) return(new IXR_Error(500, __('Failed to delete the page.'))); + do_action( 'xmlrpc_call_success_wp_deletePage', $page_id, $args ); + return(true); } @@ -3191,6 +3193,8 @@ class wp_xmlrpc_server extends IXR_Server { $this->attach_uploads( $post_ID, $post_content ); + do_action( 'xmlrpc_call_success_blogger_newPost', $post_ID, $args ); + return $post_ID; } @@ -3245,6 +3249,8 @@ class wp_xmlrpc_server extends IXR_Server { $this->attach_uploads( $ID, $post_content ); + do_action( 'xmlrpc_call_success_blogger_editPost', $post_ID, $args ); + return true; } @@ -3282,6 +3288,8 @@ class wp_xmlrpc_server extends IXR_Server { if ( !$result ) return new IXR_Error(500, __('For some strange yet very annoying reason, this post could not be deleted.')); + do_action( 'xmlrpc_call_success_blogger_deletePost', $post_ID, $args ); + return true; } @@ -3576,6 +3584,8 @@ class wp_xmlrpc_server extends IXR_Server { if ( !$post_ID ) return new IXR_Error(500, __('Sorry, your entry could not be posted. Something wrong happened.')); + do_action( 'xmlrpc_call_success_mw_newPost', $post_ID, $args ); + return strval($post_ID); } @@ -3867,6 +3877,8 @@ class wp_xmlrpc_server extends IXR_Server { if ( isset( $content_struct['wp_post_format'] ) ) wp_set_post_terms( $post_ID, array( 'post-format-' . $content_struct['wp_post_format'] ), 'post_format' ); + do_action( 'xmlrpc_call_success_mw_editPost', $post_ID, $args ); + return true; }