function taxonomy_node_update

Same name in other branches
  1. 7.x modules/taxonomy/taxonomy.module \taxonomy_node_update()
  2. 9 core/modules/taxonomy/taxonomy.module \taxonomy_node_update()
  3. 8.9.x core/modules/taxonomy/taxonomy.module \taxonomy_node_update()
  4. 10 core/modules/taxonomy/taxonomy.module \taxonomy_node_update()

Implements hook_ENTITY_TYPE_update() for node entities.

Related topics

File

core/modules/taxonomy/taxonomy.module, line 254

Code

function taxonomy_node_update(EntityInterface $node) {
    // If we're not dealing with the default revision of the node, do not make any
    // change to the taxonomy index.
    if (!$node->isDefaultRevision()) {
        return;
    }
    taxonomy_delete_node_index($node);
    taxonomy_build_node_index($node);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.