diff --git a/core/modules/file/src/Plugin/Field/FieldType/FileItem.php b/core/modules/file/src/Plugin/Field/FieldType/FileItem.php index 7373c4397f..22d6cd7c29 100644 --- a/core/modules/file/src/Plugin/Field/FieldType/FileItem.php +++ b/core/modules/file/src/Plugin/Field/FieldType/FileItem.php @@ -19,7 +19,7 @@ * id = "file", * label = @Translation("File"), * description = @Translation("This field stores the ID of a file as an integer value."), - * category = @Translation("Reference"), + * category = @Translation("General"), * default_widget = "file_generic", * default_formatter = "file_default", * list_class = "\Drupal\file\Plugin\Field\FieldType\FileFieldItemList", diff --git a/core/modules/image/src/Plugin/Field/FieldType/ImageItem.php b/core/modules/image/src/Plugin/Field/FieldType/ImageItem.php index 7b8b275216..a883b59b92 100644 --- a/core/modules/image/src/Plugin/Field/FieldType/ImageItem.php +++ b/core/modules/image/src/Plugin/Field/FieldType/ImageItem.php @@ -18,7 +18,7 @@ * id = "image", * label = @Translation("Image"), * description = @Translation("This field stores the ID of an image file as an integer value."), - * category = @Translation("Reference"), + * category = @Translation("General"), * default_widget = "image_image", * default_formatter = "image", * column_groups = { diff --git a/core/modules/media/media.module b/core/modules/media/media.module index f55a0aadc3..87af827fba 100644 --- a/core/modules/media/media.module +++ b/core/modules/media/media.module @@ -102,16 +102,16 @@ function template_preprocess_media(array &$variables) { * Implements hook_form_FORM_ID_alter(). */ function media_form_field_ui_field_storage_add_form_alter(array &$form, FormStateInterface $form_state) { - $reference = t('Reference')->__toString(); + $general = t('General')->__toString(); // Remove the "image" and "file" options from the "Reference" optgroup if this // is NOT a media entity. if ($form_state->get('entity_type_id') !== 'media') { - if (isset($form['add']['new_storage_type']['#options'][$reference]['image'])) { - unset($form['add']['new_storage_type']['#options'][$reference]['image']); + if (isset($form['add']['new_storage_type']['#options'][$general]['image'])) { + unset($form['add']['new_storage_type']['#options'][$general]['image']); } - if (isset($form['add']['new_storage_type']['#options'][$reference]['file'])) { - unset($form['add']['new_storage_type']['#options'][$reference]['file']); + if (isset($form['add']['new_storage_type']['#options'][$general]['file'])) { + unset($form['add']['new_storage_type']['#options'][$general]['file']); } } }