WordPress.org

Make WordPress Core

Changeset 29762


Ignore:
Timestamp:
09/23/2014 06:46:52 PM (7 years ago)
Author:
DrewAPicture
Message:

Improve documentation in the check_comments() docblock.

  • Removes two duplicate sentences from the long description
  • Tightens up phrasing elsewhere in the long description for specific checks
  • Clarifies the parameter and return descriptions, and adds periods

See #29734.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/comment.php

    r29469 r29762  
    88
    99/**
    10  * Checks whether a comment passes internal checks to be allowed to add.
    11  *
    12  * If comment moderation is set in the administration, then all comments,
    13  * regardless of their type and whitelist will be set to false. If the number of
    14  * links exceeds the amount in the administration, then the check fails. If any
    15  * of the parameter contents match the blacklist of words, then the check fails.
     10 * Check whether a comment passes internal checks to be allowed to add.
     11 *
     12 * If manual comment moderation is set in the administration, then all checks,
     13 * regardless of their type and whitelist, will fail and the function will
     14 * return false.
    1615 *
    1716 * If the number of links exceeds the amount in the administration, then the
     
    1918 * then the check fails.
    2019 *
    21  * If the comment author was approved before, then the comment is
    22  * automatically whitelisted.
    23  *
    24  * If none of the checks fail, then the failback is to set the check to pass
    25  * (return true).
     20 * If the comment author was approved before, then the comment is automatically
     21 * whitelisted.
     22 *
     23 * If all checks pass, the function will return true.
    2624 *
    2725 * @since 1.2.0
    28  * @uses $wpdb
    29  *
    30  * @param string $author Comment Author's name
    31  * @param string $email Comment Author's email
    32  * @param string $url Comment Author's URL
    33  * @param string $comment Comment contents
    34  * @param string $user_ip Comment Author's IP address
    35  * @param string $user_agent Comment Author's User Agent
    36  * @param string $comment_type Comment type, either user submitted comment,
    37  *      trackback, or pingback
    38  * @return bool Whether the checks passed (true) and the comments should be
    39  *      displayed or set to moderated
     26 *
     27 * @global wpdb $wpdb WordPress database access abstraction object.
     28 *
     29 * @param string $author       Comment author name.
     30 * @param string $email        Comment author email.
     31 * @param string $url          Comment author URL.
     32 * @param string $comment      Content of the comment.
     33 * @param string $user_ip      Comment author IP address.
     34 * @param string $user_agent   Comment author User-Agent.
     35 * @param string $comment_type Comment type, either user-submitted comment,
     36 *                             trackback, or pingback.
     37 * @return bool If all checks pass, true, otherwise false.
    4038 */
    4139function check_comment($author, $email, $url, $comment, $user_ip, $user_agent, $comment_type) {
Note: See TracChangeset for help on using the changeset viewer.