You are here

function panels_edit_form_validate in Panels 5

File

./panels.module, line 569

Code

function panels_edit_form_validate($form_id, $form_values, $form) {
  $content_types = panels_get_content_types();
  foreach ($form_values['content'] as $area => $content) {
    foreach ($content as $id => $item) {
      if (is_numeric($id)) {
        $function = $content_types[$item['type']]['admin'];
        if (function_exists($function)) {
          $function('validate', $item['configuration'], $form['content'][$area][$id]['configuration']);
        }
      }
    }
  }
}