public function delete_object($params)
{
$params = (object) $params;
$object = $this->load_object($params);
if (empty($object)) {
return pods_error(sprintf(__("%s Object not found", 'pods'), ucwords($params->type)), $this);
}
$success = wp_delete_post($params->id);
if (!$success) {
return pods_error(sprintf(__("%s Object not deleted", 'pods'), ucwords($params->type)), $this);
}
pods_transient_clear('pods_objects_' . $params->type);
return true;
}