function globallink_content_type_workbench_enabled in GlobalLink Connect for Drupal 7.5
Same name and namespace in other branches
- 7.7 globallink.inc \globallink_content_type_workbench_enabled()
- 7.6 globallink.inc \globallink_content_type_workbench_enabled()
Determines if the workbench is enabled for a content type.
Parameters
string $type: The content type.
Return value
True if the workbench is enabled for that content type.
2 calls to globallink_content_type_workbench_enabled()
- globallink_field in ./
globallink_field_configuration.inc - Renders form for globallink_field.
- globallink_update_node in ./
globallink_node.inc - Updates node.
File
- ./
globallink.inc, line 1157 - Miscellaneous GlobalLink functions for node translations (non-entity).
Code
function globallink_content_type_workbench_enabled($type) {
if (!module_exists('workbench_moderation')) {
return FALSE;
}
elseif (!($variable = variable_get('node_options_' . $type, FALSE))) {
return FALSE;
}
elseif (!in_array('moderation', $variable)) {
return FALSE;
}
return TRUE;
}