You are here

function field_info_widget_settings in Drupal 7

Returns a field widget's default settings.

Parameters

$type: A widget type name.

Return value

The widget type's default settings, as provided by hook_field_widget_info(), or an empty array if type or settings are undefined.

Related topics

4 calls to field_info_widget_settings()
FieldInfo::prepareInstanceWidget in modules/field/field.info.class.inc
Prepares widget properties for the current run-time context.
FieldInfoTestCase::testSettingsInfo in modules/field/tests/field.test
Test that the field_info settings convenience functions work.
FieldInstanceCrudTestCase::testUpdateFieldInstance in modules/field/tests/field.test
Test the update of a field instance.
_field_write_instance in modules/field/field.crud.inc
Stores an instance record in the field configuration database.

File

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

Code

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