function ad_client_link_target in Advertisement 6.3
Ad API Helper Function: Provide XHTML-strict-compatible target window onclick-handlers based on global configuration.
File
- client/
ad_client.module, line 123 - An advertising system for Drupal powered websites.
Code
function ad_client_link_target() {
switch (variable_get('ad_link_target', '_self')) {
case '_blank':
$target = array(
'onclick' => 'window.open(this.href); return false;',
);
break;
case '_parent':
$target = array(
'onclick' => 'window.parent.location = this.href; return false;',
);
break;
case '_top':
$target = array(
'onclick' => 'window.top.location = this.href; return false;',
);
break;
default:
$target = array();
break;
}
return $target;
}