Post slug fixes from nbachiyski. fixes #6072

git-svn-id: https://develop.svn.wordpress.org/trunk@7162 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Mark Jaquith
2008-03-05 22:09:28 +00:00
parent d1a9adb980
commit 5330df3c0a
3 changed files with 12 additions and 7 deletions

View File

@@ -571,7 +571,9 @@ break;
case 'sample-permalink':
check_ajax_referer( 'samplepermalink', 'samplepermalinknonce' );
$post_id = isset($_POST['post_id'])? intval($_POST['post_id']) : 0;
die(get_sample_permalink_html($post_id, $_POST['new_title'], $_POST['new_slug']));
$title = isset($_POST['new_title'])? $_POST['new_title'] : '';
$slug = isset($_POST['new_slug'])? $_POST['new_slug'] : '';
die(get_sample_permalink_html($post_id, $title, $slug));
break;
default :
do_action( 'wp_ajax_' . $_POST['action'] );