You are here

function dfp_format_slug in Doubleclick for Publishers (DFP) 7.2

Same name and namespace in other branches
  1. 7 dfp.module \dfp_format_slug()

Format the the size of an ad tag.

Parameters

array $variables: 'slug' => A label for for this particular ad tag.

Return value

string If $slug is none, an empty string will be returned; if $slug is a non-empty string then it will be returned unchanged; if $slug is empty, then the default slug will be returned.

2 calls to dfp_format_slug()
dfp_tag in ./dfp.module
Return a render array for the tag specified by machinename.
template_preprocess_dfp_tag in ./dfp.module
Preprocess function for DFP tags.

File

./dfp.module, line 653

Code

function dfp_format_slug($slug) {
  $formatted_slug = variable_get('dfp_default_slug', '');
  if ($slug == '<none>') {
    $formatted_slug = "";
  }
  elseif (!empty($slug)) {
    $formatted_slug = $slug;
  }
  return $formatted_slug;
}