Changeset 43819
- Timestamp:
- 10/24/2018 04:32:29 PM (6 years ago)
- Location:
- branches/5.0
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/5.0/src/wp-includes/class-wp-comment-query.php
r41686 r43819 634 634 $offset = absint( $this->query_vars['offset'] ); 635 635 $paged = absint( $this->query_vars['paged'] ); 636 $limits = ''; 636 637 637 638 if ( ! empty( $number ) ) { … … 818 819 } 819 820 820 $join = ''; 821 $join = ''; 822 $groupby = ''; 821 823 822 824 if ( $join_posts_table ) { -
branches/5.0/src/wp-includes/class-wp-xmlrpc-server.php
r42811 r43819 3518 3518 /** This action is documented in wp-includes/class-wp-xmlrpc-server.php */ 3519 3519 do_action( 'xmlrpc_call', 'wp.editComment' ); 3520 $comment = array( 3521 'comment_ID' => $comment_ID, 3522 ); 3523 3520 3524 3521 3525 if ( isset($content_struct['status']) ) { … … 3525 3529 if ( ! in_array($content_struct['status'], $statuses) ) 3526 3530 return new IXR_Error( 401, __( 'Invalid comment status.' ) ); 3527 $comment_approved= $content_struct['status'];3531 $comment['comment_approved'] = $content_struct['status']; 3528 3532 } 3529 3533 … … 3531 3535 if ( !empty( $content_struct['date_created_gmt'] ) ) { 3532 3536 // We know this is supposed to be GMT, so we're going to slap that Z on there by force 3533 $dateCreated = rtrim( $content_struct['date_created_gmt']->getIso(), 'Z' ) . 'Z'; 3534 $comment_date = get_date_from_gmt(iso8601_to_datetime($dateCreated)); 3535 $comment_date_gmt = iso8601_to_datetime($dateCreated, 'GMT'); 3536 } 3537 3538 if ( isset($content_struct['content']) ) 3539 $comment_content = $content_struct['content']; 3540 3541 if ( isset($content_struct['author']) ) 3542 $comment_author = $content_struct['author']; 3543 3544 if ( isset($content_struct['author_url']) ) 3545 $comment_author_url = $content_struct['author_url']; 3546 3547 if ( isset($content_struct['author_email']) ) 3548 $comment_author_email = $content_struct['author_email']; 3549 3550 // We've got all the data -- post it: 3551 $comment = compact('comment_ID', 'comment_content', 'comment_approved', 'comment_date', 'comment_date_gmt', 'comment_author', 'comment_author_email', 'comment_author_url'); 3537 3538 $dateCreated = rtrim( $content_struct['date_created_gmt']->getIso(), 'Z' ) . 'Z'; 3539 $comment['comment_date'] = get_date_from_gmt( iso8601_to_datetime( $dateCreated ) ); 3540 $comment['comment_date_gmt'] = iso8601_to_datetime( $dateCreated, 'GMT' ); 3541 } 3542 3543 if ( isset($content_struct['content']) ) { 3544 $comment['comment_content'] = $content_struct['content']; 3545 } 3546 3547 if ( isset($content_struct['author']) ) { 3548 $comment['comment_author'] = $content_struct['author']; 3549 } 3550 3551 if ( isset($content_struct['author_url']) ) { 3552 $comment['comment_author_url'] = $content_struct['author_url']; 3553 } 3554 3555 if ( isset($content_struct['author_email']) ) { 3556 $comment['comment_author_email'] = $content_struct['author_email']; 3557 } 3552 3558 3553 3559 $result = wp_update_comment($comment); … … 4990 4996 4991 4997 // Only use a password if one was given. 4992 if ( isset($content_struct['wp_password']) ) 4998 if ( isset($content_struct['wp_password']) ) { 4993 4999 $post_password = $content_struct['wp_password']; 5000 } else { 5001 $post_password = ''; 5002 } 4994 5003 4995 5004 // Only set a post parent if one was provided. 4996 if ( isset($content_struct['wp_page_parent_id']) ) 5005 if ( isset($content_struct['wp_page_parent_id']) ) { 4997 5006 $post_parent = $content_struct['wp_page_parent_id']; 5007 } else { 5008 $post_parent = 0; 5009 } 4998 5010 4999 5011 // Only set the menu_order if it was provided. 5000 if ( isset($content_struct['wp_page_order']) ) 5012 if ( isset($content_struct['wp_page_order']) ) { 5001 5013 $menu_order = $content_struct['wp_page_order']; 5014 } else { 5015 $menu_order = 0; 5016 } 5002 5017 5003 5018 $post_author = $user->ID; … … 5309 5324 $this->escape($postdata); 5310 5325 5311 $ID = $postdata['ID']; 5312 $post_content = $postdata['post_content']; 5313 $post_title = $postdata['post_title']; 5314 $post_excerpt = $postdata['post_excerpt']; 5315 $post_password = $postdata['post_password']; 5316 $post_parent = $postdata['post_parent']; 5317 $post_type = $postdata['post_type']; 5318 $menu_order = $postdata['menu_order']; 5326 $ID = $postdata['ID']; 5327 $post_content = $postdata['post_content']; 5328 $post_title = $postdata['post_title']; 5329 $post_excerpt = $postdata['post_excerpt']; 5330 $post_password = $postdata['post_password']; 5331 $post_parent = $postdata['post_parent']; 5332 $post_type = $postdata['post_type']; 5333 $menu_order = $postdata['menu_order']; 5334 $ping_status = $postdata['ping_status']; 5335 $comment_status = $postdata['comment_status']; 5319 5336 5320 5337 // Let WordPress manage slug if none was provided. -
branches/5.0/src/wp-includes/comment.php
r43729 r43819 2966 2966 function wp_handle_comment_submission( $comment_data ) { 2967 2967 2968 $comment_post_ID = $comment_parent= 0;2968 $comment_post_ID = $comment_parent = $user_ID = 0; 2969 2969 $comment_author = $comment_author_email = $comment_author_url = $comment_content = null; 2970 2970 -
branches/5.0/src/wp-includes/post.php
r43806 r43819 3416 3416 } 3417 3417 3418 $new_postarr = array_merge( 3419 array( 3420 'ID' => $post_ID, 3421 ), 3422 compact( array_diff( array_keys( $defaults ), array( 'context', 'filter' ) ) ) 3423 ); 3424 3418 3425 /** 3419 3426 * Filters the post parent -- used to check for and prevent hierarchy loops. … … 3426 3433 * @param array $postarr Array of sanitized, but otherwise unmodified post data. 3427 3434 */ 3428 $post_parent = apply_filters( 'wp_insert_post_parent', $post_parent, $post_ID, compact( array_keys( $postarr ) ), $postarr );3435 $post_parent = apply_filters( 'wp_insert_post_parent', $post_parent, $post_ID, $new_postarr, $postarr ); 3429 3436 3430 3437 /* -
branches/5.0/tests/phpunit/tests/dependencies/scripts.php
r43788 r43819 862 862 */ 863 863 public function test_wp_enqueue_code_editor_when_generated_array_by_compact_will_be_passed() { 864 $file = ''; 864 865 $wp_enqueue_code_editor = wp_enqueue_code_editor( compact( 'file' ) ); 865 866 $this->assertNonEmptyMultidimensionalArray( $wp_enqueue_code_editor );
Note: See TracChangeset
for help on using the changeset viewer.