function _invoice_set_content_type_settings in Invoice 7
Sets the invoice content type settings
2 calls to _invoice_set_content_type_settings()
- invoice_install in ./
invoice.install - Implementation of hook_install()
- invoice_update_7000 in ./
invoice.install - Implements hook_update_N()
File
- ./
invoice_helpers.inc, line 683 - Invoice module
Code
function _invoice_set_content_type_settings() {
// Disable preview submission
variable_set('node_preview_invoice', 0);
// DRUPAL_DISABLED
// Disable comments
variable_set('comment_invoice', 1);
// COMMENT_NODE_CLOSED
// Remove promote setting
$node_options = variable_get('node_options_invoice', array());
if (in_array('promote', $node_options)) {
foreach ($node_options as $key => $option) {
if ($option == 'promote') {
unset($node_options[$key]);
}
}
}
// Set published status
if (!in_array('status', $node_options)) {
$node_options[] = 'status';
}
variable_set('node_options_invoice', $node_options);
}