diff --git a/src/Plugin/Field/FieldWidget/InlineParagraphsWidget.php b/src/Plugin/Field/FieldWidget/InlineParagraphsWidget.php index dd8ffc9..a45f277 100644 --- a/src/Plugin/Field/FieldWidget/InlineParagraphsWidget.php +++ b/src/Plugin/Field/FieldWidget/InlineParagraphsWidget.php @@ -1213,12 +1213,12 @@ class InlineParagraphsWidget extends WidgetBase { if (isset($element['#title']) && strpos($element['#title'], $suffix)) { $element['#title'] = str_replace($suffix, '', $element['#title']); } - // Loop for image, link field types. + // Loop over all widget deltas. foreach (Element::children($element) as $delta) { if (isset($element[$delta]['#title']) && strpos($element[$delta]['#title'], $suffix)) { $element[$delta]['#title'] = str_replace($suffix, '', $element[$delta]['#title']); } - // Loop for multi value fields. + // Loop over all form elements within the current delta. foreach (Element::children($element[$delta]) as $field) { if (isset($element[$delta][$field]['#title']) && strpos($element[$delta][$field]['#title'], $suffix)) { $element[$delta][$field]['#title'] = str_replace($suffix, '', $element[$delta][$field]['#title']);