Ticket #15238: wp-xmlrpcdoc-15238-wip-2.patch
| File wp-xmlrpcdoc-15238-wip-2.patch, 2.7 KB (added by , 15 years ago) |
|---|
-
wp-includes/class-wp-xmlrpc-server.php
1020 1020 /** 1021 1021 * Retrieve comments. 1022 1022 * 1023 * Besides the common blog_id, username, and password arguments, it takes a filter 1024 * array as last argument. 1025 * 1026 * Accepted 'filter' keys are 'status', 'post_id', 'offset', and 'number'. 1027 * 1028 * The defaults are as follows: 1029 * - 'status' - Default is ''. Filter by status (e.g., 'approve', 'hold') 1030 * - 'post_id' - Default is ''. The post where the comment is posted. Empty string shows all comments. 1031 * - 'number' - Default is 10. Total number of media items to retrieve. 1032 * - 'offset' - Default is 0. See {@link WP_Query::query()} for more. 1033 * 1023 1034 * @since 2.7.0 1024 1035 * 1025 1036 * @param array $args Method parameters. 1026 * @return array 1037 * @return array. Contains a collection of comments. See {@link wp_xmlrpc_server::wp_getComment()} for a description of each item contents 1027 1038 */ 1028 1039 function wp_getComments($args) { 1029 1040 $raw_args = $args; … … 1067 1078 1068 1079 $comments_struct = array(); 1069 1080 1081 // FIXME: we already have the comments, why query them again? 1070 1082 for ( $i = 0; $i < $num_comments; $i++ ) { 1071 1083 $comment = wp_xmlrpc_server::wp_getComment(array( 1072 1084 $raw_args[0], $raw_args[1], $raw_args[2], $comments[$i]->comment_ID, … … 1078 1090 } 1079 1091 1080 1092 /** 1081 * Removecomment.1093 * Delete a comment. 1082 1094 * 1095 * By default, the comment will be moved to the trash instead of deleted. 1096 * See {@link wp_delete_comment()} for more information on 1097 * this behavior. 1098 * 1083 1099 * @since 2.7.0 1084 1100 * 1085 * @param array $args Method parameters. 1101 * @param array $args Method parameters. Contains: 1102 * - blog_id 1103 * - username 1104 * - password 1105 * - comment_id 1086 1106 * @return mixed {@link wp_delete_comment()} 1087 1107 */ 1088 1108 function wp_deleteComment($args) { … … 1113 1133 /** 1114 1134 * Edit comment. 1115 1135 * 1136 * Besides the common blog_id, username, and password arguments, it takes a 1137 * comment_id integer and a content_struct array as last argument. 1138 * 1139 * The allowed keys in the content_struct array are: 1140 * - 'author' 1141 * - 'author_url' 1142 * - 'author_email' 1143 * - 'content' 1144 * - 'date_created_gmt' 1145 * - 'status'. Common statuses are 'approve', 'hold', 'spam'. See {@link get_comment_statuses()} for more details 1146 * 1116 1147 * @since 2.7.0 1117 1148 * 1118 * @param array $args Method parameters. 1149 * @param array $args. Contains: 1150 * - blog_id 1151 * - username 1152 * - password 1153 * - comment_id 1154 * - content_struct 1119 1155 * @return bool True, on success. 1120 1156 */ 1121 1157 function wp_editComment($args) {
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)