In `get_default_post_to_edit()`, let 'post_name' be passed to filter.

Previously, it was being overridden after the default post had been inserted
into the database, making it cumbersome to override with the 'wp_insert_post_data'
filter.

Props danielbachhuber.
Fixes #29847.
Built from https://develop.svn.wordpress.org/trunk@30626


git-svn-id: http://core.svn.wordpress.org/trunk@30616 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Boone Gorges 2014-11-29 19:26:23 +00:00
parent 2808edf7d1
commit c6e752b063
2 changed files with 2 additions and 2 deletions

View File

@ -555,6 +555,7 @@ function get_default_post_to_edit( $post_type = 'post', $create_in_db = false )
$post->post_date = '';
$post->post_date_gmt = '';
$post->post_password = '';
$post->post_name = '';
$post->post_type = $post_type;
$post->post_status = 'draft';
$post->to_ping = '';
@ -598,7 +599,6 @@ function get_default_post_to_edit( $post_type = 'post', $create_in_db = false )
* @param WP_Post $post Post object.
*/
$post->post_excerpt = apply_filters( 'default_excerpt', $post_excerpt, $post );
$post->post_name = '';
return $post;
}

View File

@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '4.1-beta2-30625';
$wp_version = '4.1-beta2-30626';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.