Dates for new or updated posts should honor date parameters passed #219

Merged
merged 1 commit into from May 25, 2014

Conversation

Projects
None yet
2 participants
Owner

rachelbaker commented May 24, 2014

There is a bug in the logic of WP_JSON_Posts->insert_post() where even if the $data['date'], $data['date_gmt'], $data['modified'], or $data['modified_gmt'] are not empty the values are populated with the current time in GMT.

This appears to be a blocker for the 1.0 release, if this bug is confirmed by @rmccue.

See current logic here: https://github.com/WP-API/WP-API/blob/master/lib/class-wp-json-posts.php#L1185

rmccue was assigned by rachelbaker May 24, 2014

rachelbaker added the Bug label May 24, 2014

rachelbaker added this to the 1.0 milestone May 24, 2014

Owner

rachelbaker commented May 24, 2014

@rmccue #reviewmerge

Owner

rmccue commented May 25, 2014

Good catch, 👍

@rmccue rmccue added a commit that referenced this pull request May 25, 2014

@rmccue rmccue Merge pull request #219 from WP-API/allow-date-to-be-set
Dates for new or updated posts should honor date parameters passed
2fe9d9b

@rmccue rmccue merged commit 2fe9d9b into master May 25, 2014

1 check passed

continuous-integration/travis-ci The Travis CI build passed
Details

rmccue deleted the allow-date-to-be-set branch May 25, 2014

@kellbot kellbot pushed a commit to kellbot/WP-API that referenced this pull request Aug 1, 2014

@rmccue rmccue Merge pull request #219 from WP-API/allow-date-to-be-set
Dates for new or updated posts should honor date parameters passed
5931d40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment