✘✘ GRAYBYTE WORDPRESS FILE MANAGER ✘✘

​🇳​​🇦​​🇲​​🇪♯➤ server.blackpussy.asia ​🇻​♯➤ 5.14.0-611.20.1.el9_7.x86_64 #1 SMP 🇾​♯➤ 2026

𝗛𝗢𝗠𝗘 𝗜𝗗 ♯➤ 163.245.207.76 ♯➤ 𝗔𝗗𝗠𝗜𝗡 𝗜𝗗 216.73.216.243
𝗢𝗣𝗧𝗜𝗢𝗡𝗦 ♯ CRL ♯➤ 𝗢𝗞 ┃ WGT ♯➤ 𝗢𝗞 ┃ SDO ♯➤ 𝗢𝗞 ┃ PKEX ♯➤ 𝗢𝗙𝗙
𝗗𝗘𝗔𝗖𝗧𝗜𝗩𝗔𝗧𝗘𝗗 ♯➤ mail,mb_send_mail
𝗖𝗨𝗥𝗥𝗘𝗡𝗧 𝗙𝗜𝗟𝗘 : /home/blackpussy06/public_html/wp-content/mu-plugins//wpmm-disable-comments.php
<?php
/**
 * Plugin Name: wp-MM-System Disable Comments
 * Description: Centrally disables WordPress comments, pingbacks and REST comment writes.
 * Version: 1.0.1
 */
if (!defined('ABSPATH')) { exit; }
function wpmm_comments_disabled_false() { return false; }
function wpmm_comments_disabled_empty($comments) { return array(); }
add_filter('comments_open', 'wpmm_comments_disabled_false', PHP_INT_MAX, 2);
add_filter('pings_open', 'wpmm_comments_disabled_false', PHP_INT_MAX, 2);
add_filter('comments_array', 'wpmm_comments_disabled_empty', PHP_INT_MAX, 2);
add_filter('get_comments_number', '__return_zero', PHP_INT_MAX, 2);
add_filter('pre_option_default_comment_status', function () { return 'closed'; }, PHP_INT_MAX);
add_filter('pre_option_default_ping_status', function () { return 'closed'; }, PHP_INT_MAX);
add_action('init', function () {
    foreach (get_post_types(array(), 'names') as $type) {
        if (post_type_supports($type, 'comments')) { remove_post_type_support($type, 'comments'); }
        if (post_type_supports($type, 'trackbacks')) { remove_post_type_support($type, 'trackbacks'); }
    }
    if (get_option('default_comment_status') !== 'closed') { update_option('default_comment_status', 'closed'); }
    if (get_option('default_ping_status') !== 'closed') { update_option('default_ping_status', 'closed'); }
}, 0);
add_filter('wp_insert_post_data', function ($data, $postarr) {
    $data['comment_status'] = 'closed';
    $data['ping_status'] = 'closed';
    return $data;
}, PHP_INT_MAX, 2);
add_filter('xmlrpc_methods', function ($methods) {
    unset($methods['pingback.ping'], $methods['pingback.extensions.getPingbacks']);
    return $methods;
});
add_filter('wp_headers', function ($headers) {
    unset($headers['X-Pingback']);
    return $headers;
});
add_filter('rest_pre_dispatch', function ($result, $server, $request) {
    $route = $request->get_route();
    if (preg_match('#^/wp/v2/comments(?:/|$)#', $route) && strtoupper($request->get_method()) !== 'GET') {
        return new WP_Error('wpmm_comments_disabled', '本站留言功能已停用。', array('status' => 403));
    }
    return $result;
}, 10, 3);
add_action('pre_comment_on_post', function () {
    wp_die('本站留言功能已停用。', '留言已停用', array('response' => 403));
}, PHP_INT_MAX);

Current_dir [ 𝗪𝗥𝗜𝗧𝗘𝗔𝗕𝗟𝗘 ] Document_root [ 𝗪𝗥𝗜𝗧𝗘𝗔𝗕𝗟𝗘 ]

Current_dir [ 𝗪𝗥𝗜𝗧𝗘𝗔𝗕𝗟𝗘 ] Document_root [ 𝗪𝗥𝗜𝗧𝗘𝗔𝗕𝗟𝗘 ]


[ Back ]
𝗡𝗔𝗠𝗘
𝗦𝗜𝗭𝗘
𝗟𝗔𝗦𝗧 𝗧𝗢𝗨𝗖𝗛
𝗨𝗦𝗘𝗥
𝗦𝗧𝗔𝗧𝗨𝗦
𝗙𝗨𝗡𝗖𝗧𝗜𝗢𝗡𝗦
..
--
12 Sep 2026 3.48 AM
blackpussy06 / blackpussy06
0755
wpmm-disable-comments.php
2.258 KB
9 Sep 2026 10.05 PM
blackpussy06 / blackpussy06
0644

✘✘ GRAYBYTE WORDPRESS FILE MANAGER @ 2026 CONTACT ME ✘✘
Static GIF Static GIF