function _taxonomy_revision_enabled_by_default in Taxonomy revision 7
Gets/sets whether revisions are enabled by default for a vocabulary.
Parameters
$vid: A vocabulary ID.
boolean $value: A status value to save. Defaults to NULL to return the current status instead.
Return value
boolean The current value if no value was passed.
5 calls to _taxonomy_revision_enabled_by_default()
- taxonomy_revision_field_attach_form in ./
taxonomy_revision.module - Implements hook_field_attach_form().
- taxonomy_revision_form_taxonomy_form_vocabulary_alter in ./
taxonomy_revision.module - Implements hook_form_FORM_ID_alter().
- taxonomy_revision_taxonomy_form_term_submit_build_term in ./
taxonomy_revision.module - Entity builder for the taxonomy term entity.
- taxonomy_revision_taxonomy_form_vocabulary_submit in ./
taxonomy_revision.module - Submit handler for the taxonomy_form_vocabulary form.
- taxonomy_revision_update_7100 in ./
taxonomy_revision.install - Rewrite old variable names to new ones using vocabulary machine name instead of vocabulary ID.
File
- ./
taxonomy_revision.module, line 525 - This is the main module file for the Taxonomy revision module.
Code
function _taxonomy_revision_enabled_by_default($vid, $value = NULL) {
$vocabulary = taxonomy_vocabulary_load($vid);
if (!isset($value)) {
return variable_get("taxonomy_revision_by_default_{$vocabulary->machine_name}", FALSE);
}
// Set value
variable_set("taxonomy_revision_by_default_{$vocabulary->machine_name}", $value);
}