Changeset 39045 for trunk/src/wp-includes/class-wp-xmlrpc-server.php
- Timestamp:
- 10/31/2016 01:26:10 AM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/class-wp-xmlrpc-server.php
r38934 r39045 3554 3554 } 3555 3555 3556 $comment = array(); 3557 $comment['comment_post_ID'] = $post_id; 3556 if ( empty( $content_struct['content'] ) ) { 3557 return new IXR_Error( 403, __( 'Comment is required.' ) ); 3558 } 3559 3560 $comment = array( 3561 'comment_post_ID' => $post_id, 3562 'comment_content' => $content_struct['content'], 3563 ); 3558 3564 3559 3565 if ( $logged_in ) { … … 3591 3597 $comment['comment_parent'] = isset($content_struct['comment_parent']) ? absint($content_struct['comment_parent']) : 0; 3592 3598 3593 $comment['comment_content'] = isset($content_struct['content']) ? $content_struct['content'] : null;3594 3595 3599 /** This action is documented in wp-includes/class-wp-xmlrpc-server.php */ 3596 3600 do_action( 'xmlrpc_call', 'wp.newComment' ); 3597 3601 3598 $comment_ID = wp_new_comment( $comment ); 3602 $comment_ID = wp_new_comment( $comment, true ); 3603 if ( is_wp_error( $comment_ID ) ) { 3604 return new IXR_Error( 403, $comment_ID->get_error_message() ); 3605 } 3606 3607 if ( ! $comment_ID ) { 3608 return new IXR_Error( 403, __( 'An unknown error occurred' ) ); 3609 } 3599 3610 3600 3611 /**
Note: See TracChangeset
for help on using the changeset viewer.