You are here

function _simplenews_mail_urls in Simplenews 5

Collect and store URLs

Parameters

string $url: URL to be converted to absolute and stored

boolean $refresh: TRUE: URL storage is cleared.

Return value

mixed if param $url is URL to be converted: Number of URLs currently stored. if param $url is empty: Keyed array of converted URLs.

1 call to _simplenews_mail_urls()
simplenews_html_to_text in ./simplenews.module
Convert html text to plain text.

File

./simplenews.module, line 1512

Code

function _simplenews_mail_urls($url = 0, $refresh = FALSE) {
  static $urls = array();
  if ($refresh) {
    $urls = array();
  }
  if ($url) {
    $urls[] = _simplenews_mail_url($url);
    return count($urls);
  }
  return $urls;
}