diff --git a/wp-admin/edit-pages.php b/wp-admin/edit-pages.php index ef0704516..a328dcf13 100644 --- a/wp-admin/edit-pages.php +++ b/wp-admin/edit-pages.php @@ -66,8 +66,10 @@ $query_str = "post_type=page&orderby=menu_order title&what_to_show=posts$post_st $query_str = apply_filters('manage_pages_query', $query_str); wp($query_str); -if ( is_singular() ) +if ( is_singular() ) { wp_enqueue_script( 'admin-comments' ); + wp_enqueue_script( 'jquery-table-hotkeys' ); +} require_once('admin-header.php'); diff --git a/wp-admin/edit.php b/wp-admin/edit.php index e0d9965bd..03a728d04 100644 --- a/wp-admin/edit.php +++ b/wp-admin/edit.php @@ -53,8 +53,10 @@ wp_enqueue_script('admin-forms'); list($post_stati, $avail_post_stati) = wp_edit_posts_query(); -if ( 1 == count($posts) && is_singular() ) +if ( 1 == count($posts) && is_singular() ) { wp_enqueue_script( 'admin-comments' ); + wp_enqueue_script( 'jquery-table-hotkeys' ); +} require_once('admin-header.php'); diff --git a/wp-admin/js/edit-comments.js b/wp-admin/js/edit-comments.js index 1144b83ef..cf00e39b8 100644 --- a/wp-admin/js/edit-comments.js +++ b/wp-admin/js/edit-comments.js @@ -235,7 +235,8 @@ commentReply = { $(document).ready(function(){ if ( typeof QTags != 'undefined' ) ed_reply = new QTags('ed_reply', 'replycontent', 'replycontainer', 'more'); - jQuery.table_hotkeys(jQuery('table.widefat'), ['a', 'u', 's', 'd', 'r']); + if ( typeof $.table_hotkeys != 'undefined' ) + $.table_hotkeys($('table.widefat'), ['a', 'u', 's', 'd', 'r']); }); })(jQuery); diff --git a/wp-admin/post.php b/wp-admin/post.php index 346b276a0..3ee28fa19 100644 --- a/wp-admin/post.php +++ b/wp-admin/post.php @@ -131,6 +131,7 @@ case 'edit': wp_enqueue_script('media-upload'); wp_enqueue_script('word-count'); wp_enqueue_script( 'admin-comments' ); + wp_enqueue_script( 'jquery-table-hotkeys' ); if ( current_user_can('edit_post', $post_ID) ) { if ( $last = wp_check_post_lock( $post->ID ) ) { diff --git a/wp-admin/upload.php b/wp-admin/upload.php index a7946fb12..ee95f6674 100644 --- a/wp-admin/upload.php +++ b/wp-admin/upload.php @@ -51,8 +51,10 @@ wp_enqueue_script( 'admin-forms' ); list($post_mime_types, $avail_post_mime_types) = wp_edit_attachments_query(); -if ( is_singular() ) +if ( is_singular() ) { wp_enqueue_script( 'admin-comments' ); + wp_enqueue_script( 'jquery-table-hotkeys' ); +} require_once('admin-header.php');