You are here

function _spamspan_email_addresses_with_options in SpamSpan filter 7

1 string reference to '_spamspan_email_addresses_with_options'
_spamspan_filter_process in ./spamspan.module
Spamspan filter process callback

File

./spamspan.module, line 162
This module implements the spamspan technique (http://www.spamspan.com ) for hiding email addresses from spambots.

Code

function _spamspan_email_addresses_with_options($matches) {
  $vars = array();
  if (!empty($matches[3])) {
    $options = explode('|', $matches[3]);
    if (!empty($options[0])) {
      $custom_form_url = trim($options[0]);
      if (!empty($custom_form_url)) {
        $vars['custom_form_url'] = $custom_form_url;
      }
    }
    if (!empty($options[1])) {
      $custom_displaytext = trim($options[1]);
      if (!empty($custom_displaytext)) {
        $vars['custom_displaytext'] = $custom_displaytext;
      }
    }
  }
  return spamspan_admin()
    ->output($matches[1], $matches[2], '', array(), $vars);
}