You are here

function _taxonomy_access_term_options in Taxonomy Access Control 7

Field options callback to generate options unfiltered by list grants.

Parameters

object $field: The field object.

Return value

array Allowed terms from taxonomy_allowed_values().

See also

taxonomy_allowed_values()

Related topics

2 string references to '_taxonomy_access_term_options'
taxonomy_access_disable in ./taxonomy_access.module
Implements hook_disable().
taxonomy_access_field_info_alter in ./taxonomy_access.module
Implements hook_field_info_alter().

File

./taxonomy_access.module, line 1575
Allows administrators to specify access control for taxonomy categories.

Code

function _taxonomy_access_term_options($field) {

  // Preserve the original state of the list flag.
  $flag_state = taxonomy_access_list_enabled();

  // Enforce that list grants do not filter the options list.
  taxonomy_access_disable_list();

  // Use taxonomy.module to generate the list of options.
  $options = taxonomy_allowed_values($field);

  // Restore list flag to previous state.
  if ($flag_state) {
    taxonomy_access_enable_list();
  }
  return $options;
}