- Timestamp:
- 12/14/2018 05:12:12 AM (6 years ago)
- Location:
- trunk
- Files:
-
- 9 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-comment-query.php
r42875 r44166 636 636 $offset = absint( $this->query_vars['offset'] ); 637 637 $paged = absint( $this->query_vars['paged'] ); 638 $limits = ''; 638 639 639 640 if ( ! empty( $number ) ) { … … 820 821 } 821 822 822 $join = ''; 823 $join = ''; 824 $groupby = ''; 823 825 824 826 if ( $join_posts_table ) { -
trunk/src/wp-includes/class-wp-network-query.php
r42876 r44166 328 328 $number = absint( $this->query_vars['number'] ); 329 329 $offset = absint( $this->query_vars['offset'] ); 330 $limits = ''; 330 331 331 332 if ( ! empty( $number ) ) { … … 392 393 393 394 $where = implode( ' AND ', $this->sql_clauses['where'] ); 395 396 $groupby = ''; 394 397 395 398 $pieces = array( 'fields', 'join', 'where', 'orderby', 'limits', 'groupby' ); -
trunk/src/wp-includes/class-wp-site-query.php
r43010 r44166 421 421 $number = absint( $this->query_vars['number'] ); 422 422 $offset = absint( $this->query_vars['offset'] ); 423 $limits = ''; 423 424 424 425 if ( ! empty( $number ) ) { … … 585 586 $where = implode( ' AND ', $this->sql_clauses['where'] ); 586 587 588 $groupby = ''; 589 587 590 $pieces = array( 'fields', 'join', 'where', 'orderby', 'limits', 'groupby' ); 588 591 -
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. -
trunk/src/wp-includes/comment.php
r43982 r44166 3083 3083 function wp_handle_comment_submission( $comment_data ) { 3084 3084 3085 $comment_post_ID = $comment_parent = 0;3085 $comment_post_ID = $comment_parent = $user_ID = 0; 3086 3086 $comment_author = $comment_author_email = $comment_author_url = $comment_content = null; 3087 3087 -
trunk/src/wp-includes/post.php
r44150 r44166 3603 3603 } 3604 3604 3605 $new_postarr = array_merge( 3606 array( 3607 'ID' => $post_ID, 3608 ), 3609 compact( array_diff( array_keys( $defaults ), array( 'context', 'filter' ) ) ) 3610 ); 3611 3605 3612 /** 3606 3613 * Filters the post parent -- used to check for and prevent hierarchy loops. … … 3613 3620 * @param array $postarr Array of sanitized, but otherwise unmodified post data. 3614 3621 */ 3615 $post_parent = apply_filters( 'wp_insert_post_parent', $post_parent, $post_ID, compact( array_keys( $postarr ) ), $postarr );3622 $post_parent = apply_filters( 'wp_insert_post_parent', $post_parent, $post_ID, $new_postarr, $postarr ); 3616 3623 3617 3624 /* -
trunk/tests/phpunit/tests/dependencies/scripts.php
r44115 r44166 868 868 */ 869 869 public function test_wp_enqueue_code_editor_when_generated_array_by_compact_will_be_passed() { 870 $file = ''; 870 871 $wp_enqueue_code_editor = wp_enqueue_code_editor( compact( 'file' ) ); 871 872 $this->assertNonEmptyMultidimensionalArray( $wp_enqueue_code_editor ); -
trunk/tests/qunit/fixtures/wp-api-generated.js
r44154 r44166 5087 5087 "date": "2017-02-14T00:00:00", 5088 5088 "date_gmt": "2017-02-14T00:00:00", 5089 "id": 3 162,5089 "id": 36744, 5090 5090 "modified": "2017-02-14T00:00:00", 5091 5091 "modified_gmt": "2017-02-14T00:00:00", 5092 "parent": 3 161,5093 "slug": "3 161-revision-v1",5092 "parent": 36743, 5093 "slug": "36743-revision-v1", 5094 5094 "guid": { 5095 "rendered": "http://example.org/?p=3 162"5095 "rendered": "http://example.org/?p=36744" 5096 5096 }, 5097 5097 "title": { … … 5107 5107 "parent": [ 5108 5108 { 5109 "href": "http://example.org/index.php?rest_route=/wp/v2/posts/3 161"5109 "href": "http://example.org/index.php?rest_route=/wp/v2/posts/36743" 5110 5110 } 5111 5111 ] … … 5142 5142 "date": "2017-02-14T00:00:00", 5143 5143 "date_gmt": "2017-02-14T00:00:00", 5144 "id": 3 163,5144 "id": 36745, 5145 5145 "modified": "2017-02-14T00:00:00", 5146 5146 "modified_gmt": "2017-02-14T00:00:00", 5147 "parent": 3 161,5148 "slug": "3 161-autosave-v1",5147 "parent": 36743, 5148 "slug": "36743-autosave-v1", 5149 5149 "guid": { 5150 "rendered": "http://example.org/?p=3 163"5150 "rendered": "http://example.org/?p=36745" 5151 5151 }, 5152 5152 "title": { … … 5162 5162 "parent": [ 5163 5163 { 5164 "href": "http://example.org/index.php?rest_route=/wp/v2/posts/3 161"5164 "href": "http://example.org/index.php?rest_route=/wp/v2/posts/36743" 5165 5165 } 5166 5166 ] … … 5173 5173 "date": "2017-02-14T00:00:00", 5174 5174 "date_gmt": "2017-02-14T00:00:00", 5175 "id": 3 163,5175 "id": 36745, 5176 5176 "modified": "2017-02-14T00:00:00", 5177 5177 "modified_gmt": "2017-02-14T00:00:00", 5178 "parent": 3 161,5179 "slug": "3 161-autosave-v1",5178 "parent": 36743, 5179 "slug": "36743-autosave-v1", 5180 5180 "guid": { 5181 "rendered": "http://example.org/?p=3 163"5181 "rendered": "http://example.org/?p=36745" 5182 5182 }, 5183 5183 "title": { … … 5347 5347 "date": "2017-02-14T00:00:00", 5348 5348 "date_gmt": "2017-02-14T00:00:00", 5349 "id": 3 165,5349 "id": 36747, 5350 5350 "modified": "2017-02-14T00:00:00", 5351 5351 "modified_gmt": "2017-02-14T00:00:00", 5352 "parent": 3 164,5353 "slug": "3 164-revision-v1",5352 "parent": 36746, 5353 "slug": "36746-revision-v1", 5354 5354 "guid": { 5355 "rendered": "http://example.org/?p=3 165"5355 "rendered": "http://example.org/?p=36747" 5356 5356 }, 5357 5357 "title": { … … 5367 5367 "parent": [ 5368 5368 { 5369 "href": "http://example.org/index.php?rest_route=/wp/v2/pages/3 164"5369 "href": "http://example.org/index.php?rest_route=/wp/v2/pages/36746" 5370 5370 } 5371 5371 ] … … 5402 5402 "date": "2017-02-14T00:00:00", 5403 5403 "date_gmt": "2017-02-14T00:00:00", 5404 "id": 3 166,5404 "id": 36748, 5405 5405 "modified": "2017-02-14T00:00:00", 5406 5406 "modified_gmt": "2017-02-14T00:00:00", 5407 "parent": 3 164,5408 "slug": "3 164-autosave-v1",5407 "parent": 36746, 5408 "slug": "36746-autosave-v1", 5409 5409 "guid": { 5410 "rendered": "http://example.org/?p=3 166"5410 "rendered": "http://example.org/?p=36748" 5411 5411 }, 5412 5412 "title": { … … 5422 5422 "parent": [ 5423 5423 { 5424 "href": "http://example.org/index.php?rest_route=/wp/v2/pages/3 164"5424 "href": "http://example.org/index.php?rest_route=/wp/v2/pages/36746" 5425 5425 } 5426 5426 ] … … 5433 5433 "date": "2017-02-14T00:00:00", 5434 5434 "date_gmt": "2017-02-14T00:00:00", 5435 "id": 3 166,5435 "id": 36748, 5436 5436 "modified": "2017-02-14T00:00:00", 5437 5437 "modified_gmt": "2017-02-14T00:00:00", 5438 "parent": 3 164,5439 "slug": "3 164-autosave-v1",5438 "parent": 36746, 5439 "slug": "36746-autosave-v1", 5440 5440 "guid": { 5441 "rendered": "http://example.org/?p=3 166"5441 "rendered": "http://example.org/?p=36748" 5442 5442 }, 5443 5443 "title": {
Note: See TracChangeset
for help on using the changeset viewer.