Post slug wasn't being set if manually set in advanced interface.
git-svn-id: https://develop.svn.wordpress.org/trunk@1322 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
a67d48bae7
commit
54c08ad215
@ -61,13 +61,20 @@ case 'post':
|
||||
}
|
||||
}
|
||||
$post_status = $_POST['post_status'];
|
||||
$post_name = $_POST['post_name'];
|
||||
|
||||
if (empty($post_status)) $post_status = 'draft';
|
||||
$comment_status = $_POST['comment_status'];
|
||||
if (empty($comment_status)) $comment_status = get_settings('default_comment_status');
|
||||
$ping_status = $_POST['ping_status'];
|
||||
if (empty($ping_status)) $ping_status = get_settings('default_ping_status');
|
||||
$post_password = addslashes(stripslashes($_POST['post_password']));
|
||||
$post_name = sanitize_title($post_title);
|
||||
|
||||
if (empty($post_name))
|
||||
$post_name = sanitize_title($post_title);
|
||||
else
|
||||
$post_name = sanitize_title($post_name);
|
||||
|
||||
$trackback = $_POST['trackback_url'];
|
||||
// Format trackbacks
|
||||
$trackback = preg_replace('|\s+|', '\n', $trackback);
|
||||
|
Loading…
Reference in New Issue
Block a user