Ticket #17109: 17109-refresh.diff
File 17109-refresh.diff, 2.1 KB (added by , 13 years ago) |
---|
-
wp-includes/class-wp-xmlrpc-server.php
1563 1563 return(new IXR_Error(500, __('Sorry, the new category failed.'))); 1564 1564 } 1565 1565 1566 return($cat_id); 1566 do_action( 'xmlrpc_call_success_wp_newCategory', $cat_id, $args ); 1567 1568 return $cat_id; 1567 1569 } 1568 1570 1569 1571 /** … … 1590 1592 if ( !current_user_can('manage_categories') ) 1591 1593 return new IXR_Error( 401, __( 'Sorry, you do not have the right to delete a category.' ) ); 1592 1594 1593 return wp_delete_term( $category_id, 'category' ); 1595 $status = wp_delete_term( $category_id, 'category' ); 1596 1597 if( true == $status ) 1598 do_action( 'xmlrpc_call_success_wp_deleteCategory', $category_id, $args ); 1599 1600 return $status; 1594 1601 } 1595 1602 1596 1603 /** … … 1802 1809 1803 1810 do_action('xmlrpc_call', 'wp.deleteComment'); 1804 1811 1805 return wp_delete_comment($comment_ID); 1812 $status = wp_delete_comment( $comment_ID ); 1813 1814 if( true == $status ) 1815 do_action( 'xmlrpc_call_success_wp_deleteComment', $comment_ID, $args ); 1816 1817 return $status; 1806 1818 } 1807 1819 1808 1820 /** … … 1890 1902 if ( !$result ) 1891 1903 return new IXR_Error(500, __('Sorry, the comment could not be edited. Something wrong happened.')); 1892 1904 1905 do_action( 'xmlrpc_call_success_wp_editComment', $comment_ID, $args ); 1906 1893 1907 return true; 1894 1908 } 1895 1909 … … 1973 1987 1974 1988 do_action('xmlrpc_call', 'wp.newComment'); 1975 1989 1976 return wp_new_comment($comment); 1990 $comment_ID = wp_new_comment( $comment ); 1991 1992 do_action( 'xmlrpc_call_success_wp_newComment', $comment_ID, $args ); 1993 1994 return $comment_ID; 1977 1995 } 1978 1996 1979 1997 /** … … 3740 3758 $id = wp_insert_attachment( $attachment, $upload[ 'file' ], $post_id ); 3741 3759 wp_update_attachment_metadata( $id, wp_generate_attachment_metadata( $id, $upload['file'] ) ); 3742 3760 3761 do_action( 'xmlrpc_call_success_mw_newMediaObject', $id, $args ); 3762 3743 3763 return apply_filters( 'wp_handle_upload', array( 'file' => $name, 'url' => $upload[ 'url' ], 'type' => $type ), 'upload' ); 3744 3764 } 3745 3765