Index: rules/modules/taxonomy.rules.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/rules/rules/modules/Attic/taxonomy.rules.inc,v
retrieving revision 1.1.2.7
diff -u -p -r1.1.2.7 taxonomy.rules.inc
--- rules/modules/taxonomy.rules.inc	15 May 2009 13:03:12 -0000	1.1.2.7
+++ rules/modules/taxonomy.rules.inc	19 May 2009 17:16:43 -0000
@@ -74,6 +74,35 @@ function taxonomy_rules_action_info() {
     'help' => t('Loading a taxonomy term will allow you to act on this term, for example you will be able to assign this term to a content.'),
     'module' => 'Taxonomy',
   );
+  $info['rules_action_taxonomy_add_term'] = array(
+    'label' => t('Add a new term to vocabulary'),
+    'arguments' => array(
+      'taxonomy_vocab' => array(
+        'type' => 'taxonomy_vocab',
+        'label' => t('Taxonomy vocabulary'),
+      ),
+    ),
+    'new variables' => array(
+      'taxonomy_term' => array(
+        'type' => 'taxonomy_term',
+        'label' => t('Taxonomy term'),
+      ),
+    ),
+    'eval input' => array('name', 'description'),
+    'module' => 'Taxonomy',
+  );
+
+  $info['rules_action_taxonomy_delete_term'] = array(
+    'label' => t('Delete a term'),
+    'arguments' => array(
+      'taxonomy_term' => array(
+        'type' => 'taxonomy_term',
+        'label' => t('Taxonomy term'),
+      ),
+    ),
+    'module' => 'Taxonomy',
+  );
+
   $info['rules_action_taxonomy_term_assign_to_content'] = array(
     'label' => t('Assign a term to content'),
     'arguments' => array(
@@ -138,6 +167,31 @@ function rules_action_taxonomy_load_term
 }
 
 /**
+ * Action: Add a new term to vocabulary.
+ */
+function rules_action_taxonomy_add_term($taxonomy_vocab, $settings) {
+  // Prepare the values to pass to taxonomy_save_term();
+  $term = array(
+    'vid' => $taxonomy_vocab->vid,
+    'name' => $settings['name'],
+    'description' => $settings['description'],
+  );
+  $form_state = $term;
+  taxonomy_save_term($form_state);
+  // Get the newly created term.
+  $term = taxonomy_get_term($form_state['tid']);
+  return array('taxonomy_term' => $term);
+}
+
+/**
+ * Action: Delete a term.
+ */
+function rules_action_taxonomy_delete_term($taxonomy_term) {
+  taxonomy_del_term($taxonomy_term->tid);
+  return array('taxonomy_term' => $taxonomy_term);
+}
+
+/**
  * Action: Assign or remove a term to content.
  */
 function rules_action_taxonomy_term_assign_to_content($node, $taxonomy_term, $settings) {
Index: rules/modules/taxonomy.rules_forms.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/rules/rules/modules/Attic/taxonomy.rules_forms.inc,v
retrieving revision 1.1.2.7
diff -u -p -r1.1.2.7 taxonomy.rules_forms.inc
--- rules/modules/taxonomy.rules_forms.inc	15 May 2009 13:03:12 -0000	1.1.2.7
+++ rules/modules/taxonomy.rules_forms.inc	19 May 2009 17:16:44 -0000
@@ -76,6 +76,31 @@ function rules_taxonomy_form($vid, $valu
 }
 
 /**
+ * Action: Add a new term to vocabulary configuration form.
+ *
+ * As we allow adding terms to vocabularies that are created on the fly, we
+ * can't present the term's advanced settings.
+ */
+function rules_action_taxonomy_add_term_form($settings, &$form, $form_state) {
+  // Fields definition taken from taxonomy_form_term().
+  $form['settings']['name'] = array(
+    '#type' => 'textfield',
+    '#title' => t('Term name'),
+    '#default_value' => !empty($settings['name']) ? $settings['name'] : '',
+    '#maxlength' => 255,
+    '#description' => t('The name of this term.'),
+    '#required' => TRUE,
+  );
+
+  $form['settings']['description'] = array(
+    '#type' => 'textarea',
+    '#title' => t('Description'),
+    '#default_value' => !empty($settings['description']) ? $settings['description'] : '',
+    '#description' => t('A description of the term. To be displayed on taxonomy/term pages and RSS feeds.'),
+  );
+}
+
+/**
  * Action: Load a vocabulary configuration form.
  */
 function rules_action_taxonomy_load_vocab_form($settings, &$form, $form_state) {
