Make WordPress Core


Ignore:
Timestamp:
09/26/2015 03:37:53 AM (11 years ago)
Author:
wonderboymusic
Message:

XML-RPC: In wp_xmlrpc_server::mw_newPost(), if $dateCreated is not set, don't set post_date and post_date_gmt. It calls wp_insert_post(), which will handle it correctly. The problem was drafts being created and GMT date being set. It shouldn't be.

Adds unit test.

Fixes #16985.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/class-wp-xmlrpc-server.php

    r34570 r34572  
    49324932                        $post_date_gmt = iso8601_to_datetime($dateCreated, 'GMT');
    49334933                } else {
    4934                         $post_date = current_time('mysql');
    4935                         $post_date_gmt = current_time('mysql', 1);
     4934                        $post_date = '';
     4935                        $post_date_gmt = '';
    49364936                }
    49374937
Note: See TracChangeset for help on using the changeset viewer.