Ticket #19027: xmlrpc.diff
| File xmlrpc.diff, 2.3 KB (added by josephscott, 17 months ago) |
|---|
-
class-wp-xmlrpc-server.php
2777 2777 if ($postdata['post_date'] != '') { 2778 2778 $post_date = mysql2date('Ymd\TH:i:s', $postdata['post_date'], false); 2779 2779 $post_date_gmt = mysql2date('Ymd\TH:i:s', $postdata['post_date_gmt'], false); 2780 $post_modified_gmt = mysql2date('Ymd\TH:i:s', $postdata['post_modified_gmt'], false); 2780 2781 2781 2782 // For drafts use the GMT version of the post date 2782 if ( $postdata['post_status'] == 'draft' ) 2783 if ( $postdata['post_status'] == 'draft' ) { 2783 2784 $post_date_gmt = get_gmt_from_date( mysql2date( 'Y-m-d H:i:s', $postdata['post_date'] ), 'Ymd\TH:i:s' ); 2785 $post_modified_gmt = get_gmt_from_date( mysql2date( 'Y-m-d H:i:s', $postdata['post_modified'] ), 'Ymd\TH:i:s' ); 2786 } 2784 2787 2785 2788 $categories = array(); 2786 2789 $catids = wp_get_post_categories($post_ID); … … 2856 2859 'post_status' => $postdata['post_status'], 2857 2860 'custom_fields' => $this->get_custom_fields($post_ID), 2858 2861 'wp_post_format' => $post_format, 2859 'sticky' => $sticky 2862 'sticky' => $sticky, 2863 'date_modified_gmt' => new IXR_Date($post_modified_gmt) 2860 2864 ); 2861 2865 2862 2866 if ( !empty($enclosure) ) $resp['enclosure'] = $enclosure; … … 2903 2907 2904 2908 $post_date = mysql2date('Ymd\TH:i:s', $entry['post_date'], false); 2905 2909 $post_date_gmt = mysql2date('Ymd\TH:i:s', $entry['post_date_gmt'], false); 2910 $post_modified_gmt = mysql2date('Ymd\TH:i:s', $entry['post_modified_gmt'], false); 2906 2911 2907 2912 // For drafts use the GMT version of the date 2908 if ( $entry['post_status'] == 'draft' ) 2913 if ( $entry['post_status'] == 'draft' ) { 2909 2914 $post_date_gmt = get_gmt_from_date( mysql2date( 'Y-m-d H:i:s', $entry['post_date'] ), 'Ymd\TH:i:s' ); 2915 $post_modified_gmt = get_gmt_from_date( mysql2date( 'Y-m-d H:i:s', $entry['post_modified'] ), 'Ymd\TH:i:s' ); 2916 } 2910 2917 2911 2918 $categories = array(); 2912 2919 $catids = wp_get_post_categories($entry['ID']); … … 2965 2972 'date_created_gmt' => new IXR_Date($post_date_gmt), 2966 2973 'post_status' => $entry['post_status'], 2967 2974 'custom_fields' => $this->get_custom_fields($entry['ID']), 2968 'wp_post_format' => $post_format 2975 'wp_post_format' => $post_format, 2976 'date_modified_gmt' => new IXR_Date($post_modified_gmt) 2969 2977 ); 2970 2978 2971 2979 }
