Ticket #17109: 17109.diff
File 17109.diff, 2.1 KB (added by , 14 years ago) |
---|
-
wp-includes/class-wp-xmlrpc-server.php
888 888 return(new IXR_Error(500, __("Sorry, the new category failed."))); 889 889 } 890 890 891 do_action( 'xmlrpc_call_success_wp_newCategory', $cat_id, $args ); 892 891 893 return($cat_id); 892 894 } 893 895 … … 915 917 if ( !current_user_can("manage_categories") ) 916 918 return new IXR_Error( 401, __( "Sorry, you do not have the right to delete a category." ) ); 917 919 918 return wp_delete_term( $category_id, 'category' ); 920 $status = wp_delete_term( $category_id, 'category' ); 921 922 if( true == $status ) 923 do_action( 'xmlrpc_call_success_wp_deleteCategory', $category_id, $args ); 924 925 return $status; 919 926 } 920 927 921 928 /** … … 1107 1114 if ( ! get_comment($comment_ID) ) 1108 1115 return new IXR_Error( 404, __( 'Invalid comment ID.' ) ); 1109 1116 1110 return wp_delete_comment($comment_ID); 1117 $status = wp_delete_comment( $comment_ID ); 1118 1119 if( true == $status ) 1120 do_action( 'xmlrpc_call_success_wp_deleteComment', $comment_ID, $args ); 1121 1122 return $status; 1111 1123 } 1112 1124 1113 1125 /** … … 1179 1191 if ( !$result ) 1180 1192 return new IXR_Error(500, __('Sorry, the comment could not be edited. Something wrong happened.')); 1181 1193 1194 do_action( 'xmlrpc_call_success_wp_editComment', $comment_ID, $args ); 1195 1182 1196 return true; 1183 1197 } 1184 1198 … … 1262 1276 1263 1277 do_action('xmlrpc_call', 'wp.newComment'); 1264 1278 1265 return wp_new_comment($comment); 1279 $comment_ID = wp_new_comment( $comment ); 1280 1281 do_action( 'xmlrpc_call_success_wp_newComment', $comment_ID, $args ); 1282 1283 return $comment_ID; 1266 1284 } 1267 1285 1268 1286 /** … … 3013 3031 $id = wp_insert_attachment( $attachment, $upload[ 'file' ], $post_id ); 3014 3032 wp_update_attachment_metadata( $id, wp_generate_attachment_metadata( $id, $upload['file'] ) ); 3015 3033 3034 do_action( 'xmlrpc_call_success_mw_newMediaObject', $id, $args ); 3035 3016 3036 return apply_filters( 'wp_handle_upload', array( 'file' => $name, 'url' => $upload[ 'url' ], 'type' => $type ), 'upload' ); 3017 3037 } 3018 3038