Auto add preview link after autosaving a new post or page. Props filosofo. see #5847

git-svn-id: https://develop.svn.wordpress.org/trunk@6953 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren
2008-02-21 06:19:46 +00:00
parent 6aacdf4c91
commit a738abba3d
5 changed files with 29 additions and 2 deletions
+5
View File
@@ -524,6 +524,11 @@ case 'closed-postboxes' :
$current_user = wp_get_current_user();
update_usermeta($current_user->ID, 'closedpostboxes_'.$page, $closed);
break;
case 'get-permalink':
check_ajax_referer( 'getpermalink', 'getpermalinknonce' );
$post_id = isset($_POST['post_id'])? intval($_POST['post_id']) : 0;
die(get_permalink($post_id));
break;
case 'sample-permalink':
check_ajax_referer( 'samplepermalink', 'samplepermalinknonce' );
$post_id = isset($_POST['post_id'])? intval($_POST['post_id']) : 0;