'; return $content; } /** * Creates a hidden input with the sendy list id * * @param mixed $args Array or string * @return string Hidden input with Sendy list id */ function get_list_id($args=[]) { if (!isset($args['values'][0])) { return false; } $content = ''; return $content; } /** * Subscribe from WPCF Forms after the email has been sent * * @param array $args * @return mixed */ function subscribe_from_cf7($args=null) { $sendyUrl = "http://mailing.cesie.org/subscribe"; try { if (!isset($_POST['sendy_list_id'])) { throw new Exception("Missing sendy_list_id"); } $postdata = http_build_query([ 'name' => $_POST['form-name'], 'email' => $_POST['form-email'], 'Type' => $_POST['list_type_segmentation'], 'list' => $_POST['sendy_list_id'], 'boolean' => 'true' ]); $opts = ['http' => [ 'method' => 'POST', 'header' => 'Content-type: application/x-www-form-urlencoded', 'content' => $postdata ]]; $context = stream_context_create($opts); $result = file_get_contents($sendyUrl, false, $context); if (!$result) { throw new Exception("There was a probleming adding you to the mailing list"); } } catch (Exception $e) { echo ""; } } Rethink | RETHINK
RETHINK First Newsletter

RETHINK First Newsletter

RETHINK First Newsletter Dear reader, welcome to the RETHINK Project!Have you noticed this growing tendency in Europe to think in terms of “us” and “them”?In response to a rise in prejudices, antisemitism, racism and xenophobia, memorial institutions and...