You are here

function custom_pub_query_node_load_multiple_alter in Custom Publishing Options 7

Implements hook_query_TAG_alter().

File

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

Code

function custom_pub_query_node_load_multiple_alter(QueryAlterableInterface $query) {
  $types = variable_get('custom_pub_types', array());
  if (count($types)) {
    foreach ($types as $field => $type) {
      if (db_field_exists('node', $field)) {
        $query
          ->addField('base', $field);
      }
    }
  }
}