You are here

function noreferrer_publish in No Referrer 7

Publishes domain whitelist.

1 call to noreferrer_publish()
noreferrer_admin_submit in ./noreferrer.admin.inc
Admin settings submit handler.
3 string references to 'noreferrer_publish'
noreferrer_admin in ./noreferrer.admin.inc
Admin settings form.
noreferrer_admin_submit in ./noreferrer.admin.inc
Admin settings submit handler.
noreferrer_uninstall in ./noreferrer.install
Implements hook_uninstall().

File

./noreferrer.admin.inc, line 97
Admin settings callbacks for no referrer module.

Code

function noreferrer_publish() {
  if ($whitelist = variable_get('noreferrer_whitelisted_domains', '')) {
    $whitelist = drupal_json_encode(explode(' ', $whitelist));
    file_unmanaged_save_data($whitelist, noreferrer_publish_uri(), FILE_EXISTS_REPLACE);
  }
}