Use temporary title when creating empty posts. Props mdawaffe. fixes #3097
git-svn-id: http://svn.automattic.com/wordpress/trunk@4570 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
d0e1e744c4
commit
1905a747d4
|
@ -155,7 +155,10 @@ case 'add-meta' :
|
|||
if ( !current_user_can( 'edit_post', $id ) )
|
||||
die('-1');
|
||||
if ( $id < 0 ) {
|
||||
if ( $pid = wp_insert_post() )
|
||||
$now = current_time('timestamp');
|
||||
if ( $pid = wp_insert_post( array(
|
||||
'post_title' => sprintf('Draft created on %s at %s', date(get_option('date_format'), $now), date(get_option('time_format'), $now))
|
||||
) ) )
|
||||
$mid = add_meta( $pid );
|
||||
else
|
||||
die('0');
|
||||
|
|
Loading…
Reference in New Issue