add_filter('show_advanced_plugins', '__return_false', 999); // 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; });