Port autosave to jquery. Props rmccue. see #3824

git-svn-id: http://svn.automattic.com/wordpress/trunk@6546 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan
2008-01-04 08:46:33 +00:00
parent 594820e5b0
commit e46b5e6bc2
9 changed files with 791 additions and 99 deletions
+4
View File
@@ -1002,11 +1002,15 @@ function wp_insert_post($postarr = array()) {
if (empty($post_date)) {
if ( !in_array($post_status, array('draft', 'pending')) )
$post_date = current_time('mysql');
else
$post_date = '0000-00-00 00:00:00';
}
if (empty($post_date_gmt)) {
if ( !in_array($post_status, array('draft', 'pending')) )
$post_date_gmt = get_gmt_from_date($post_date);
else
$post_date_gmt = '0000-00-00 00:00:00';
}
if ( $update ) {