Make WordPress Core


Ignore:
Timestamp:
06/20/2020 12:00:07 PM (6 years ago)
Author:
SergeyBiryukov
Message:

Docs: Capitalize "ID", when referring to a post ID, term ID, etc. in a more consistent way.

See #49572.

File:
1 edited

Legend:

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

    r48100 r48104  
    13951395 *
    13961396 * @param int|WP_Comment $comment_id   Comment ID or WP_Comment object.
    1397  * @param bool           $force_delete Whether to bypass Trash and force deletion. Default is false.
     1397 * @param bool           $force_delete Whether to bypass Trash and force deletion. Default false.
    13981398 * @return bool True on success, false on failure.
    13991399 */
     
    14591459
    14601460        wp_transition_comment_status( 'delete', $comment->comment_approved, $comment );
     1461
    14611462        return true;
    14621463}
     
    15091510                 */
    15101511                do_action( 'trashed_comment', $comment->comment_ID, $comment );
     1512
    15111513                return true;
    15121514        }
     
    15481550                delete_comment_meta( $comment->comment_ID, '_wp_trash_meta_time' );
    15491551                delete_comment_meta( $comment->comment_ID, '_wp_trash_meta_status' );
     1552
    15501553                /**
    15511554                 * Fires immediately after a comment is restored from the Trash.
     
    15581561                 */
    15591562                do_action( 'untrashed_comment', $comment->comment_ID, $comment );
     1563
    15601564                return true;
    15611565        }
     
    15941598                add_comment_meta( $comment->comment_ID, '_wp_trash_meta_status', $comment->comment_approved );
    15951599                add_comment_meta( $comment->comment_ID, '_wp_trash_meta_time', time() );
     1600
    15961601                /**
    15971602                 * Fires immediately after a comment is marked as Spam.
     
    16041609                 */
    16051610                do_action( 'spammed_comment', $comment->comment_ID, $comment );
     1611
    16061612                return true;
    16071613        }
     
    16431649                delete_comment_meta( $comment->comment_ID, '_wp_trash_meta_status' );
    16441650                delete_comment_meta( $comment->comment_ID, '_wp_trash_meta_time' );
     1651
    16451652                /**
    16461653                 * Fires immediately after a comment is unmarked as Spam.
     
    16531660                 */
    16541661                do_action( 'unspammed_comment', $comment->comment_ID, $comment );
     1662
    16551663                return true;
    16561664        }
     
    19861994        if ( isset( $commentdata['user_ID'] ) ) {
    19871995                /**
    1988                  * Filters the comment author's user id before it is set.
     1996                 * Filters the comment author's user ID before it is set.
    19891997                 *
    19901998                 * The first time this filter is evaluated, 'user_ID' is checked
     
    22802288 * @param int|WP_Comment $comment_id     Comment ID or WP_Comment object.
    22812289 * @param string         $comment_status New comment status, either 'hold', 'approve', 'spam', or 'trash'.
    2282  * @param bool           $wp_error       Whether to return a WP_Error object if there is a failure. Default is false.
     2290 * @param bool           $wp_error       Whether to return a WP_Error object if there is a failure. Default false.
    22832291 * @return bool|WP_Error True on success, false or WP_Error on failure.
    22842292 */
     
    24282436        clean_comment_cache( $comment_ID );
    24292437        wp_update_comment_count( $comment_post_ID );
     2438
    24302439        /**
    24312440         * Fires immediately after a comment is updated in the database.
     
    24402449         */
    24412450        do_action( 'edit_comment', $comment_ID, $data );
     2451
    24422452        $comment = get_comment( $comment_ID );
     2453
    24432454        wp_transition_comment_status( $comment->comment_approved, $old_status, $comment );
     2455
    24442456        return $rval;
    24452457}
Note: See TracChangeset for help on using the changeset viewer.