taxonomy_get_term_by_name

Versions
4.6 – 7
taxonomy_get_term_by_name($name)

Try to map a string to an existing term, as for glossary use.

Provides a case-insensitive and trimmed mapping, to maximize the likelihood of a successful match.

Parameters

name Name of the term to search for.

Return value

An array of matching term objects.

Code

modules/taxonomy/taxonomy.module, line 719

<?php
function taxonomy_get_term_by_name($name) {
  return taxonomy_term_load_multiple(array(), array('name' => trim($name)));
}
?>
Login or register to post comments
 
 

All source code and documentation on this site is released under the terms of the GNU General Public License, version 2 and later. Drupal is a registered trademark of Dries Buytaert.