In the past, I've asked for help on how to create a new term and save it - https://forum.backdropcms.org/forum/how-does-one-create-taxonomy-term-pr...
Now, I'm looking for a good way to programmatically specifically check to see if a term is already part of a vocabulary and if not to save it?
Comments
Use
taxonomy_term_load_multiple_by_name()
to load the the term by name (specify vocabulary if you wish). If the result is null, it doesn't exist. Then you can create the term and save it.My favorite way to create entities is with entity_create()