You are here

function theme_dfp_breakpoint_settings in Doubleclick for Publishers (DFP) 7

Same name and namespace in other branches
  1. 7.2 dfp.admin.inc \theme_dfp_breakpoint_settings()

Theme function for the "breakpoint" form.

1 theme call to theme_dfp_breakpoint_settings()
_dfp_breakpoints_form in ./dfp.admin.inc
Helper form builder for the breakpoints form.

File

./dfp.admin.inc, line 628
Admin forms and functinality for DFP ads.

Code

function theme_dfp_breakpoint_settings($variables) {
  $form = $variables['form'];
  $more_button = drupal_render($form['dfp_more_breakpoints']);
  unset($form['dfp_more_breakpoints']);
  $headers = array(
    t('Browser Size'),
    t('Ad Size(s)'),
  );
  $rows = array();
  foreach (element_children($form) as $key) {
    $rows[] = array(
      drupal_render($form[$key]['browser_size']),
      drupal_render($form[$key]['ad_sizes']),
    );
  }
  $rows[] = array(
    array(
      'data' => 'These breakpoints are set to implement DFP responsive mappings. See <a href="https://support.google.com/dfp_premium/answer/3423562?hl=en">this support article</a> for more information.',
      'colspan' => 2,
    ),
  );
  return theme('table', array(
    'header' => $headers,
    'rows' => $rows,
  )) . $more_button;
}