Changeset 55369 for trunk/src/wp-includes/comment.php
- Timestamp:
- 02/21/2023 01:43:33 AM (22 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/comment.php
r55324 r55369 3476 3476 } 3477 3477 if ( isset( $comment_data['comment_parent'] ) ) { 3478 $comment_parent = absint( $comment_data['comment_parent'] ); 3478 $comment_parent = absint( $comment_data['comment_parent'] ); 3479 $comment_parent_object = get_comment( $comment_parent ); 3480 3481 if ( 3482 0 !== $comment_parent && 3483 ( 3484 ! $comment_parent_object instanceof WP_Comment || 3485 0 === (int) $comment_parent_object->comment_approved 3486 ) 3487 ) { 3488 /** 3489 * Fires when a comment reply is attempted to an unapproved comment. 3490 * 3491 * @since 6.2.0 3492 * 3493 * @param int $comment_post_id Post ID. 3494 * @param int $comment_parent Parent comment ID. 3495 */ 3496 do_action( 'comment_reply_to_unapproved_comment', $comment_post_id, $comment_parent ); 3497 3498 return new WP_Error( 'comment_reply_to_unapproved_comment', __( 'Sorry, replies to unapproved comments are not allowed.' ), 403 ); 3499 } 3479 3500 } 3480 3501 … … 3561 3582 3562 3583 } else { 3563 3564 3584 /** 3565 3585 * Fires before a comment is posted. … … 3570 3590 */ 3571 3591 do_action( 'pre_comment_on_post', $comment_post_id ); 3572 3573 3592 } 3574 3593
Note: See TracChangeset
for help on using the changeset viewer.