X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/8a06f4f9392d1ac373442f82ee40428a3cb81395..4f4e083f6f77639c41e2b1ddb200de8e34301cee:/wp-admin/post.php 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