5, 'httpversion' => '1.1', 'headers' => [ 'Authorization' => 'Bearer ' . $token, 'Accept' => 'application/json', ], 'body' => ['domain' => $domain], ]); } /** * Remove the graph's data from the current site. */ function we360cloud_graph_uninstall_site() { foreach (apply_filters('we360cloud_graph_uninstall_options', WE360CLOUD_GRAPH_OWN_OPTIONS) as $option) { delete_option($option); } delete_transient(WE360CLOUD_GRAPH_CONNECT_TRANSIENT); if (we360cloud_graph_sibling_present()) { return; } $token = (string) get_option(WE360CLOUD_GRAPH_TOKEN_OPTION, ''); if ($token !== '') { we360cloud_graph_goodbye($token); } foreach (WE360CLOUD_GRAPH_SHARED_OPTIONS as $option) { delete_option($option); } } if (is_multisite()) { $we360cloud_graph_site_ids = get_sites(['fields' => 'ids', 'number' => 0]); foreach ($we360cloud_graph_site_ids as $we360cloud_graph_site_id) { switch_to_blog($we360cloud_graph_site_id); we360cloud_graph_uninstall_site(); restore_current_blog(); } } else { we360cloud_graph_uninstall_site(); }