Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Neuters the community events admin privacy leak in WordPress
* Plugin Name: Neuter Community Events
* Plugin URI:
* Description: Strips information from the WordPress community events request
* Version: 0.2
* Author: Alice Wonder Miscreations
* Author URI:
* License: MIT
if (! defined('WPINC')) {
* Filters out content sent to events API server.
* @param array $args Array of arguments set to the API server.
* @param string $url The url the args are sent to.
* @return array Either empty array or the input array, depending upon
* the $url parameter.
function neuter_community_events_leak(array $args, string $url)
/* specific to the community events plugin */
if (substr_count($url, '') !== 0) {
// This neuters everything sent to the events API server, including the
// blog domain and the location information.
return array();
return $args;
}//end neuter_community_events_leak();
/* apply function to the http_request_args filter */
add_filter('http_request_args', 'neuter_community_events_leak', 10, 2);
// end of script
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.