Changeset 48104 for trunk/src/wp-includes/comment.php
- Timestamp:
- 06/20/2020 12:00:07 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/comment.php
r48100 r48104 1395 1395 * 1396 1396 * @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 isfalse.1397 * @param bool $force_delete Whether to bypass Trash and force deletion. Default false. 1398 1398 * @return bool True on success, false on failure. 1399 1399 */ … … 1459 1459 1460 1460 wp_transition_comment_status( 'delete', $comment->comment_approved, $comment ); 1461 1461 1462 return true; 1462 1463 } … … 1509 1510 */ 1510 1511 do_action( 'trashed_comment', $comment->comment_ID, $comment ); 1512 1511 1513 return true; 1512 1514 } … … 1548 1550 delete_comment_meta( $comment->comment_ID, '_wp_trash_meta_time' ); 1549 1551 delete_comment_meta( $comment->comment_ID, '_wp_trash_meta_status' ); 1552 1550 1553 /** 1551 1554 * Fires immediately after a comment is restored from the Trash. … … 1558 1561 */ 1559 1562 do_action( 'untrashed_comment', $comment->comment_ID, $comment ); 1563 1560 1564 return true; 1561 1565 } … … 1594 1598 add_comment_meta( $comment->comment_ID, '_wp_trash_meta_status', $comment->comment_approved ); 1595 1599 add_comment_meta( $comment->comment_ID, '_wp_trash_meta_time', time() ); 1600 1596 1601 /** 1597 1602 * Fires immediately after a comment is marked as Spam. … … 1604 1609 */ 1605 1610 do_action( 'spammed_comment', $comment->comment_ID, $comment ); 1611 1606 1612 return true; 1607 1613 } … … 1643 1649 delete_comment_meta( $comment->comment_ID, '_wp_trash_meta_status' ); 1644 1650 delete_comment_meta( $comment->comment_ID, '_wp_trash_meta_time' ); 1651 1645 1652 /** 1646 1653 * Fires immediately after a comment is unmarked as Spam. … … 1653 1660 */ 1654 1661 do_action( 'unspammed_comment', $comment->comment_ID, $comment ); 1662 1655 1663 return true; 1656 1664 } … … 1986 1994 if ( isset( $commentdata['user_ID'] ) ) { 1987 1995 /** 1988 * Filters the comment author's user idbefore it is set.1996 * Filters the comment author's user ID before it is set. 1989 1997 * 1990 1998 * The first time this filter is evaluated, 'user_ID' is checked … … 2280 2288 * @param int|WP_Comment $comment_id Comment ID or WP_Comment object. 2281 2289 * @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 isfalse.2290 * @param bool $wp_error Whether to return a WP_Error object if there is a failure. Default false. 2283 2291 * @return bool|WP_Error True on success, false or WP_Error on failure. 2284 2292 */ … … 2428 2436 clean_comment_cache( $comment_ID ); 2429 2437 wp_update_comment_count( $comment_post_ID ); 2438 2430 2439 /** 2431 2440 * Fires immediately after a comment is updated in the database. … … 2440 2449 */ 2441 2450 do_action( 'edit_comment', $comment_ID, $data ); 2451 2442 2452 $comment = get_comment( $comment_ID ); 2453 2443 2454 wp_transition_comment_status( $comment->comment_approved, $old_status, $comment ); 2455 2444 2456 return $rval; 2445 2457 }
Note: See TracChangeset
for help on using the changeset viewer.