Ticket #19733: patch-core-19733.diff
| File patch-core-19733.diff, 2.4 KB (added by , 14 years ago) |
|---|
-
wp-includes/class-wp-xmlrpc-server.php
495 495 $page_date_gmt = mysql2date('Ymd\TH:i:s', $page->post_date_gmt, false); 496 496 497 497 // For drafts use the GMT version of the date 498 if ( $page->post_status == 'draft')498 if ( in_array( $page->post_status, array( 'draft', 'pending', 'auto-draft' ) ) ) 499 499 $page_date_gmt = get_gmt_from_date( mysql2date( 'Y-m-d H:i:s', $page->post_date ), 'Ymd\TH:i:s' ); 500 500 501 501 // Pull the categories info together. … … 761 761 $page_list[$i]->date_created_gmt = new IXR_Date($post_date_gmt); 762 762 763 763 // For drafts use the GMT version of the date 764 if ( $page_list[$i]->post_status == 'draft') {764 if ( in_array( $page_list[$i]->post_status, array( 'draft', 'pending', 'auto-draft' ) ) ) { 765 765 $page_list[$i]->date_created_gmt = get_gmt_from_date( mysql2date( 'Y-m-d H:i:s', $page_list[$i]->post_date ), 'Ymd\TH:i:s' ); 766 766 $page_list[$i]->date_created_gmt = new IXR_Date( $page_list[$i]->date_created_gmt ); 767 767 } … … 2780 2780 $post_date_gmt = mysql2date('Ymd\TH:i:s', $postdata['post_date_gmt'], false); 2781 2781 2782 2782 // For drafts use the GMT version of the post date 2783 if ( $postdata['post_status'] == 'draft')2783 if ( in_array( $postdata['post_status'], array( 'draft', 'pending', 'auto-draft' ) ) ) 2784 2784 $post_date_gmt = get_gmt_from_date( mysql2date( 'Y-m-d H:i:s', $postdata['post_date'] ), 'Ymd\TH:i:s' ); 2785 2785 2786 2786 $categories = array(); … … 2906 2906 $post_date_gmt = mysql2date('Ymd\TH:i:s', $entry['post_date_gmt'], false); 2907 2907 2908 2908 // For drafts use the GMT version of the date 2909 if ( $entry['post_status'] == 'draft')2909 if ( in_array( $entry['post_status'], array( 'draft', 'pending', 'auto-draft' ) ) ) 2910 2910 $post_date_gmt = get_gmt_from_date( mysql2date( 'Y-m-d H:i:s', $entry['post_date'] ), 'Ymd\TH:i:s' ); 2911 2911 2912 2912 $categories = array(); … … 3157 3157 $post_date_gmt = mysql2date('Ymd\TH:i:s', $entry['post_date_gmt'], false); 3158 3158 3159 3159 // For drafts use the GMT version of the date 3160 if ( $entry['post_status'] == 'draft')3160 if ( in_array( $entry['post_status'], array( 'draft', 'pending', 'auto-draft' ) ) ) 3161 3161 $post_date_gmt = get_gmt_from_date( mysql2date( 'Y-m-d H:i:s', $entry['post_date'] ), 'Ymd\TH:i:s' ); 3162 3162 3163 3163 $struct[] = array(