mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-16 23:00:21 +00:00
git-svn-id: https://develop.svn.wordpress.org/trunk@4082 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
+6
-3
@@ -45,11 +45,14 @@ case 'post':
|
||||
case 'edit':
|
||||
$title = __('Edit');
|
||||
$editing = true;
|
||||
$post_ID = $p = (int) $_GET['post'];
|
||||
$post = get_post($post_ID);
|
||||
if($post->post_status == 'draft') {
|
||||
wp_enqueue_script('prototype');
|
||||
wp_enqueue_script('autosave');
|
||||
}
|
||||
require_once('admin-header.php');
|
||||
|
||||
$post_ID = $p = (int) $_GET['post'];
|
||||
|
||||
$post = get_post($post_ID);
|
||||
if ( !current_user_can('edit_post', $post_ID) )
|
||||
die ( __('You are not allowed to edit this post.') );
|
||||
|
||||
|
||||
Reference in New Issue
Block a user