diff --git a/wp-admin/admin-ajax.php b/wp-admin/admin-ajax.php index 61979a461c..fdb584dcea 100644 --- a/wp-admin/admin-ajax.php +++ b/wp-admin/admin-ajax.php @@ -525,7 +525,7 @@ case 'closed-postboxes' : update_usermeta($current_user->ID, 'closedpostboxes_'.$page, $closed); break; case 'sample-permalink': - check_ajax_referer( $action ); + 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_slug'])); break; diff --git a/wp-admin/edit-form-advanced.php b/wp-admin/edit-form-advanced.php index 80cffd8dd6..1d92e767b1 100644 --- a/wp-admin/edit-form-advanced.php +++ b/wp-admin/edit-form-advanced.php @@ -90,6 +90,7 @@ addLoadEvent(focusit); post_content); ?> + diff --git a/wp-admin/js/slug.js b/wp-admin/js/slug.js index a0a81af0f4..1851914ef5 100644 --- a/wp-admin/js/slug.js +++ b/wp-admin/js/slug.js @@ -14,7 +14,7 @@ function edit_permalink(post_id) { action: 'sample-permalink', post_id: post_id, new_slug: new_slug, - cookie: document.cookie}, function(data) { + samplepermalinknonce: jQuery('#samplepermalinknonce').val()}, function(data) { jQuery('#sample-permalink').html(data); b.html(revert_b); real_slug.attr('value', new_slug);