diff --git a/core/modules/field/field.module b/core/modules/field/field.module index ce17f9d..8ab7c20 100644 --- a/core/modules/field/field.module +++ b/core/modules/field/field.module @@ -465,7 +465,7 @@ function field_entity_field_info($entity_type) { */ function field_field_widget_info_alter(&$info) { // Add the Hidden widget to all field types. - $info['field_hidden']['field_types'] = array_keys(field_info_field_types()); + $info['hidden']['field_types'] = array_keys(field_info_field_types()); } /** diff --git a/core/modules/field/lib/Drupal/field/Plugin/field/widget/HiddenWidget.php b/core/modules/field/lib/Drupal/field/Plugin/field/widget/HiddenWidget.php index 2eae2e6..4054838 100644 --- a/core/modules/field/lib/Drupal/field/Plugin/field/widget/HiddenWidget.php +++ b/core/modules/field/lib/Drupal/field/Plugin/field/widget/HiddenWidget.php @@ -12,10 +12,10 @@ use Drupal\field\Plugin\Type\Widget\WidgetBase; /** - * Plugin implementation of the 'field_hidden' widget. + * Plugin implementation of the 'Hidden' widget. * * @Plugin( - * id = "field_hidden", + * id = "hidden", * module = "field", * label = @Translation("- Hidden -"), * multiple_values = TRUE, diff --git a/core/modules/field/lib/Drupal/field/Tests/FormTest.php b/core/modules/field/lib/Drupal/field/Tests/FormTest.php index eeb4ae0..b0a830d 100644 --- a/core/modules/field/lib/Drupal/field/Tests/FormTest.php +++ b/core/modules/field/lib/Drupal/field/Tests/FormTest.php @@ -585,7 +585,7 @@ function testFieldFormHiddenWidget() { $this->field = $this->field_single; $this->field_name = $this->field['field_name']; $this->instance['field_name'] = $this->field_name; - $this->instance['widget']['type'] = 'field_hidden'; + $this->instance['widget']['type'] = 'hidden'; $this->instance['default_value'] = array(0 => array('value' => 99)); field_create_field($this->field); field_create_instance($this->instance); @@ -624,7 +624,7 @@ function testFieldFormHiddenWidget() { $this->assertEqual($entity->{$this->field_name}[$langcode][0]['value'], $value, 'Field value was updated'); // Update the instance and switch to the Hidden widget again. - $this->instance['widget']['type'] = 'field_hidden'; + $this->instance['widget']['type'] = 'hidden'; field_update_instance($this->instance); // Create a new revision.