You are here

function custom_pub_schema_alter in Custom Publishing Options 7

Same name and namespace in other branches
  1. 6 custom_pub.module \custom_pub_schema_alter()

Implements hook_schema_alter().

File

./custom_pub.module, line 208
Adds the ability to add Custom publishing options to the node Add/Edit forms.

Code

function custom_pub_schema_alter(&$schema) {
  $types = variable_get('custom_pub_types', array());
  foreach ($types as $type) {
    $schema['node']['fields'][$type['type']] = array(
      'description' => t('Custom publishing option @name', array(
        '@name' => $type['name'],
      )),
      'type' => 'int',
      'not null' => TRUE,
      'default' => 0,
    );
  }
}