You are here

function _webform_update_8173 in Webform 6.x

Same name and namespace in other branches
  1. 8.5 includes/webform.install.update.inc \_webform_update_8173()

Recursively add flexbox: '0' to email confirm elements.

Parameters

array $element: An element.

1 call to _webform_update_8173()
webform_update_8173 in includes/webform.install.update.inc
Issue #3076086: Allow confirm email to use flexbox.

File

includes/webform.install.update.inc, line 3244
Archived Webform update hooks.

Code

function _webform_update_8173(array &$element) {
  if (isset($element['#type']) && $element['#type'] === 'webform_email_confirm' && !isset($element['#flexbox'])) {
    $element['#flexbox'] = '0';
  }
  foreach (Element::children($element) as $key) {
    if (is_array($element[$key])) {
      _webform_update_8173($element[$key]);
    }
  }
}