function taxonomy_tools_publisher_node_update in Taxonomy Tools 8
Same name and namespace in other branches
- 7 taxonomy_tools_publisher/taxonomy_tools_publisher.module \taxonomy_tools_publisher_node_update()
Implements hook_node_update().
File
- taxonomy_tools_publisher/
taxonomy_tools_publisher.module, line 346 - Drupal hooks and functions to manipulate taxonomy terms.
Code
function taxonomy_tools_publisher_node_update($node) {
$fields = taxonomy_tools_publisher_reference_fields($node->type);
// Publish taxonomy terms that use this node.
if (!empty($fields) && $node->status == 1 && variable_get('taxonomy_tools_publisher_automatic_publishing', 0) == 1) {
foreach ($fields as $field) {
$terms = $node->{$field}[LANGUAGE_NONE];
foreach ($terms as $term) {
taxonomy_tools_publisher_publish_term($term['tid']);
}
}
}
}