You are here

function content_taxonomy_autocomplete_split_tags in Content Taxonomy 6.2

Same name and namespace in other branches
  1. 5 content_taxonomy_autocomplete.module \content_taxonomy_autocomplete_split_tags()
  2. 6 content_taxonomy_autocomplete.module \content_taxonomy_autocomplete_split_tags()

Helper function to split the tags

2 calls to content_taxonomy_autocomplete_split_tags()
content_taxonomy_autocomplete_tags_get_tids in ./content_taxonomy_autocomplete.module
Get TIDs for freetagging tags Free tagging vocabularies do not send their tids in the form, so we'll detect them here and process them independently.
content_taxonomy_autocomplete_validate in ./content_taxonomy_autocomplete.module
Validation function for the content_taxonomy_autocomplete element

File

./content_taxonomy_autocomplete.module, line 404
Defines a widget type for content_taxonomy with autocomplete

Code

function content_taxonomy_autocomplete_split_tags($typed_input) {
  $regexp = '%(?:^|,\\ *)("(?>[^"]*)(?>""[^"]* )*"|(?: [^",]*))%x';
  preg_match_all($regexp, $typed_input, $matches);
  return $matches[1];
}