diff --git wp-admin/menu.php wp-admin/menu.php
index 64f8019..1eb27a9 100644
--- wp-admin/menu.php
+++ wp-admin/menu.php
@@ -69,10 +69,16 @@ $menu[15] = array( __('Links'), 'manage_links', 'link-manager.php', '', 'menu-to
// Avoid the comment count query for users who cannot edit_posts.
if ( current_user_can( 'edit_posts' ) ) {
- $awaiting_mod = wp_count_comments();
- $awaiting_mod = $awaiting_mod->moderated;
+
+ $count_string = '';
+ if ( ! apply_filters( 'disable_admin_menu_comment_count', false ) ) {
+ $awaiting_mod = wp_count_comments();
+ $awaiting_mod = $awaiting_mod->moderated;
+ $count_string = '' . number_format_i18n( $awaiting_mod ) . '';
+ }
+
$menu[25] = array(
- sprintf( __( 'Comments %s' ), '' . number_format_i18n( $awaiting_mod ) . '' ),
+ sprintf( __( 'Comments %s' ), $count_string ),
'edit_posts',
'edit-comments.php',
'',