// Completely disable comments in WordPress function fully_disable_wp_comments(){foreach (get_post_types() as $post_type){if (post_type_supports($post_type,'comments')){remove_post_type_support($post_type,'comments');remove_post_type_support($post_type,'trackbacks')}}add_filter('comments_open','__return_false',20,2);add_filter('pings_open','__return_false',20,2);add_filter('comments_array','__return_empty_array',10,2)}add_action('init','fully_disable_wp_comments');function remove_admin_comments_menu(){remove_menu_page('edit-comments.php')}add_action('admin_menu','remove_admin_comments_menu');function disable_comments_admin_redirect(){global $pagenow;if ($pagenow==='edit-comments.php'){wp_safe_redirect(admin_url());exit}}add_action('admin_init','disable_comments_admin_redirect');function remove_dashboard_comments_widget(){remove_meta_box('dashboard_recent_comments','dashboard','normal')}add_action('wp_dashboard_setup','remove_dashboard_comments_widget');function remove_admin_bar_comments_menu(){global $wp_admin_bar;$wp_admin_bar->remove_menu('comments')}add_action('wp_before_admin_bar_render','remove_admin_bar_comments_menu');