Ticket #17109: 17109-3.diff
File 17109-3.diff, 2.0 KB (added by , 13 years ago) |
---|
-
wp-includes/class-wp-xmlrpc-server.php
1547 1547 return(new IXR_Error(500, __('Sorry, the new category failed.'))); 1548 1548 } 1549 1549 1550 return ($cat_id);1550 return apply_filters( 'xmlrpc_call_success_wp_newCategory' , $cat_id, $args ); 1551 1551 } 1552 1552 1553 1553 /** … … 1574 1574 if ( !current_user_can('manage_categories') ) 1575 1575 return new IXR_Error( 401, __( 'Sorry, you do not have the right to delete a category.' ) ); 1576 1576 1577 return wp_delete_term( $category_id, 'category' ); 1577 $status = wp_delete_term( $category_id, 'category' ); 1578 1579 if( true == $status ) 1580 apply_filters( 'xmlrpc_call_success_wp_deleteCategory', $category_id, $args ); 1581 1582 return $status; 1578 1583 } 1579 1584 1580 1585 /** … … 1786 1791 1787 1792 do_action('xmlrpc_call', 'wp.deleteComment'); 1788 1793 1789 return wp_delete_comment($comment_ID); 1794 $status = wp_delete_comment( $comment_ID ); 1795 1796 if( true == $status ) 1797 apply_filters( 'xmlrpc_call_success_wp_deleteComment', $comment_ID, $args ); 1798 1799 return $status; 1790 1800 } 1791 1801 1792 1802 /** … … 1874 1884 if ( !$result ) 1875 1885 return new IXR_Error(500, __('Sorry, the comment could not be edited. Something wrong happened.')); 1876 1886 1887 apply_filters( 'xmlrpc_call_success_wp_editComment', $comment_ID, $args ); 1888 1877 1889 return true; 1878 1890 } 1879 1891 … … 1957 1969 1958 1970 do_action('xmlrpc_call', 'wp.newComment'); 1959 1971 1960 return wp_new_comment($comment); 1972 $comment_ID = wp_new_comment( $comment ); 1973 1974 return apply_filters( 'xmlrpc_call_success_wp_newComment', $comment_ID, $args ); 1961 1975 } 1962 1976 1963 1977 /** … … 3745 3759 $id = wp_insert_attachment( $attachment, $upload[ 'file' ], $post_id ); 3746 3760 wp_update_attachment_metadata( $id, wp_generate_attachment_metadata( $id, $upload['file'] ) ); 3747 3761 3762 apply_filters( 'xmlrpc_call_success_mw_newMediaObject', $id, $args ); 3763 3748 3764 return apply_filters( 'wp_handle_upload', array( 'file' => $name, 'url' => $upload[ 'url' ], 'type' => $type ), 'upload' ); 3749 3765 } 3750 3766