function field_info_field_settings

Returns a field type's default settings.

Parameters

$type: A field type name.

Return value

The field type's default settings, as provided by hook_field_info(), or an empty array if type or settings are not defined.

Related topics

5 calls to field_info_field_settings()
FieldInfo::prepareField in drupal/core/modules/field/lib/Drupal/field/FieldInfo.php
Prepares a field definition for the current run-time context.
FieldInfoTest::testSettingsInfo in drupal/core/modules/field/lib/Drupal/field/Tests/FieldInfoTest.php
Test that the field_info settings convenience functions work.
field_create_field in drupal/core/modules/field/field.crud.inc
Creates a field.
file_field_settings_form in drupal/core/modules/file/file.field.inc
Implements hook_field_settings_form().
image_field_settings_form in drupal/core/modules/image/image.field.inc
Implements hook_field_settings_form().

File

drupal/core/modules/field/field.info.inc, line 576
Field Info API, providing information about available fields and field types.

Code

function field_info_field_settings($type) {
  $info = field_info_field_types($type);
  return isset($info['settings']) ? $info['settings'] : array();
}