function ad_link_target in Advertisement 6.2
Same name and namespace in other branches
- 5.2 ad.module \ad_link_target()
- 5 ad.module \ad_link_target()
- 6 ad.module \ad_link_target()
- 7 ad.module \ad_link_target()
Ad API Helper Function: Provide XHTML-strict-compatible target window onclick-handlers based on global configuration.
1 call to ad_link_target()
- ad_link_attributes in ./
ad.module - Ad API Helper Function: Append all necessary attributes to <a> tags.
3 string references to 'ad_link_target'
- ad_admin_configure_settings in ./
ad.admin.inc - Display a form for the ad module settings.
- ad_admin_configure_settings_submit in ./
ad.admin.inc - Save updated values from settings form.
- ad_uninstall in ./
ad.install - Allow complete uninstallation of the ad module.
File
- ./
ad.module, line 276
Code
function ad_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;
}