public function delete_post($post_id, $blocking = true)
{
$index = trailingslashit(ep_get_index_name());
$path = $index . 'post/' . $post_id;
$request_args = array('method' => 'DELETE', 'timeout' => 15, 'blocking' => $blocking);
$request = ep_remote_request($path, apply_filters('ep_delete_post_request_args', $request_args, $post_id));
if (!is_wp_error($request)) {
$response_body = wp_remote_retrieve_body($request);
$response = json_decode($response_body, true);
if (!empty($response['found'])) {
return true;
}
}
return false;
}