Changeset 44166 for trunk/src/wp-includes/class-wp-xmlrpc-server.php
- Timestamp:
- 12/14/2018 05:12:12 AM (6 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk
- Property svn:mergeinfo changed
/branches/5.0 merged: 43819,43832
- Property svn:mergeinfo changed
-
trunk/src/wp-includes/class-wp-xmlrpc-server.php
r43571 r44166 3700 3700 /** This action is documented in wp-includes/class-wp-xmlrpc-server.php */ 3701 3701 do_action( 'xmlrpc_call', 'wp.editComment' ); 3702 $comment = array( 3703 'comment_ID' => $comment_ID, 3704 ); 3702 3705 3703 3706 if ( isset( $content_struct['status'] ) ) { … … 3708 3711 return new IXR_Error( 401, __( 'Invalid comment status.' ) ); 3709 3712 } 3710 $comment_approved = $content_struct['status']; 3713 3714 $comment['comment_approved'] = $content_struct['status']; 3711 3715 } 3712 3716 … … 3714 3718 if ( ! empty( $content_struct['date_created_gmt'] ) ) { 3715 3719 // We know this is supposed to be GMT, so we're going to slap that Z on there by force 3716 $dateCreated = rtrim( $content_struct['date_created_gmt']->getIso(), 'Z' ) . 'Z';3717 $comment _date= get_date_from_gmt( iso8601_to_datetime( $dateCreated ) );3718 $comment _date_gmt= iso8601_to_datetime( $dateCreated, 'GMT' );3720 $dateCreated = rtrim( $content_struct['date_created_gmt']->getIso(), 'Z' ) . 'Z'; 3721 $comment['comment_date'] = get_date_from_gmt( iso8601_to_datetime( $dateCreated ) ); 3722 $comment['comment_date_gmt'] = iso8601_to_datetime( $dateCreated, 'GMT' ); 3719 3723 } 3720 3724 3721 3725 if ( isset( $content_struct['content'] ) ) { 3722 $comment _content= $content_struct['content'];3726 $comment['comment_content'] = $content_struct['content']; 3723 3727 } 3724 3728 3725 3729 if ( isset( $content_struct['author'] ) ) { 3726 $comment _author= $content_struct['author'];3730 $comment['comment_author'] = $content_struct['author']; 3727 3731 } 3728 3732 3729 3733 if ( isset( $content_struct['author_url'] ) ) { 3730 $comment _author_url= $content_struct['author_url'];3734 $comment['comment_author_url'] = $content_struct['author_url']; 3731 3735 } 3732 3736 3733 3737 if ( isset( $content_struct['author_email'] ) ) { 3734 $comment_author_email = $content_struct['author_email']; 3735 } 3736 3737 // We've got all the data -- post it: 3738 $comment = compact( 'comment_ID', 'comment_content', 'comment_approved', 'comment_date', 'comment_date_gmt', 'comment_author', 'comment_author_email', 'comment_author_url' ); 3738 $comment['comment_author_email'] = $content_struct['author_email']; 3739 } 3739 3740 3740 3741 $result = wp_update_comment( $comment ); … … 5262 5263 if ( isset( $content_struct['wp_password'] ) ) { 5263 5264 $post_password = $content_struct['wp_password']; 5265 } else { 5266 $post_password = ''; 5264 5267 } 5265 5268 … … 5267 5270 if ( isset( $content_struct['wp_page_parent_id'] ) ) { 5268 5271 $post_parent = $content_struct['wp_page_parent_id']; 5272 } else { 5273 $post_parent = 0; 5269 5274 } 5270 5275 … … 5272 5277 if ( isset( $content_struct['wp_page_order'] ) ) { 5273 5278 $menu_order = $content_struct['wp_page_order']; 5279 } else { 5280 $menu_order = 0; 5274 5281 } 5275 5282 … … 5600 5607 $this->escape( $postdata ); 5601 5608 5602 $ID = $postdata['ID']; 5603 $post_content = $postdata['post_content']; 5604 $post_title = $postdata['post_title']; 5605 $post_excerpt = $postdata['post_excerpt']; 5606 $post_password = $postdata['post_password']; 5607 $post_parent = $postdata['post_parent']; 5608 $post_type = $postdata['post_type']; 5609 $menu_order = $postdata['menu_order']; 5609 $ID = $postdata['ID']; 5610 $post_content = $postdata['post_content']; 5611 $post_title = $postdata['post_title']; 5612 $post_excerpt = $postdata['post_excerpt']; 5613 $post_password = $postdata['post_password']; 5614 $post_parent = $postdata['post_parent']; 5615 $post_type = $postdata['post_type']; 5616 $menu_order = $postdata['menu_order']; 5617 $ping_status = $postdata['ping_status']; 5618 $comment_status = $postdata['comment_status']; 5610 5619 5611 5620 // Let WordPress manage slug if none was provided.
Note: See TracChangeset
for help on using the changeset viewer.