You are here

function promote_disable_node_presave in Promote Disable 7

Same name and namespace in other branches
  1. 8 promote_disable.module \promote_disable_node_presave()

Implements hook_node_presave().

File

./promote_disable.module, line 158
Primarily Drupal hooks and helper functions. This is the main module file for Promote Disable.

Code

function promote_disable_node_presave($node) {

  // Our saved node types.
  $node_types = variable_get('promote_disable_node_types', array());

  // Is this node type one we've set?
  if (in_array($node->type, $node_types)) {
    $node->promote = 0;
  }
}