X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/76aea3697c6043c1613370f172395b4f65ee71f0..8cc0f04ca22ffd9449495b3e0240603309c9932c:/wp-admin/post.php?action=edit;post=%3C%3Fphp%20echo%20%24post_ID diff --git a/wp-admin/post.php b/wp-admin/post.php index 0dfb8212..008778fa 100644 --- a/wp-admin/post.php +++ b/wp-admin/post.php @@ -1,4 +1,14 @@ ID) ) wp_die( __("You attempted to edit a post that doesn't exist. Perhaps it was deleted?") ); + if ( empty($post->ID) ) wp_die( __('You attempted to edit a post that doesn’t exist. Perhaps it was deleted?') ); if ( 'post' != $post->post_type ) { wp_redirect( get_edit_post_link( $post->ID, 'url' ) ); @@ -89,12 +128,14 @@ case 'edit': add_thickbox(); wp_enqueue_script('media-upload'); wp_enqueue_script('word-count'); + wp_enqueue_script( 'admin-comments' ); + enqueue_comment_hotkeys_js(); if ( current_user_can('edit_post', $post_ID) ) { if ( $last = wp_check_post_lock( $post->ID ) ) { $last_user = get_userdata( $last ); $last_user_name = $last_user ? $last_user->display_name : __('Somebody'); - $message = sprintf( __( 'Warning: %s is currently editing this post' ), wp_specialchars( $last_user_name ) ); + $message = sprintf( __( 'Warning: %s is currently editing this post' ), esc_html( $last_user_name ) ); $message = str_replace( "'", "\'", "
$message