Add opt-in optioon for comment hotkeys. Props nbachiyski. fixes #7643

git-svn-id: http://svn.automattic.com/wordpress/trunk@9217 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan
2008-10-16 22:23:32 +00:00
parent 72577aacd8
commit ae2c4bc50c
11 changed files with 24 additions and 8 deletions

View File

@@ -151,6 +151,11 @@ function floated_admin_avatar( $name ) {
return "$avatar $name";
}
function enqueue_comment_hotkeys_js() {
if ( 'true' == get_user_option( 'comment_shortcuts' ) )
wp_enqueue_script( 'jquery-table-hotkeys' );
}
if ( is_admin() && ('edit-comments.php' == $pagenow || 'edit.php' == $pagenow) ) {
if ( get_option('show_avatars') )
add_filter( 'comment_author', 'floated_admin_avatar' );