Ticket #19027: xmlrpc.2.diff
| File xmlrpc.2.diff, 2.6 KB (added by josephscott, 16 months ago) |
|---|
-
wp-includes/class-wp-xmlrpc-server.php
2786 2786 if ($postdata['post_date'] != '') { 2787 2787 $post_date = mysql2date('Ymd\TH:i:s', $postdata['post_date'], false); 2788 2788 $post_date_gmt = mysql2date('Ymd\TH:i:s', $postdata['post_date_gmt'], false); 2789 $post_modified = mysql2date('Ymd\TH:i:s', $postdata['post_modified'], false); 2790 $post_modified_gmt = mysql2date('Ymd\TH:i:s', $postdata['post_modified_gmt'], false); 2789 2791 2790 2792 // For drafts use the GMT version of the post date 2791 if ( $postdata['post_status'] == 'draft' ) 2793 if ( $postdata['post_status'] == 'draft' ) { 2792 2794 $post_date_gmt = get_gmt_from_date( mysql2date( 'Y-m-d H:i:s', $postdata['post_date'] ), 'Ymd\TH:i:s' ); 2795 $post_modified_gmt = get_gmt_from_date( mysql2date( 'Y-m-d H:i:s', $postdata['post_modified'] ), 'Ymd\TH:i:s' ); 2796 } 2793 2797 2794 2798 $categories = array(); 2795 2799 $catids = wp_get_post_categories($post_ID); … … 2865 2869 'post_status' => $postdata['post_status'], 2866 2870 'custom_fields' => $this->get_custom_fields($post_ID), 2867 2871 'wp_post_format' => $post_format, 2868 'sticky' => $sticky 2872 'sticky' => $sticky, 2873 'date_modified' => new IXR_Date( $post_modified ), 2874 'date_modified_gmt' => new IXR_Date( $post_modified_gmt ) 2869 2875 ); 2870 2876 2871 2877 if ( !empty($enclosure) ) $resp['enclosure'] = $enclosure; … … 2912 2918 2913 2919 $post_date = mysql2date('Ymd\TH:i:s', $entry['post_date'], false); 2914 2920 $post_date_gmt = mysql2date('Ymd\TH:i:s', $entry['post_date_gmt'], false); 2921 $post_modified = mysql2date('Ymd\TH:i:s', $entry['post_modified'], false); 2922 $post_modified_gmt = mysql2date('Ymd\TH:i:s', $entry['post_modified_gmt'], false); 2915 2923 2916 2924 // For drafts use the GMT version of the date 2917 if ( $entry['post_status'] == 'draft' ) 2925 if ( $entry['post_status'] == 'draft' ) { 2918 2926 $post_date_gmt = get_gmt_from_date( mysql2date( 'Y-m-d H:i:s', $entry['post_date'] ), 'Ymd\TH:i:s' ); 2927 $post_modified_gmt = get_gmt_from_date( mysql2date( 'Y-m-d H:i:s', $entry['post_modified'] ), 'Ymd\TH:i:s' ); 2928 } 2919 2929 2920 2930 $categories = array(); 2921 2931 $catids = wp_get_post_categories($entry['ID']); … … 2974 2984 'date_created_gmt' => new IXR_Date($post_date_gmt), 2975 2985 'post_status' => $entry['post_status'], 2976 2986 'custom_fields' => $this->get_custom_fields($entry['ID']), 2977 'wp_post_format' => $post_format 2987 'wp_post_format' => $post_format, 2988 'date_modified' => new IXR_Date( $post_modified ), 2989 'date_modified_gmt' => new IXR_Date( $post_modified_gmt ) 2978 2990 ); 2979 2991 2980 2992 }
