~canonical-sysadmins/wordpress/4.5.1

« back to all changes in this revision

Viewing changes to wp-includes/class-wp-xmlrpc-server.php

  • Committer: Barry Price
  • Date: 2016-01-07 06:09:42 UTC
  • mfrom: (1.1.12 upstream)
  • Revision ID: barry.price@canonical.com-20160107060942-1ghv2tqiwm8z0j36
Merge WP4.4.1 from upstream

Show diffs side-by-side

added added

removed removed

Lines of Context:
1349
1349
                }
1350
1350
 
1351
1351
                if ( ! empty( $dateCreated ) ) {
1352
 
                        $post_data['post_date'] = iso8601_to_datetime( $dateCreated );
1353
 
                        $post_data['post_date_gmt'] = get_gmt_from_date( $post_data['post_date'] );
 
1352
                        $post_data['post_date'] = get_date_from_gmt( iso8601_to_datetime( $dateCreated ) );
 
1353
                        $post_data['post_date_gmt'] = iso8601_to_datetime( $dateCreated, 'GMT' );
1354
1354
                }
1355
1355
 
1356
1356
                if ( ! isset( $post_data['ID'] ) )
3423
3423
                if ( !empty( $content_struct['date_created_gmt'] ) ) {
3424
3424
                        // We know this is supposed to be GMT, so we're going to slap that Z on there by force
3425
3425
                        $dateCreated = rtrim( $content_struct['date_created_gmt']->getIso(), 'Z' ) . 'Z';
3426
 
                        $comment_date = iso8601_to_datetime( $dateCreated );
3427
 
                        $comment_date_gmt = get_gmt_from_date( $comment_date );
 
3426
                        $comment_date = get_date_from_gmt(iso8601_to_datetime($dateCreated));
 
3427
                        $comment_date_gmt = iso8601_to_datetime($dateCreated, 'GMT');
3428
3428
                }
3429
3429
 
3430
3430
                if ( isset($content_struct['content']) )
4991
4991
                        $dateCreated = $content_struct['dateCreated']->getIso();
4992
4992
 
4993
4993
                if ( !empty( $dateCreated ) ) {
4994
 
                        $post_date = iso8601_to_datetime( $dateCreated );
4995
 
                        $post_date_gmt = get_gmt_from_date( $post_date );
 
4994
                        $post_date = get_date_from_gmt(iso8601_to_datetime($dateCreated));
 
4995
                        $post_date_gmt = iso8601_to_datetime($dateCreated, 'GMT');
4996
4996
                } else {
4997
4997
                        $post_date = '';
4998
4998
                        $post_date_gmt = '';
5345
5345
                        $dateCreated = $content_struct['dateCreated']->getIso();
5346
5346
 
5347
5347
                if ( !empty( $dateCreated ) ) {
5348
 
                        $post_date = iso8601_to_datetime( $dateCreated );
5349
 
                        $post_date_gmt = get_gmt_from_date( $post_date, 'GMT' );
 
5348
                        $post_date = get_date_from_gmt(iso8601_to_datetime($dateCreated));
 
5349
                        $post_date_gmt = iso8601_to_datetime($dateCreated, 'GMT');
5350
5350
                } else {
5351
5351
                        $post_date     = $postdata['post_date'];
5352
5352
                        $post_date_gmt = $postdata['post_date_gmt'];