You are here

function hook_simplify_get_fields_alter in Simplify 7.3

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

Alter the list of fields that can be hidden.

Parameters

$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.

$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 19
Hooks provided by the Simplify module.

Code

function hook_simplify_get_fields_alter(&$fields, $type) {

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