Make WordPress Core

Changeset 17647


Ignore:
Timestamp:
04/18/2011 07:26:42 AM (14 years ago)
Author:
westi
Message:

More better phpdoc for XMLRPC functions. See #15238 props koke.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/class-wp-xmlrpc-server.php

    r17646 r17647  
    10361036     * Retrieve comments.
    10371037     *
     1038     * Besides the common blog_id, username, and password arguments, it takes a filter
     1039     * array as last argument.
     1040     *
     1041     * Accepted 'filter' keys are 'status', 'post_id', 'offset', and 'number'.
     1042     *
     1043     * The defaults are as follows:
     1044     * - 'status' - Default is ''. Filter by status (e.g., 'approve', 'hold')
     1045     * - 'post_id' - Default is ''. The post where the comment is posted. Empty string shows all comments.
     1046     * - 'number' - Default is 10. Total number of media items to retrieve.
     1047     * - 'offset' - Default is 0. See {@link WP_Query::query()} for more.
     1048     *
    10381049     * @since 2.7.0
    10391050     *
    10401051     * @param array $args Method parameters.
    1041      * @return array
     1052     * @return array. Contains a collection of comments. See {@link wp_xmlrpc_server::wp_getComment()} for a description of each item contents
    10421053     */
    10431054    function wp_getComments($args) {
     
    10831094        $comments_struct = array();
    10841095
     1096    // FIXME: we already have the comments, why query them again?
    10851097        for ( $i = 0; $i < $num_comments; $i++ ) {
    10861098            $comment = wp_xmlrpc_server::wp_getComment(array(
     
    10941106
    10951107    /**
    1096      * Remove comment.
     1108     * Delete a comment.
     1109     *
     1110     * By default, the comment will be moved to the trash instead of deleted.
     1111     * See {@link wp_delete_comment()} for more information on
     1112     * this behavior.
    10971113     *
    10981114     * @since 2.7.0
    10991115     *
    1100      * @param array $args Method parameters.
     1116     * @param array $args Method parameters. Contains:
     1117     *  - blog_id
     1118     *  - username
     1119     *  - password
     1120     *  - comment_id
    11011121     * @return mixed {@link wp_delete_comment()}
    11021122     */
     
    11291149     * Edit comment.
    11301150     *
     1151     * Besides the common blog_id, username, and password arguments, it takes a
     1152     * comment_id integer and a content_struct array as last argument.
     1153     *
     1154     * The allowed keys in the content_struct array are:
     1155     *  - 'author'
     1156     *  - 'author_url'
     1157     *  - 'author_email'
     1158     *  - 'content'
     1159     *  - 'date_created_gmt'
     1160     *  - 'status'. Common statuses are 'approve', 'hold', 'spam'. See {@link get_comment_statuses()} for more details
     1161     *
    11311162     * @since 2.7.0
    11321163     *
    1133      * @param array $args Method parameters.
     1164     * @param array $args. Contains:
     1165     *  - blog_id
     1166     *  - username
     1167     *  - password
     1168     *  - comment_id
     1169     *  - content_struct
    11341170     * @return bool True, on success.
    11351171     */
Note: See TracChangeset for help on using the changeset viewer.