You are here

function hook_simplify_get_fields_alter in Simplify 8

Same name and namespace in other branches
  1. 7.3 simplify.api.php \hook_simplify_get_fields_alter()

Alter the list of fields that can be hidden.

Parameters

array $fields: An associative array of fields that can be hidden, where the key is the machine name of the field and the value is the human-readable name of the field.

string $type: The type of fields passed to the $fields parameter. Can be one of: nodes, users, comments, taxonomy, blocks. See simplify_get_fields() for examples.

1 invocation of hook_simplify_get_fields_alter()
simplify_get_fields in ./simplify.module
Get an array of fields (by type) that can be hidden.

File

./simplify.api.php, line 20
Hooks provided by the Simplify module.

Code

function hook_simplify_get_fields_alter(array &$fields, $type) {

  // Allow our module's custom 'foo' node field to be hidden.
  if ($type == 'nodes') {
    $fields['foo'] = t('Foo field');
  }
}