You are here

function _taxonomy_term_resource_create in Services 7.3

Same name and namespace in other branches
  1. 6.3 resources/taxonomy_resource.inc \_taxonomy_term_resource_create()

Create a new taxonomy term based on submitted values.

Parameters

$term: Array of values for the taxonomy term.

Return value

Status constant indicating if term was inserted or updated.

See also

taxonomy_save_term()

1 string reference to '_taxonomy_term_resource_create'
_taxonomy_resource_definition in resources/taxonomy_resource.inc
@file Link general taxonomy functionalities to services module.

File

resources/taxonomy_resource.inc, line 391
Link general taxonomy functionalities to services module.

Code

function _taxonomy_term_resource_create($term) {

  // Adds backwards compatability with regression fixed in #1083242
  $term = _services_arg_value($term, 'term');
  $term = (object) $term;
  return taxonomy_term_save($term);
}