public function save_wp_object($object_type, $data, $meta = array(), $strict = false, $sanitized = false, $fields = array())
{
if (in_array($object_type, array('post_type', 'media'))) {
$object_type = 'post';
}
if ('taxonomy' == $object_type) {
$object_type = 'term';
}
if ($sanitized) {
$data = pods_unsanitize($data);
$meta = pods_unsanitize($meta);
}
if (in_array($object_type, array('post', 'term', 'user', 'comment'))) {
return call_user_func(array($this, 'save_' . $object_type), $data, $meta, $strict, false, $fields);
} elseif ('settings' == $object_type) {
// Nothing to save
if (empty($meta)) {
return true;
}
return $this->save_setting(pods_var('option_id', $data), $meta, false);
}
return false;
}