You are here

function poptin_redirect_link in Website Popups, Email Popup, Exit-Intent Popup, and Contact Forms – Poptin 7

Same name and namespace in other branches
  1. 8 includes/poptin.inc \poptin_redirect_link()

Implements poptin_redirect_link().

1 call to poptin_redirect_link()
poptin_render_html in includes/poptin.inc
Implements poptin_render_html().

File

includes/poptin.inc, line 362
Creating HTML for admin part, where user can signup or login for poptin.

Code

function poptin_redirect_link() {
  global $base_url;
  $redirect_link = $base_url;
  $results = db_select('poptin', 'p')
    ->fields('p')
    ->execute();
  foreach ($results as $result) {
    if ($result->client_id != "" && $result->token != "") {
      $redirect_link = 'https://app.popt.in/overview';
    }
  }
  return $redirect_link;
}