If post title is not provided, we still need to have a sanitized name for use in permalinks. Use the post id. Bug 717.
git-svn-id: http://svn.automattic.com/wordpress/trunk@2109 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
255364a85c
commit
bf06e2f857
|
@ -85,7 +85,6 @@ case 'post':
|
||||||
$post_ID = $id_result->Auto_increment;
|
$post_ID = $id_result->Auto_increment;
|
||||||
|
|
||||||
if ( empty($post_name) ) {
|
if ( empty($post_name) ) {
|
||||||
if ( !empty($post_title) )
|
|
||||||
$post_name = sanitize_title($post_title, $post_ID);
|
$post_name = sanitize_title($post_title, $post_ID);
|
||||||
} else {
|
} else {
|
||||||
$post_name = sanitize_title($post_name, $post_ID);
|
$post_name = sanitize_title($post_name, $post_ID);
|
||||||
|
@ -268,9 +267,7 @@ case 'editpost':
|
||||||
}
|
}
|
||||||
|
|
||||||
if (empty($post_name)) {
|
if (empty($post_name)) {
|
||||||
if (! empty($post_title)) {
|
|
||||||
$post_name = sanitize_title($post_title, $post_ID);
|
$post_name = sanitize_title($post_title, $post_ID);
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
$post_name = sanitize_title($post_name, $post_ID);
|
$post_name = sanitize_title($post_name, $post_ID);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue