[wp-trac] [WordPress Trac] #36595: can't set post_modified in wp_insert_post, becomes post_date
WordPress Trac
noreply at wordpress.org
Tue Apr 19 15:34:31 UTC 2016
#36595: can't set post_modified in wp_insert_post, becomes post_date
-------------------------------+-----------------------------
Reporter: gijsgg | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Posts, Post Types | Version: 4.5
Severity: normal | Keywords:
Focuses: |
-------------------------------+-----------------------------
When manually instering a post, post_modified isn't working, it becomes
the post_date
{{{#!php
<?php
$wp_test = array(
'post_title' => 'test',
'post_content' => 'test',
'post_status' => 'publish',
'post_type' => 'test',
'post_author' => 1,
'post_date' => '2015-01-22 22:00:12',
'post_modified' => '2016-04-18 12:12:12',
'comment_status' => 'closed'
);
wp_insert_post( $wp_test );
}}}
outcome: post_modified = '2015-01-22 22:00:12'
--
Ticket URL: <https://core.trac.wordpress.org/ticket/36595>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list