You are here

function rules_events_hook_taxonomy_term_arguments in Rules 6

Returns some arguments suitable for using it with a term

Related topics

1 call to rules_events_hook_taxonomy_term_arguments()
taxonomy_rules_event_info in rules/modules/taxonomy.rules.inc
Implementation of hook_rules_event_info().

File

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

Code

function rules_events_hook_taxonomy_term_arguments($term_label, $update = FALSE) {
  $args = array(
    'term' => array(
      'type' => 'taxonomy_term',
      'label' => $term_label,
    ),
  );
  if ($update) {
    $args += array(
      'term_unchanged' => array(
        'type' => 'taxonomy_term',
        'label' => t('unchanged term'),
        'handler' => 'rules_events_argument_taxonomy_term_unchanged',
      ),
    );
  }
  return $args + rules_events_global_user_argument();
}