You are here

function rules_action_taxonomy_add_vocab in Rules 6

Action: Add a new vocabulary.

Related topics

File

rules/modules/taxonomy.rules.inc, line 220
Rules integration for the taxonomy module.

Code

function rules_action_taxonomy_add_vocab($settings) {
  taxonomy_save_vocabulary($settings);
  $vocabs = taxonomy_get_vocabularies();
  return array(
    'taxonomy_vocab' => $vocabs[$settings['vid']],
  );
}