WordPress.org

Make WordPress Core

Changeset 28214


Ignore:
Timestamp:
04/25/14 06:54:33 (4 years ago)
Author:
DrewAPicture
Message:

Ensure the wp_set_comment_status action hook is only documented once.

See #26869.

File:
1 edited

Legend:

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

    r27300 r28214  
    11881188    clean_comment_cache($comment_id); 
    11891189 
    1190     /** 
    1191      * Fires immediately before changing the comment's status to 'delete'. 
    1192      * 
    1193      * @since 1.5.0 
    1194      * 
    1195      * @param int    $comment_id The comment ID. 
    1196      * @param string $status     The new 'delete' comment status. 
    1197      */ 
     1190    /** This action is documented in wp-includes/comment.php */ 
    11981191    do_action( 'wp_set_comment_status', $comment_id, 'delete' ); 
     1192 
    11991193    wp_transition_comment_status('delete', $comment->comment_approved, $comment); 
    12001194    return true; 
     
    17781772 
    17791773    /** 
    1780      * Fires after a comment status has been updated in the database. 
    1781      * 
    1782      * The hook also fires immediately before comment status transition hooks are fired. 
     1774     * Fires immediately before transitioning a comment's status from one to another 
     1775     * in the database. 
    17831776     * 
    17841777     * @since 1.5.0 
    17851778     * 
    1786      * @param int         $comment_id     The comment ID. 
    1787      * @param string|bool $comment_status The comment status. Possible values include 'hold', 
    1788      *                                    'approve', 'spam', 'trash', or false. 
     1779     * @param int         $comment_id     Comment ID. 
     1780     * @param string|bool $comment_status Current comment status. Possible values include 
     1781     *                                    'hold', 'approve', 'spam', 'trash', or false. 
    17891782     */ 
    17901783    do_action( 'wp_set_comment_status', $comment_id, $comment_status ); 
     1784 
    17911785    wp_transition_comment_status($comment_status, $comment_old->comment_approved, $comment); 
    17921786 
Note: See TracChangeset for help on using the changeset viewer.