Browse Source

Update to use the new hook. (#992)

`hook_field_widget_WIDGET_TYPE_form_alter()` was deprecated in Drupal 9.2.0 and removed in Drupal 10; however, it was what this functionality was using.

It has been replaced with
`hook_field_widget_single_element_WIDGET_TYPE_form_alter()`.

See: https://www.drupal.org/node/3180429
pull/995/head
Adam 11 months ago committed by GitHub
parent
commit
095e0ecf67
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 6
      islandora.module

6
islandora.module

@ -545,14 +545,14 @@ function islandora_object_delete_form_submit($form, FormStateInterface $form_sta
} }
/** /**
* Implements hook_field_widget_WIDGET_TYPE_form_alter(). * Implements hook_field_widget_single_element_WIDGET_TYPE_form_alter().
*/ */
function islandora_field_widget_image_image_form_alter(&$element, $form_state, $context) { function islandora_field_widget_single_element_image_image_form_alter(&$element, $form_state, $context) {
$element['#process'][] = 'islandora_add_default_image_alt_text'; $element['#process'][] = 'islandora_add_default_image_alt_text';
} }
/** /**
* Callback for hook_field_widget_WIDGET_TYPE_form_alter(). * Callback for hook_field_widget_single_element_WIDGET_TYPE_form_alter().
*/ */
function islandora_add_default_image_alt_text($element, $form_state, $form) { function islandora_add_default_image_alt_text($element, $form_state, $form) {
if ($element['alt']['#access']) { if ($element['alt']['#access']) {

Loading…
Cancel
Save