hook_taxonomy

  1. drupal
    1. drupal6
Versionen
drupal6 hook_taxonomy($op, $type, $array = NULL)

Act on taxonomy changes.

This hook allows modules to take action when the terms and vocabularies in the taxonomy are modified.

Übergabeparameter

$op What is being done to $array. Possible values:

  • "delete"
  • "insert"
  • "update"

$type What manner of item $array is. Possible values:

  • "term"
  • "vocabulary"

$array The item on which $op is being performed. Possible values:

Rückgabewert

None.

Verwandte Themen

Code

developer-docs/hooks/core.php, line 1880

<?php
function hook_taxonomy($op, $type, $array = NULL) {
  if ($type == 'vocabulary' && ($op == 'insert' || $op == 'update')) {
    if (variable_get('forum_nav_vocabulary', '') == ''
         && in_array('forum', $array['nodes'])) {
      // since none is already set, silently set this vocabulary as the
      // navigation vocabulary
      variable_set('forum_nav_vocabulary', $array['vid']);
    }
  }
}
?>

Kommentare

Kommentar hinzufügen

Der Inhalt dieses Feldes wird nicht öffentlich zugänglich angezeigt.
  • Internet- und E-Mail-Adressen werden automatisch umgewandelt.
  • Zulässige HTML-Tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Zeilen und Absätze werden automatisch erzeugt.

Weitere Informationen über Formatierungsoptionen

Kommentar hinzufügen

Der Inhalt dieses Feldes wird nicht öffentlich zugänglich angezeigt.
  • Internet- und E-Mail-Adressen werden automatisch umgewandelt.
  • Zulässige HTML-Tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Zeilen und Absätze werden automatisch erzeugt.

Weitere Informationen über Formatierungsoptionen