Skip to content

Commit

Permalink
Set post title to empty string when titles are disabled.
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Sisk committed Feb 11, 2013
1 parent 991b188 commit 09c0673
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions -/php/posts.php
Original file line number Diff line number Diff line change
Expand Up @@ -225,8 +225,8 @@ public function wp_insert_post_data( $data, $raw ) {
and current_user_can( 'edit_post', $raw[ 'ID' ] )
) {
if ( !in_array( 'title', self::$config[ 'collections' ][ $data[ 'post_type' ] ][ 'supports' ] ) ) {
$data[ 'post_title' ] = 'Auto Draft' === $raw[ 'post_title' ] ? $raw[ 'ID' ] : $raw[ 'post_title' ];
$data[ 'post_name' ] = wp_unique_post_slug( sanitize_title( $raw[ 'post_name' ] ? $raw[ 'post_name' ] : $data[ 'post_title' ] ), $raw[ 'ID' ], $raw[ 'post_status' ], $raw[ 'post_type' ], $raw[ 'post_parent' ] );
$data[ 'post_title' ] = '';
$data[ 'post_name' ] = $raw[ 'ID' ];
}

if ( !in_array( 'editor', self::$config[ 'collections' ][ $data[ 'post_type' ] ][ 'supports' ] ) ) {
Expand Down

0 comments on commit 09c0673

Please sign in to comment.