You are here

function _dfp_targeting_get_existing in Doubleclick for Publishers (DFP) 7

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

Returns the current targets. The default value will be used unless an "input" exists in the form_state variable, in which case that will be used.

2 calls to _dfp_targeting_get_existing()
dfp_admin_settings in ./dfp.admin.inc
Form builder for the global DFP settings form.
dfp_tag_form in plugins/export_ui/dfp_ctools_export_ui.inc
Form builder; Create an ad tag.

File

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

Code

function _dfp_targeting_get_existing($form_state, $default = array()) {
  $targeting = array();
  if (isset($form_state['input']['targeting'])) {
    $targeting = $form_state['input']['targeting'];
  }
  elseif (!empty($default)) {
    $targeting = $default;
  }
  return $targeting;
}