- π§π¬Bulgaria a.sotirov
Since the suggested hook function has been removed from Drupal 10, the refactored code from #8 should look like:
function my_module_field_widget_single_element_form_alter(&$element, FormStateInterface $form_state, $context) { $widget_type = $context['widget']->getPluginId(); if ($widget_type === 'link_default' || $widget_type === 'link_attributes' || $widget_type === 'link_target_field_widget') { $element['uri']['#selection_settings'] = [ 'match_limit' => 0, ]; }